Go to the documentation of this file.
3 #ifndef MPEGRECORDER_H_
4 #define MPEGRECORDER_H_
11 struct AVFormatContext;
23 void SetOption(
const QString &opt,
int value)
override;
24 void SetOption(
const QString &opt,
const QString &value)
override;
28 const QString &videodev,
29 const QString &audiodev,
30 const QString &vbidev)
override;
33 void run(
void)
override;
34 void Reset(
void)
override;
75 void SetBitrate(
int bitrate,
int maxbitrate,
const QString & reason);
90 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
void Pause(bool clear=true) override
Pause tells recorder to pause, it should not block.
bool SetLanguageMode(int chanfd)
Set audio language mode.
void Reset(void) override
Reset the recorder to the startup state.
void ReaderPaused(int) override
Abstract base class for Video4Linux based recorders.
static const std::array< const std::string, 4 > kAspectRatio
void SetIntOption(RecordingProfile *profile, const QString &name)
unsigned int m_lowMpeg4PeakBitrate
bool PauseAndWait(std::chrono::milliseconds timeout=100ms) override
If m_requestPause is true, sets pause and blocks up to timeout milliseconds or until unpaused,...
uint GetFilteredAudioLayer(void) const
DeviceReadBuffer * m_deviceReadBuffer
void SetOption(const QString &opt, int value) override
handles the "wait_for_seqstart" option.
bool OpenMpegFileAsInput(void)
Buffers reads from device files.
unsigned int m_highMpeg4PeakBitrate
unsigned int m_highMpeg4AvgBitrate
bool OpenV4L2DeviceAsInput(void)
void run(void) override
run() starts the recording process, and does not exit until the recording is complete.
bool SetV4L2DeviceOptions(int chanfd)
bool HandleResolutionChanges(void)
Used to access the data of a Transport Stream packet.
void SetVideoFilters(QString &) override
Tells recorder which filters to use.
bool IsRecording(void) override
Tells whether the StartRecorder() loop is running.
static const std::array< const std::string, 15 > kStreamType
unsigned int m_lowMpeg4AvgBitrate
bool SetRecordingVolume(int chanfd)
static void clear(SettingsMap &cache, SettingsMap &overrides, const QString &myKey)
unsigned int m_language
0 is Main Lang; 1 is SAP Lang; 2 is Dual
bool SetVideoCaptureFormat(int chanfd)
static const std::array< const int, 14 > kAudRateL3
uint GetFilteredStreamType(void) const
uint GetFilteredAudioSampleRate(void) const
int GetVideoFd(void) override
Returns file descriptor of recorder device.
void Initialize(void) override
This is called between SetOptionsFromProfile() and run() to initialize any devices,...
void SetOptionsFromProfile(RecordingProfile *profile, const QString &videodev, const QString &audiodev, const QString &vbidev) override
Sets basic recorder options.
void PriorityEvent(int) override
void FormatCC(uint code1, uint code2) override
QWaitCondition m_pauseWait
void InitStreamData(void) override
unsigned int m_mediumMpeg4AvgBitrate
void SetBitrate(int bitrate, int maxbitrate, const QString &reason)
uint GetFilteredAudioBitRate(uint audio_layer) const
static const unsigned int kBuildBufferMaxSize
QRecursiveMutex m_startStopEncodingLock
static const std::array< const int, 14 > kAudRateL2
This is the coordinating class of the Recorder Subsystem.
bool SetVBIOptions(int chanfd)
bool m_recording
True while recording is actually being performed.
static const std::array< const int, 14 > kAudRateL1
void SetStrOption(RecordingProfile *profile, const QString &name)
unsigned int m_mediumMpeg4PeakBitrate
bool RestartEncoding(void)
bool ProcessTSPacket(const TSPacket &tspacket) override