1 #ifndef FILEWRITERBASE_H
2 #define FILEWRITERBASE_H
17 virtual bool Init (
void) = 0;
18 virtual bool OpenFile (
void) = 0;
19 virtual bool CloseFile (
void) = 0;
21 virtual int WriteAudioFrame (
unsigned char *
Buffer,
int FrameNumber,
22 std::chrono::milliseconds &Timecode) = 0;
23 virtual int WriteTextFrame (
int VBIMode,
unsigned char *
Buffer,
int Length,
24 std::chrono::milliseconds Timecode,
int PageNumber) = 0;
25 virtual int WriteSeekTable (
void) = 0;
26 virtual bool SwitchToNextFile (
void) = 0;
28 void SetFilename (
const QString& FileName);
29 void SetContainer (
const QString& Cont);
30 void SetVideoCodec (
const QString& Codec);
31 void SetVideoBitrate (
int Bitrate);
32 void SetWidth (
int Width);
33 void SetHeight (
int Height);
34 void SetAspect (
float Aspect);
35 void SetFramerate (
double Rate);
36 void SetKeyFrameDist (
int Dist);
37 void SetAudioCodec (
const QString& Codec);
38 void SetAudioBitrate (
int Bitrate);
39 void SetAudioChannels (
int Channels);
40 void SetAudioFrameRate (
int Rate);
42 void SetThreadCount (
int Count);
43 void SetTimecodeOffset (std::chrono::milliseconds Offset);
44 void SetEncodingPreset (
const QString& Preset);
45 void SetEncodingTune (
const QString& Tune);
46 long long GetFramesWritten (
void)
const;
47 std::chrono::milliseconds GetTimecodeOffset (
void)
const;
48 int GetAudioFrameSize (
void)
const;
54 int m_videoBitrate { 800000 };
57 float m_aspect { 1.333333F };
58 double m_frameRate { 29.97 };
59 int m_keyFrameDist { 15 };
61 int m_audioBitrate { 0 };
62 int m_audioChannels { 2 };
63 int m_audioFrameRate { 48000 };
65 int m_audioFrameSize { -1 };
66 int m_encodingThreadCount { 1 };
67 long long m_framesWritten { 0 };
68 std::chrono::milliseconds m_startingTimecodeOffset { -1ms };