MythTV  master
Public Member Functions | Protected Attributes | List of all members
FileWriterBase Class Reference

#include <filewriterbase.h>

Inheritance diagram for FileWriterBase:
Inheritance graph
[legend]
Collaboration diagram for FileWriterBase:
Collaboration graph
[legend]

Public Member Functions

 FileWriterBase ()=default
 
virtual ~FileWriterBase ()=default
 
virtual bool Init (void)
 
virtual bool OpenFile (void)
 
virtual bool CloseFile (void)
 
virtual int WriteVideoFrame (VideoFrame *frame)
 
virtual int WriteAudioFrame (unsigned char *buf, int fnum, long long &timecode)
 
virtual int WriteTextFrame (int, unsigned char *, int, long long, int)
 
virtual int WriteSeekTable (void)
 
virtual bool SwitchToNextFile (void)
 
void SetFilename (const QString &fname)
 
void SetContainer (const QString &cont)
 
void SetVideoCodec (const QString &codec)
 
void SetVideoBitrate (int bitrate)
 
void SetWidth (int width)
 
void SetHeight (int height)
 
void SetAspect (float aspect)
 
void SetFramerate (double rate)
 
void SetKeyFrameDist (int dist)
 
void SetAudioCodec (const QString &codec)
 
void SetAudioBitrate (int bitrate)
 
void SetAudioChannels (int channels)
 
void SetAudioFrameRate (int rate)
 
void SetAudioFormat (AudioFormat f)
 
void SetThreadCount (int count)
 
void SetTimecodeOffset (long long o)
 
void SetEncodingPreset (const QString &preset)
 
void SetEncodingTune (const QString &tune)
 
long long GetFramesWritten (void) const
 
long long GetTimecodeOffset (void) const
 
int GetAudioFrameSize (void) const
 number of audio samples (per channel) in an AVFrame More...
 

Protected Attributes

QString m_filename
 
QString m_container
 
QString m_videoCodec
 
int m_videoBitrate {800000}
 
int m_width {0}
 
int m_height {0}
 
float m_aspect {1.333333}
 
double m_frameRate {29.97}
 
int m_keyFrameDist {15}
 
QString m_audioCodec
 
int m_audioBitrate {0}
 
int m_audioChannels {2}
 
int m_audioFrameRate {48000}
 
AudioFormat m_audioFormat {FORMAT_S16}
 
int m_audioFrameSize {-1}
 
int m_encodingThreadCount {1}
 
long long m_framesWritten {0}
 
long long m_startingTimecodeOffset {-1}
 
QString m_encodingPreset
 
QString m_encodingTune
 

Detailed Description

Definition at line 9 of file filewriterbase.h.

Constructor & Destructor Documentation

◆ FileWriterBase()

FileWriterBase::FileWriterBase ( )
default

◆ ~FileWriterBase()

virtual FileWriterBase::~FileWriterBase ( )
virtualdefault

Member Function Documentation

◆ Init()

virtual bool FileWriterBase::Init ( void  )
inlinevirtual

Reimplemented in AVFormatWriter.

Definition at line 15 of file filewriterbase.h.

◆ OpenFile()

virtual bool FileWriterBase::OpenFile ( void  )
inlinevirtual

Reimplemented in AVFormatWriter.

Definition at line 16 of file filewriterbase.h.

◆ CloseFile()

virtual bool FileWriterBase::CloseFile ( void  )
inlinevirtual

Reimplemented in AVFormatWriter.

Definition at line 17 of file filewriterbase.h.

◆ WriteVideoFrame()

int FileWriterBase::WriteVideoFrame ( VideoFrame frame)
virtual

Reimplemented in AVFormatWriter.

Definition at line 28 of file filewriterbase.cpp.

◆ WriteAudioFrame()

int FileWriterBase::WriteAudioFrame ( unsigned char *  buf,
int  fnum,
long long &  timecode 
)
virtual

Reimplemented in AVFormatWriter.

Definition at line 35 of file filewriterbase.cpp.

◆ WriteTextFrame()

virtual int FileWriterBase::WriteTextFrame ( int  ,
unsigned char *  ,
int  ,
long long  ,
int   
)
inlinevirtual

Reimplemented in AVFormatWriter.

Definition at line 21 of file filewriterbase.h.

◆ WriteSeekTable()

virtual int FileWriterBase::WriteSeekTable ( void  )
inlinevirtual

Definition at line 23 of file filewriterbase.h.

◆ SwitchToNextFile()

virtual bool FileWriterBase::SwitchToNextFile ( void  )
inlinevirtual

Definition at line 25 of file filewriterbase.h.

◆ SetFilename()

void FileWriterBase::SetFilename ( const QString &  fname)
inline

Definition at line 27 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetContainer()

void FileWriterBase::SetContainer ( const QString &  cont)
inline

Definition at line 28 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetVideoCodec()

void FileWriterBase::SetVideoCodec ( const QString &  codec)
inline

Definition at line 29 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetVideoBitrate()

void FileWriterBase::SetVideoBitrate ( int  bitrate)
inline

Definition at line 30 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetWidth()

void FileWriterBase::SetWidth ( int  width)
inline

Definition at line 31 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetHeight()

void FileWriterBase::SetHeight ( int  height)
inline

Definition at line 32 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetAspect()

void FileWriterBase::SetAspect ( float  aspect)
inline

Definition at line 33 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetFramerate()

void FileWriterBase::SetFramerate ( double  rate)
inline

Definition at line 34 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetKeyFrameDist()

void FileWriterBase::SetKeyFrameDist ( int  dist)
inline

Definition at line 35 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetAudioCodec()

void FileWriterBase::SetAudioCodec ( const QString &  codec)
inline

Definition at line 36 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetAudioBitrate()

void FileWriterBase::SetAudioBitrate ( int  bitrate)
inline

Definition at line 37 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetAudioChannels()

void FileWriterBase::SetAudioChannels ( int  channels)
inline

Definition at line 38 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetAudioFrameRate()

void FileWriterBase::SetAudioFrameRate ( int  rate)
inline

Definition at line 39 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetAudioFormat()

void FileWriterBase::SetAudioFormat ( AudioFormat  f)
inline

Definition at line 40 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetThreadCount()

void FileWriterBase::SetThreadCount ( int  count)
inline

Definition at line 41 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetTimecodeOffset()

void FileWriterBase::SetTimecodeOffset ( long long  o)
inline

Definition at line 42 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetEncodingPreset()

void FileWriterBase::SetEncodingPreset ( const QString &  preset)
inline

Definition at line 43 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ SetEncodingTune()

void FileWriterBase::SetEncodingTune ( const QString &  tune)
inline

Definition at line 44 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ GetFramesWritten()

long long FileWriterBase::GetFramesWritten ( void  ) const
inline

Definition at line 46 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ GetTimecodeOffset()

long long FileWriterBase::GetTimecodeOffset ( void  ) const
inline

Definition at line 47 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

◆ GetAudioFrameSize()

int FileWriterBase::GetAudioFrameSize ( void  ) const
inline

number of audio samples (per channel) in an AVFrame

Definition at line 51 of file filewriterbase.h.

Referenced by Transcode::TranscodeFile().

Member Data Documentation

◆ m_filename

QString FileWriterBase::m_filename
protected

◆ m_container

QString FileWriterBase::m_container
protected

Definition at line 55 of file filewriterbase.h.

Referenced by AVFormatWriter::Init().

◆ m_videoCodec

QString FileWriterBase::m_videoCodec
protected

Definition at line 56 of file filewriterbase.h.

Referenced by AVFormatWriter::Init().

◆ m_videoBitrate

int FileWriterBase::m_videoBitrate {800000}
protected

Definition at line 57 of file filewriterbase.h.

Referenced by AVFormatWriter::AddVideoStream().

◆ m_width

int FileWriterBase::m_width {0}
protected

◆ m_height

int FileWriterBase::m_height {0}
protected

◆ m_aspect

float FileWriterBase::m_aspect {1.333333}
protected

Definition at line 60 of file filewriterbase.h.

◆ m_frameRate

double FileWriterBase::m_frameRate {29.97}
protected

Definition at line 61 of file filewriterbase.h.

Referenced by AVFormatWriter::GetCodecTimeBase().

◆ m_keyFrameDist

int FileWriterBase::m_keyFrameDist {15}
protected

◆ m_audioCodec

QString FileWriterBase::m_audioCodec
protected

Definition at line 63 of file filewriterbase.h.

Referenced by AVFormatWriter::Init().

◆ m_audioBitrate

int FileWriterBase::m_audioBitrate {0}
protected

Definition at line 64 of file filewriterbase.h.

Referenced by AVFormatWriter::AddAudioStream().

◆ m_audioChannels

int FileWriterBase::m_audioChannels {2}
protected

◆ m_audioFrameRate

int FileWriterBase::m_audioFrameRate {48000}
protected

Definition at line 66 of file filewriterbase.h.

Referenced by AVFormatWriter::AddAudioStream().

◆ m_audioFormat

AudioFormat FileWriterBase::m_audioFormat {FORMAT_S16}
protected

Definition at line 67 of file filewriterbase.h.

◆ m_audioFrameSize

int FileWriterBase::m_audioFrameSize {-1}
protected

Definition at line 68 of file filewriterbase.h.

Referenced by AVFormatWriter::OpenAudio(), and AVFormatWriter::WriteAudioFrame().

◆ m_encodingThreadCount

int FileWriterBase::m_encodingThreadCount {1}
protected

Definition at line 69 of file filewriterbase.h.

Referenced by AVFormatWriter::AddVideoStream().

◆ m_framesWritten

long long FileWriterBase::m_framesWritten {0}
protected

Definition at line 70 of file filewriterbase.h.

Referenced by AVFormatWriter::WriteVideoFrame().

◆ m_startingTimecodeOffset

long long FileWriterBase::m_startingTimecodeOffset {-1}
protected

◆ m_encodingPreset

QString FileWriterBase::m_encodingPreset
protected

Definition at line 72 of file filewriterbase.h.

Referenced by AVFormatWriter::AddVideoStream().

◆ m_encodingTune

QString FileWriterBase::m_encodingTune
protected

Definition at line 73 of file filewriterbase.h.

Referenced by AVFormatWriter::AddVideoStream().


The documentation for this class was generated from the following files: