MythTV  master
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
RecorderBase Class Referenceabstract

This is the abstract base class for supporting recorder hardware. More...

#include <recorderbase.h>

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

Public Types

enum  AspectRatio {
  ASPECT_UNKNOWN = 0x00, ASPECT_1_1 = 0x01, ASPECT_4_3 = 0x02, ASPECT_16_9 = 0x03,
  ASPECT_2_21_1 = 0x04, ASPECT_CUSTOM = 0x05
}
 

Public Member Functions

 RecorderBase (TVRec *rec)
 
virtual ~RecorderBase ()
 
void SetFrameRate (double rate)
 Sets the video frame rate. More...
 
void SetRecording (const RecordingInfo *pginfo)
 Changes the Recording from the one set initially with SetOptionsFromProfile(). More...
 
void SetRingBuffer (RingBuffer *rbuf)
 Tells recorder to use an externally created ringbuffer. More...
 
virtual void SetOption (const QString &name, const QString &value)
 Set an specific option. More...
 
virtual void SetOption (const QString &name, int value)
 Set an specific integer option. More...
 
void SetBoolOption (const QString &name, bool value)
 Set an specific boolean option. More...
 
virtual void SetVideoFilters (QString &filters)=0
 Tells recorder which filters to use. More...
 
virtual void SetOptionsFromProfile (RecordingProfile *profile, const QString &videodev, const QString &audiodev, const QString &vbidev)=0
 Sets basic recorder options. More...
 
void SetNextRecording (const RecordingInfo *, RingBuffer *)
 Sets next recording info, to be applied as soon as practical. More...
 
virtual void Initialize (void)=0
 This is called between SetOptionsFromProfile() and run() to initialize any devices, etc. More...
 
void run (void) override=0
 run() starts the recording process, and does not exit until the recording is complete. More...
 
virtual void Reset (void)=0
 Reset the recorder to the startup state. More...
 
virtual bool IsErrored (void)=0
 Tells us whether an unrecoverable error has been encountered. More...
 
virtual long long GetFramesWritten (void)=0
 Returns number of frames written to disk. More...
 
virtual int GetVideoFd (void)=0
 Returns file descriptor of recorder device. More...
 
long long GetKeyframePosition (long long desired) const
 Returns closest keyframe position before the desired frame. More...
 
bool GetKeyframePositions (long long start, long long end, frm_pos_map_t &) const
 
bool GetKeyframeDurations (long long start, long long end, frm_pos_map_t &) const
 
virtual void StopRecording (void)
 StopRecording() signals to the recorder that it should stop recording and exit cleanly. More...
 
virtual bool IsRecording (void)
 Tells whether the StartRecorder() loop is running. More...
 
virtual bool IsRecordingRequested (void)
 Tells us if StopRecording() has been called. More...
 
virtual RecordingQualityGetRecordingQuality (const RecordingInfo *) const
 Returns a report about the current recordings quality. More...
 
virtual void Pause (bool clear=true)
 Pause tells recorder to pause, it should not block. More...
 
virtual void Unpause (void)
 Unpause tells recorder to unpause. More...
 
virtual bool IsPaused (bool holding_lock=false) const
 Returns true iff recorder is paused. More...
 
virtual bool WaitForPause (int timeout=1000)
 WaitForPause blocks until recorder is actually paused, or timeout milliseconds elapse. More...
 
double GetFrameRate (void) const
 Returns the latest frame rate. More...
 
virtual bool CheckForRingBufferSwitch (void)
 If requested, switch to new RingBuffer/ProgramInfo objects. More...
 
void SavePositionMap (bool force=false, bool finished=false)
 Save the seektable to the DB. More...
 

Static Public Member Functions

static RecorderBaseCreateRecorder (TVRec *tvrec, ChannelBase *channel, RecordingProfile &profile, const GeneralDBOptions &genOpt)
 

Protected Member Functions

void SetIntOption (RecordingProfile *profile, const QString &name)
 Convenience function used to set integer options from a profile. More...
 
void SetStrOption (RecordingProfile *profile, const QString &name)
 Convenience function used to set QString options from a profile. More...
 
virtual bool PauseAndWait (int timeout=100)
 If m_request_pause is true, sets pause and blocks up to timeout milliseconds or until unpaused, whichever is sooner. More...
 
virtual void ResetForNewFile (void)=0
 
virtual void SetRecordingStatus (RecStatus::Type status, const QString &file, int line)
 
virtual void ClearStatistics (void)
 
virtual void FinishRecording (void)
 
virtual void StartNewFile (void)
 
void SetPositionMapType (MarkTypes type)
 Set seektable type. More...
 
void AspectChange (uint aspect, long long frame)
 Note a change in aspect ratio in the recordedmark table. More...
 
void ResolutionChange (uint width, uint height, long long frame)
 Note a change in video size in the recordedmark table. More...
 
void FrameRateChange (uint framerate, long long frame)
 Note a change in video frame rate in the recordedmark table. More...
 
void VideoCodecChange (AVCodecID vCodec)
 Note a change in video codec. More...
 
void AudioCodecChange (AVCodecID aCodec)
 Note a change in audio codec. More...
 
void SetDuration (uint64_t duration)
 Note the total duration in the recordedmark table. More...
 
void SetTotalFrames (uint64_t total_frames)
 Note the total frames in the recordedmark table. More...
 
void TryWriteProgStartMark (const frm_pos_map_t &durationDeltaCopy)
 

Protected Attributes

TVRecm_tvrec {nullptr}
 
RingBufferm_ringBuffer {nullptr}
 
bool m_weMadeBuffer {true}
 
AVContainer m_containerFormat {formatUnknown}
 
AVCodecID m_primaryVideoCodec {AV_CODEC_ID_NONE}
 
AVCodecID m_primaryAudioCodec {AV_CODEC_ID_NONE}
 
QString m_videocodec {"rtjpeg"}
 
QString m_videodevice
 
bool m_ntsc {true}
 
bool m_ntsc_framerate {true}
 
double m_video_frame_rate {29.97}
 
uint m_videoAspect {0}
 
uint m_videoHeight {0}
 
uint m_videoWidth {0}
 
FrameRate m_frameRate {0}
 
RecordingInfom_curRecording {nullptr}
 
QMutex m_pauseLock
 
bool m_request_pause {false}
 
bool m_paused {false}
 
QWaitCondition m_pauseWait
 
QWaitCondition m_unpauseWait
 
bool m_request_recording {false}
 True if API call has requested a recording be [re]started. More...
 
bool m_recording {false}
 True while recording is actually being performed. More...
 
QWaitCondition m_recordingWait
 
QMutex m_nextRingBufferLock
 
RingBufferm_nextRingBuffer {nullptr}
 
RecordingInfom_nextRecording {nullptr}
 
MythTimer m_ringBufferCheckTimer
 
MarkTypes m_positionMapType {MARK_GOP_BYFRAME}
 
QMutex m_positionMapLock
 
frm_pos_map_t m_positionMap
 
frm_pos_map_t m_positionMapDelta
 
frm_pos_map_t m_durationMap
 
frm_pos_map_t m_durationMapDelta
 
MythTimer m_positionMapTimer
 
qint64 m_estimatedProgStartMS {0}
 
long long m_lastSavedKeyframe {0}
 
long long m_lastSavedDuration {0}
 
QMutex m_statisticsLock
 
QAtomicInt m_timeOfFirstDataIsSet
 
QDateTime m_timeOfFirstData
 
QAtomicInt m_timeOfLatestDataCount
 
QAtomicInt m_timeOfLatestDataPacketInterval
 
QDateTime m_timeOfLatestData
 
MythTimer m_timeOfLatestDataTimer
 
RecordingGaps m_recordingGaps
 

Static Protected Attributes

static const uint kTimeOfLatestDataIntervalTarget = 5000
 timeOfLatest update interval target in milliseconds. More...
 

Friends

class Transcode
 

Detailed Description

This is the abstract base class for supporting recorder hardware.

For a digital streams specialization, see the DTVRecorder. For a specialization for MPEG hardware encoded analog streams, see MpegRecorder. For a specialization for software encoding of frame grabber recorders, see NuppelVideoRecorder.

See also
TVRec

Definition at line 66 of file recorderbase.h.

Member Enumeration Documentation

◆ AspectRatio

Enumerator
ASPECT_UNKNOWN 
ASPECT_1_1 
ASPECT_4_3 
ASPECT_16_9 
ASPECT_2_21_1 
ASPECT_CUSTOM 

Definition at line 236 of file recorderbase.h.

Constructor & Destructor Documentation

◆ RecorderBase()

RecorderBase::RecorderBase ( TVRec rec)
explicit

Definition at line 48 of file recorderbase.cpp.

◆ ~RecorderBase()

RecorderBase::~RecorderBase ( void  )
virtual

Definition at line 58 of file recorderbase.cpp.

Member Function Documentation

◆ SetFrameRate()

void RecorderBase::SetFrameRate ( double  rate)
inline

Sets the video frame rate.

Definition at line 75 of file recorderbase.h.

Referenced by SetOption().

◆ SetRecording()

void RecorderBase::SetRecording ( const RecordingInfo pginfo)

Changes the Recording from the one set initially with SetOptionsFromProfile().

This method is useful for LiveTV, when we do not want to pause the recorder for a SetOptionsFromProfile() call just because a new program is comming on.

See also
ChannelNameChanged(const QString&)

Definition at line 93 of file recorderbase.cpp.

Referenced by CheckForRingBufferSwitch(), TVRec::TuningNewRecorder(), TVRec::TuningRestartRecorder(), and ~RecorderBase().

◆ SetRingBuffer()

void RecorderBase::SetRingBuffer ( RingBuffer rbuf)

Tells recorder to use an externally created ringbuffer.

If this an external RingBuffer is set, it should be before any Initialize(), Open(), or StartRecorder() calls. Externally created RingBuffers are not deleted in the Recorder's destructor.

Definition at line 79 of file recorderbase.cpp.

Referenced by CheckForRingBufferSwitch(), TVRec::TuningFrequency(), TVRec::TuningNewRecorder(), and TVRec::TuningRestartRecorder().

◆ SetOption() [1/2]

void RecorderBase::SetOption ( const QString &  name,
const QString &  value 
)
virtual

Set an specific option.

Base options include: codec, videodevice, tvformat (ntsc,ntsc-jp,pal-m), vbiformat ("none","pal teletext","ntsc").

Reimplemented in NuppelVideoRecorder, DTVRecorder, V4LRecorder, and MpegRecorder.

Definition at line 153 of file recorderbase.cpp.

Referenced by SetIntOption(), DTVRecorder::SetOption(), and SetStrOption().

◆ SetOption() [2/2]

void RecorderBase::SetOption ( const QString &  name,
int  value 
)
virtual

Set an specific integer option.

There are no integer options in RecorderBase.

Reimplemented in NuppelVideoRecorder, DTVRecorder, V4LRecorder, and MpegRecorder.

Definition at line 192 of file recorderbase.cpp.

◆ SetBoolOption()

void RecorderBase::SetBoolOption ( const QString &  name,
bool  value 
)
inline

Set an specific boolean option.

This is a helper function to enforce type checking.

Definition at line 119 of file recorderbase.h.

◆ SetVideoFilters()

virtual void RecorderBase::SetVideoFilters ( QString &  filters)
pure virtual

Tells recorder which filters to use.

These filters are used by frame grabber encoders to lower the bitrate while keeping quality good. They must execute quickly so that frames are not lost by the recorder.

Implemented in NuppelVideoRecorder, DTVRecorder, and MpegRecorder.

Referenced by TVRec::SetVideoFiltersForChannel().

◆ SetOptionsFromProfile()

virtual void RecorderBase::SetOptionsFromProfile ( RecordingProfile profile,
const QString &  videodev,
const QString &  audiodev,
const QString &  vbidev 
)
pure virtual

Sets basic recorder options.

SetOptionsFromProfile is used to tell the recorder about the recording profile as well as the devices to use.

Implemented in NuppelVideoRecorder, ASIRecorder, FirewireRecorder, V4L2encRecorder, DTVRecorder, ImportRecorder, and MpegRecorder.

◆ SetNextRecording()

void RecorderBase::SetNextRecording ( const RecordingInfo ri,
RingBuffer rb 
)

Sets next recording info, to be applied as soon as practical.

This should not lose any frames on the switchover, and should initialize the RingBuffer stream with headers as appropriate.

The switch does not have to happen immediately, but should happen soon. (i.e. it can wait for a key frame..)

This calls TVRec::RingBufferChanged() when the switch happens.

Definition at line 124 of file recorderbase.cpp.

Referenced by TVRec::SwitchLiveTVRingBuffer(), and TVRec::SwitchRecordingRingBuffer().

◆ Initialize()

virtual void RecorderBase::Initialize ( void  )
pure virtual

This is called between SetOptionsFromProfile() and run() to initialize any devices, etc.

Implemented in NuppelVideoRecorder, DTVRecorder, and MpegRecorder.

Referenced by TVRec::TuningNewRecorder().

◆ run()

void RecorderBase::run ( void  )
overridepure virtual

run() starts the recording process, and does not exit until the recording is complete.

See also
StopRecording()

Implemented in NuppelVideoRecorder, ASIRecorder, FirewireRecorder, ImportRecorder, ExternalRecorder, V4L2encRecorder, MpegRecorder, IPTVRecorder, CetonRecorder, DVBRecorder, and HDHRRecorder.

◆ Reset()

virtual void RecorderBase::Reset ( void  )
pure virtual

Reset the recorder to the startup state.

This is used after Pause(bool), WaitForPause() and after the RingBuffer's StopReads() method has been called.

Implemented in NuppelVideoRecorder, DTVRecorder, and MpegRecorder.

Referenced by TVRec::TuningRestartRecorder().

◆ IsErrored()

virtual bool RecorderBase::IsErrored ( void  )
pure virtual

Tells us whether an unrecoverable error has been encountered.

Implemented in DTVRecorder.

Referenced by TVRec::run(), and TVRec::TuningNewRecorder().

◆ GetFramesWritten()

virtual long long RecorderBase::GetFramesWritten ( void  )
pure virtual

Returns number of frames written to disk.

It is not always safe to seek up to this frame in a player because frames may not be written in display order.

Implemented in NuppelVideoRecorder, DTVRecorder, and ImportRecorder.

Referenced by TVRec::GetFramesWritten().

◆ GetVideoFd()

virtual int RecorderBase::GetVideoFd ( void  )
pure virtual

Returns file descriptor of recorder device.

This is used by channel when only one open file descriptor is allowed on a device node. This is the case with video4linux devices and similar devices in BSD. It is not needed by newer drivers, such as those used for DVB.

Implemented in NuppelVideoRecorder, DTVRecorder, and MpegRecorder.

Referenced by TVRec::TuningNewRecorder(), and TVRec::TuningRestartRecorder().

◆ GetKeyframePosition()

long long RecorderBase::GetKeyframePosition ( long long  desired) const

Returns closest keyframe position before the desired frame.

This returns -1 if a keyframe position cannot be found for a frame. This could be true if the keyframe has not yet been seen by the recorder(unlikely), or if a keyframe map does not exist or is not up to date. The latter can happen because the video is an external video, because the database is corrupted, or because this is a live recording and it is being read by a remote frontend faster than the keyframes can be saved to the database.

Returns
Closest prior keyframe, or -1 if there is no prior known keyframe.

Definition at line 514 of file recorderbase.cpp.

Referenced by TVRec::GetKeyframePosition().

◆ GetKeyframePositions()

bool RecorderBase::GetKeyframePositions ( long long  start,
long long  end,
frm_pos_map_t map 
) const

Definition at line 533 of file recorderbase.cpp.

Referenced by TVRec::GetKeyframePositions().

◆ GetKeyframeDurations()

bool RecorderBase::GetKeyframeDurations ( long long  start,
long long  end,
frm_pos_map_t map 
) const

Definition at line 555 of file recorderbase.cpp.

Referenced by TVRec::GetKeyframeDurations().

◆ StopRecording()

void RecorderBase::StopRecording ( void  )
virtual

StopRecording() signals to the recorder that it should stop recording and exit cleanly.

This function should block until recorder has finished up.

Reimplemented in V4LRecorder.

Definition at line 224 of file recorderbase.cpp.

Referenced by V4LRecorder::StopRecording(), TVRec::TeardownRecorder(), DTVRecorder::~DTVRecorder(), and IPTVRecorder::~IPTVRecorder().

◆ IsRecording()

bool RecorderBase::IsRecording ( void  )
virtual

Tells whether the StartRecorder() loop is running.

Reimplemented in NuppelVideoRecorder, and MpegRecorder.

Definition at line 243 of file recorderbase.cpp.

Referenced by TVRec::IsReallyRecording(), and TVRec::TuningNewRecorder().

◆ IsRecordingRequested()

bool RecorderBase::IsRecordingRequested ( void  )
virtual

◆ GetRecordingQuality()

RecordingQuality * RecorderBase::GetRecordingQuality ( const RecordingInfo r) const
virtual

Returns a report about the current recordings quality.

Reimplemented in DTVRecorder, and ImportRecorder.

Definition at line 499 of file recorderbase.cpp.

Referenced by CheckForRingBufferSwitch(), DTVRecorder::GetRecordingQuality(), and TVRec::TeardownRecorder().

◆ Pause()

void RecorderBase::Pause ( bool  clear = true)
virtual

Pause tells recorder to pause, it should not block.

Once paused the recorder calls m_tvrec->RecorderPaused().

Parameters
clearif true any generated timecodes should be reset.
See also
Unpause(), WaitForPause()

Reimplemented in NuppelVideoRecorder, and MpegRecorder.

Definition at line 263 of file recorderbase.cpp.

Referenced by TVRec::PauseRecorder().

◆ Unpause()

void RecorderBase::Unpause ( void  )
virtual

Unpause tells recorder to unpause.

This is an asynchronous call it should not wait block waiting for the command to be processed.

Definition at line 274 of file recorderbase.cpp.

Referenced by TVRec::TuningRestartRecorder().

◆ IsPaused()

bool RecorderBase::IsPaused ( bool  holding_lock = false) const
virtual

◆ WaitForPause()

bool RecorderBase::WaitForPause ( int  timeout = 1000)
virtual

WaitForPause blocks until recorder is actually paused, or timeout milliseconds elapse.

Parameters
timeoutnumber of milliseconds to wait defaults to 1000.
Returns
true iff pause happened within timeout period.

Definition at line 298 of file recorderbase.cpp.

◆ GetFrameRate()

double RecorderBase::GetFrameRate ( void  ) const
inline

Returns the latest frame rate.

Definition at line 226 of file recorderbase.h.

Referenced by FinishRecording(), and TVRec::GetFramerate().

◆ CheckForRingBufferSwitch()

bool RecorderBase::CheckForRingBufferSwitch ( void  )
virtual

If requested, switch to new RingBuffer/ProgramInfo objects.

Definition at line 351 of file recorderbase.cpp.

Referenced by NuppelVideoRecorder::doWriteThread(), DTVRecorder::HandleH264Keyframe(), DTVRecorder::HandleKeyframe(), SavePositionMap(), and TVRec::SwitchLiveTVRingBuffer().

◆ SavePositionMap()

void RecorderBase::SavePositionMap ( bool  force = false,
bool  finished = false 
)

Save the seektable to the DB.

This saves the postition map delta to the database if force is true or there are 30 frames in the map or there are five frames in the map with less than 30 frames in the non-delta position map.

Parameters
forceIf true this forces a DB sync.
finishedIs this a finished recording?

Definition at line 585 of file recorderbase.cpp.

Referenced by FinishRecording(), TVRec::run(), and SetNextRecording().

◆ CreateRecorder()

RecorderBase * RecorderBase::CreateRecorder ( TVRec tvrec,
ChannelBase channel,
RecordingProfile profile,
const GeneralDBOptions genOpt 
)
static

Definition at line 839 of file recorderbase.cpp.

Referenced by TVRec::TuningNewRecorder().

◆ SetIntOption()

void RecorderBase::SetIntOption ( RecordingProfile profile,
const QString &  name 
)
protected

Convenience function used to set integer options from a profile.

See also
SetOption(const QString&, int)

Definition at line 199 of file recorderbase.cpp.

Referenced by DTVRecorder::SetOptionsFromProfile(), ASIRecorder::SetOptionsFromProfile(), and NuppelVideoRecorder::SetOptionsFromProfile().

◆ SetStrOption()

void RecorderBase::SetStrOption ( RecordingProfile profile,
const QString &  name 
)
protected

Convenience function used to set QString options from a profile.

See also
SetOption(const QString&, const QString&)

Definition at line 209 of file recorderbase.cpp.

Referenced by DTVRecorder::SetOptionsFromProfile().

◆ PauseAndWait()

bool RecorderBase::PauseAndWait ( int  timeout = 100)
protectedvirtual

If m_request_pause is true, sets pause and blocks up to timeout milliseconds or until unpaused, whichever is sooner.

This is the where we actually do the pausing. For most recorders that need to do something special on pause, this is the method to overide.

Parameters
timeoutnumber of milliseconds to wait defaults to 100.
Returns
true if recorder is paused.

Reimplemented in FirewireRecorder, ExternalRecorder, V4L2encRecorder, CetonRecorder, MpegRecorder, HDHRRecorder, DVBRecorder, and IPTVRecorder.

Definition at line 326 of file recorderbase.cpp.

Referenced by ASIRecorder::run(), and V4LRecorder::RunVBIDevice().

◆ ResetForNewFile()

virtual void RecorderBase::ResetForNewFile ( void  )
protectedpure virtual

Implemented in NuppelVideoRecorder, and DTVRecorder.

Referenced by CheckForRingBufferSwitch().

◆ SetRecordingStatus()

void RecorderBase::SetRecordingStatus ( RecStatus::Type  status,
const QString &  file,
int  line 
)
protectedvirtual

◆ ClearStatistics()

void RecorderBase::ClearStatistics ( void  )
protectedvirtual

Reimplemented in DTVRecorder.

Definition at line 423 of file recorderbase.cpp.

Referenced by DTVRecorder::ClearStatistics(), and RecorderBase().

◆ FinishRecording()

void RecorderBase::FinishRecording ( void  )
protectedvirtual

Reimplemented in NuppelVideoRecorder, and DTVRecorder.

Definition at line 434 of file recorderbase.cpp.

Referenced by CheckForRingBufferSwitch(), and DTVRecorder::FinishRecording().

◆ StartNewFile()

virtual void RecorderBase::StartNewFile ( void  )
inlineprotectedvirtual

◆ SetPositionMapType()

void RecorderBase::SetPositionMapType ( MarkTypes  type)
inlineprotected

Set seektable type.

Definition at line 271 of file recorderbase.h.

Referenced by DTVRecorder::DTVRecorder(), and NuppelVideoRecorder::NuppelVideoRecorder().

◆ AspectChange()

void RecorderBase::AspectChange ( uint  aspect,
long long  frame 
)
protected

Note a change in aspect ratio in the recordedmark table.

Definition at line 726 of file recorderbase.cpp.

Referenced by DTVRecorder::FindH264Keyframes(), DTVRecorder::FindMPEG2Keyframes(), DTVRecorder::FindPSKeyFrames(), and NuppelVideoRecorder::UpdateResolutions().

◆ ResolutionChange()

void RecorderBase::ResolutionChange ( uint  width,
uint  height,
long long  frame 
)
protected

Note a change in video size in the recordedmark table.

Definition at line 777 of file recorderbase.cpp.

Referenced by DTVRecorder::FindH264Keyframes(), DTVRecorder::FindMPEG2Keyframes(), DTVRecorder::FindPSKeyFrames(), and NuppelVideoRecorder::UpdateResolutions().

◆ FrameRateChange()

void RecorderBase::FrameRateChange ( uint  framerate,
long long  frame 
)
protected

Note a change in video frame rate in the recordedmark table.

Definition at line 793 of file recorderbase.cpp.

Referenced by DTVRecorder::FindH264Keyframes(), DTVRecorder::FindMPEG2Keyframes(), DTVRecorder::FindPSKeyFrames(), and NuppelVideoRecorder::UpdateResolutions().

◆ VideoCodecChange()

void RecorderBase::VideoCodecChange ( AVCodecID  vCodec)
protected

Note a change in video codec.

Definition at line 808 of file recorderbase.cpp.

Referenced by DTVRecorder::HandleSingleProgramPMT().

◆ AudioCodecChange()

void RecorderBase::AudioCodecChange ( AVCodecID  aCodec)
protected

Note a change in audio codec.

Definition at line 817 of file recorderbase.cpp.

Referenced by DTVRecorder::HandleSingleProgramPMT().

◆ SetDuration()

void RecorderBase::SetDuration ( uint64_t  duration)
protected

Note the total duration in the recordedmark table.

Definition at line 826 of file recorderbase.cpp.

Referenced by DTVRecorder::FinishRecording().

◆ SetTotalFrames()

void RecorderBase::SetTotalFrames ( uint64_t  total_frames)
protected

Note the total frames in the recordedmark table.

Definition at line 832 of file recorderbase.cpp.

Referenced by DTVRecorder::FinishRecording().

◆ TryWriteProgStartMark()

void RecorderBase::TryWriteProgStartMark ( const frm_pos_map_t durationDeltaCopy)
protected

Definition at line 651 of file recorderbase.cpp.

Referenced by SavePositionMap().

Friends And Related Function Documentation

◆ Transcode

friend class Transcode
friend

Definition at line 68 of file recorderbase.h.

Member Data Documentation

◆ m_tvrec

TVRec* RecorderBase::m_tvrec {nullptr}
protected

◆ m_ringBuffer

RingBuffer* RecorderBase::m_ringBuffer {nullptr}
protected

◆ m_weMadeBuffer

bool RecorderBase::m_weMadeBuffer {true}
protected

◆ m_containerFormat

AVContainer RecorderBase::m_containerFormat {formatUnknown}
protected

◆ m_primaryVideoCodec

AVCodecID RecorderBase::m_primaryVideoCodec {AV_CODEC_ID_NONE}
protected

Definition at line 308 of file recorderbase.h.

Referenced by FinishRecording(), and DTVRecorder::HandleSingleProgramPMT().

◆ m_primaryAudioCodec

AVCodecID RecorderBase::m_primaryAudioCodec {AV_CODEC_ID_NONE}
protected

Definition at line 309 of file recorderbase.h.

Referenced by FinishRecording(), and DTVRecorder::HandleSingleProgramPMT().

◆ m_videocodec

QString RecorderBase::m_videocodec {"rtjpeg"}
protected

◆ m_videodevice

QString RecorderBase::m_videodevice
protected

◆ m_ntsc

bool RecorderBase::m_ntsc {true}
protected

◆ m_ntsc_framerate

bool RecorderBase::m_ntsc_framerate {true}
protected

Definition at line 314 of file recorderbase.h.

Referenced by NuppelVideoRecorder::BufferIt().

◆ m_video_frame_rate

double RecorderBase::m_video_frame_rate {29.97}
protected

◆ m_videoAspect

uint RecorderBase::m_videoAspect {0}
protected

◆ m_videoHeight

uint RecorderBase::m_videoHeight {0}
protected

◆ m_videoWidth

uint RecorderBase::m_videoWidth {0}
protected

◆ m_frameRate

FrameRate RecorderBase::m_frameRate {0}
protected

◆ m_curRecording

RecordingInfo* RecorderBase::m_curRecording {nullptr}
protected

◆ m_pauseLock

QMutex RecorderBase::m_pauseLock
mutableprotected

◆ m_request_pause

bool RecorderBase::m_request_pause {false}
protected

◆ m_paused

bool RecorderBase::m_paused {false}
protected

◆ m_pauseWait

QWaitCondition RecorderBase::m_pauseWait
protected

◆ m_unpauseWait

QWaitCondition RecorderBase::m_unpauseWait
protected

◆ m_request_recording

bool RecorderBase::m_request_recording {false}
protected

◆ m_recording

bool RecorderBase::m_recording {false}
protected

◆ m_recordingWait

QWaitCondition RecorderBase::m_recordingWait
protected

◆ m_nextRingBufferLock

QMutex RecorderBase::m_nextRingBufferLock
protected

Definition at line 339 of file recorderbase.h.

Referenced by CheckForRingBufferSwitch(), SetNextRecording(), and ~RecorderBase().

◆ m_nextRingBuffer

RingBuffer* RecorderBase::m_nextRingBuffer {nullptr}
protected

Definition at line 340 of file recorderbase.h.

Referenced by CheckForRingBufferSwitch(), SetNextRecording(), and ~RecorderBase().

◆ m_nextRecording

RecordingInfo* RecorderBase::m_nextRecording {nullptr}
protected

Definition at line 341 of file recorderbase.h.

Referenced by CheckForRingBufferSwitch(), SetNextRecording(), and ~RecorderBase().

◆ m_ringBufferCheckTimer

MythTimer RecorderBase::m_ringBufferCheckTimer
protected

Definition at line 342 of file recorderbase.h.

Referenced by CheckForRingBufferSwitch(), and SavePositionMap().

◆ m_positionMapType

MarkTypes RecorderBase::m_positionMapType {MARK_GOP_BYFRAME}
protected

Definition at line 345 of file recorderbase.h.

Referenced by SavePositionMap().

◆ m_positionMapLock

QMutex RecorderBase::m_positionMapLock
mutableprotected

◆ m_positionMap

frm_pos_map_t RecorderBase::m_positionMap
protected

◆ m_positionMapDelta

frm_pos_map_t RecorderBase::m_positionMapDelta
protected

◆ m_durationMap

frm_pos_map_t RecorderBase::m_durationMap
protected

◆ m_durationMapDelta

frm_pos_map_t RecorderBase::m_durationMapDelta
protected

◆ m_positionMapTimer

MythTimer RecorderBase::m_positionMapTimer
protected

Definition at line 351 of file recorderbase.h.

Referenced by SavePositionMap().

◆ m_estimatedProgStartMS

qint64 RecorderBase::m_estimatedProgStartMS {0}
protected

Definition at line 354 of file recorderbase.h.

Referenced by SetRecording(), and TryWriteProgStartMark().

◆ m_lastSavedKeyframe

long long RecorderBase::m_lastSavedKeyframe {0}
protected

Definition at line 355 of file recorderbase.h.

Referenced by TryWriteProgStartMark().

◆ m_lastSavedDuration

long long RecorderBase::m_lastSavedDuration {0}
protected

Definition at line 356 of file recorderbase.h.

Referenced by TryWriteProgStartMark().

◆ m_statisticsLock

QMutex RecorderBase::m_statisticsLock
mutableprotected

◆ m_timeOfFirstDataIsSet

QAtomicInt RecorderBase::m_timeOfFirstDataIsSet
protected

Definition at line 364 of file recorderbase.h.

Referenced by DTVRecorder::BufferedWrite(), and ClearStatistics().

◆ m_timeOfFirstData

QDateTime RecorderBase::m_timeOfFirstData
protected

◆ m_timeOfLatestDataCount

QAtomicInt RecorderBase::m_timeOfLatestDataCount
protected

Definition at line 366 of file recorderbase.h.

Referenced by DTVRecorder::BufferedWrite(), and ClearStatistics().

◆ m_timeOfLatestDataPacketInterval

QAtomicInt RecorderBase::m_timeOfLatestDataPacketInterval
protected

Definition at line 367 of file recorderbase.h.

Referenced by DTVRecorder::BufferedWrite(), and ClearStatistics().

◆ m_timeOfLatestData

QDateTime RecorderBase::m_timeOfLatestData
protected

◆ m_timeOfLatestDataTimer

MythTimer RecorderBase::m_timeOfLatestDataTimer
protected

Definition at line 369 of file recorderbase.h.

Referenced by DTVRecorder::BufferedWrite().

◆ m_recordingGaps

RecordingGaps RecorderBase::m_recordingGaps
protected

◆ kTimeOfLatestDataIntervalTarget

const uint RecorderBase::kTimeOfLatestDataIntervalTarget = 5000
staticprotected

timeOfLatest update interval target in milliseconds.

Definition at line 372 of file recorderbase.h.

Referenced by DTVRecorder::BufferedWrite().


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