MythTV  0.27pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
DTVRecorder Class Reference

This is a specialization of RecorderBase used to handle MPEG-2, MPEG-4, MPEG-4 AVC, DVB and ATSC streams. More...

#include <dtvrecorder.h>

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

Public Member Functions

 DTVRecorder (TVRec *rec)
virtual ~DTVRecorder ()
virtual void SetOption (const QString &opt, const QString &value)
 Set an specific option.
virtual void SetOption (const QString &name, int value)
 handles the "wait_for_seqstart" option.
virtual void SetOptionsFromProfile (RecordingProfile *profile, const QString &videodev, const QString &, const QString &)
 Sets basic recorder options.
bool IsErrored (void)
 Tells us whether an unrecoverable error has been encountered.
long long GetFramesWritten (void)
 Returns number of frames written to disk.
void SetVideoFilters (QString &)
 Tells recorder which filters to use.
void Initialize (void)
 This is called between SetOptionsFromProfile() and run() to initialize any devices, etc.
int GetVideoFd (void)
 Returns file descriptor of recorder device.
virtual void SetStreamData (MPEGStreamData *sd)
MPEGStreamDataGetStreamData (void) const
virtual void Reset (void)
 Reset the recorder to the startup state.
virtual void ClearStatistics (void)
virtual RecordingQualityGetRecordingQuality (const RecordingInfo *) const
 Returns a report about the current recordings quality.
void HandlePAT (const ProgramAssociationTable *)
void HandleCAT (const ConditionalAccessTable *)
void HandlePMT (uint pid, const ProgramMapTable *)
void HandleEncryptionStatus (uint, bool)
void HandleSingleProgramPAT (ProgramAssociationTable *pat, bool insert)
void HandleSingleProgramPMT (ProgramMapTable *pmt, bool insert)
void HandleSTT (const SystemTimeTable *)
void HandleVCT (uint, const VirtualChannelTable *)
void HandleMGT (const MasterGuideTable *)
void HandleTDT (const TimeDateTable *)
void HandleNIT (const NetworkInformationTable *)
void HandleSDT (uint, const ServiceDescriptionTable *)
bool ProcessTSPacket (const TSPacket &tspacket)
bool ProcessVideoTSPacket (const TSPacket &tspacket)
bool ProcessAudioTSPacket (const TSPacket &tspacket)
bool ProcessAVTSPacket (const TSPacket &tspacket)
 Common code for processing either audio or video packets.
- Public Member Functions inherited from RecorderBase
 RecorderBase (TVRec *rec)
virtual ~RecorderBase ()
void SetFrameRate (double rate)
 Sets the video frame rate.
void SetRecording (const RecordingInfo *pginfo)
 Changes the Recording from the one set initially with SetOptionsFromProfile().
void SetRingBuffer (RingBuffer *rbuf)
 Tells recorder to use an externally created ringbuffer.
void SetNextRecording (const RecordingInfo *, RingBuffer *)
 Sets next recording info, to be applied as soon as practical.
virtual void run (void)=0
 run() starts the recording process, and does not exit until the recording is complete.
int64_t GetKeyframePosition (uint64_t desired) const
 Returns closest keyframe position before the desired frame.
bool GetKeyframePositions (int64_t start, int64_t end, frm_pos_map_t &) const
bool GetKeyframeDurations (int64_t start, int64_t end, frm_pos_map_t &) const
virtual void StopRecording (void)
 StopRecording() signals to the recorder that it should stop recording and exit cleanly.
virtual bool IsRecording (void)
 Tells whether the StartRecorder() loop is running.
virtual bool IsRecordingRequested (void)
 Tells us if StopRecording() has been called.
virtual void Pause (bool clear=true)
 Pause tells recorder to pause, it should not block.
virtual void Unpause (void)
 Unpause tells recorder to unpause.
virtual bool IsPaused (bool holding_lock=false) const
 Returns true iff recorder is paused.
virtual bool WaitForPause (int timeout=1000)
 WaitForPause blocks until recorder is actually paused, or timeout milliseconds elapse.
double GetFrameRate (void) const
 Returns the latest frame rate.
virtual void CheckForRingBufferSwitch (void)
 If requested, switch to new RingBuffer/ProgramInfo objects.
void SavePositionMap (bool force=false)
 Save the seektable to the DB.
- Public Member Functions inherited from MPEGStreamListener
virtual void HandleSplice (const SpliceInformationTable *)

Protected Member Functions

virtual void InitStreamData (void)
void FinishRecording (void)
 Flushes the ringbuffer, and if this is not a live LiveTV recording saves the position map and filesize.
void ResetForNewFile (void)
void HandleKeyframe (int64_t extra)
 This save the current frame to the position maps and handles ringbuffer switching.
void HandleTimestamps (int stream_id, int64_t pts, int64_t dts)
void UpdateFramesWritten (void)
void BufferedWrite (const TSPacket &tspacket, bool insert=false)
bool FindAudioKeyframes (const TSPacket *tspacket)
bool FindMPEG2Keyframes (const TSPacket *tspacket)
 Locates the keyframes and saves them to the position map.
bool FindH264Keyframes (const TSPacket *tspacket)
 This searches the TS packet to identify keyframes.
void HandleH264Keyframe (void)
 This save the current frame to the position maps and handles ringbuffer switching.
void FindPSKeyFrames (const uint8_t *buffer, uint len)
bool FindOtherKeyframes (const TSPacket *tspacket)
 Non-Audio/Video data.
bool CheckCC (uint pid, uint cc)
virtual QString GetSIStandard (void) const
virtual void SetCAMPMT (const ProgramMapTable *)
virtual void UpdateCAMTimeOffset (void)
- Protected Member Functions inherited from RecorderBase
void SetIntOption (RecordingProfile *profile, const QString &name)
 Convenience function used to set integer options from a profile.
void SetStrOption (RecordingProfile *profile, const QString &name)
 Convenience function used to set QString options from a profile.
virtual bool PauseAndWait (int timeout=100)
 If request_pause is true, sets pause and blocks up to timeout milliseconds or until unpaused, whichever is sooner.
virtual void StartNewFile (void)
void SetPositionMapType (MarkTypes type)
 Set seektable type.
void AspectChange (uint ratio, long long frame)
 Note a change in aspect ratio in the recordedmark table.
void ResolutionChange (uint width, uint height, long long frame)
 Note a change in video size in the recordedmark table.
void FrameRateChange (uint framerate, long long frame)
 Note a change in video frame rate in the recordedmark table.
void SetDuration (uint64_t duration)
 Note the total duration in the recordedmark table.
void SetTotalFrames (uint64_t total_frames)
 Note the total frames in the recordedmark table.
- Protected Member Functions inherited from MPEGStreamListener
virtual ~MPEGStreamListener ()
- Protected Member Functions inherited from MPEGSingleProgramStreamListener
virtual ~MPEGSingleProgramStreamListener ()
- Protected Member Functions inherited from DVBMainStreamListener
virtual ~DVBMainStreamListener ()
- Protected Member Functions inherited from ATSCMainStreamListener
virtual ~ATSCMainStreamListener ()
- Protected Member Functions inherited from TSPacketListener
virtual ~TSPacketListener ()
- Protected Member Functions inherited from TSPacketListenerAV
virtual ~TSPacketListenerAV ()

Protected Attributes

int _stream_fd
QString _recording_type
QTime _audio_timer
uint32_t _start_code
int _first_keyframe
unsigned long long _last_gop_seen
unsigned long long _last_seq_seen
unsigned long long _last_keyframe_seen
unsigned int _audio_bytes_remaining
unsigned int _video_bytes_remaining
unsigned int _other_bytes_remaining
int _progressive_sequence
int _repeat_pict
bool _pes_synced
bool _seen_sps
H264Parser m_h264_parser
bool _wait_for_keyframe_option
 Wait for the a GOP/SEQ-start before sending data.
bool _has_written_other_keyframe
QString _error
 non-empty iff irrecoverable recording error detected
MPEGStreamData_stream_data
bool _buffer_packets
vector< unsigned char > _payload_buffer
QMutex _pid_lock
ProgramAssociationTable_input_pat
 PAT on input side.
ProgramMapTable_input_pmt
 PMT on input side.
bool _has_no_av
unsigned char _stream_id [0x1fff+1]
unsigned char _pid_status [0x1fff+1]
unsigned char _continuity_counter [0x1fff+1]
vector< TSPacket_scratch
bool _use_pts
uint64_t _ts_count [256]
int64_t _ts_last [256]
int64_t _ts_first [256]
QDateTime _ts_first_dt [256]
QAtomicInt _packet_count
QAtomicInt _continuity_error_count
unsigned long long _frames_seen_count
unsigned long long _frames_written_count
double _total_duration
double _td_base
uint64_t _td_tick_count
FrameRate _td_tick_framerate
- Protected Attributes inherited from RecorderBase
TVRectvrec
RingBufferringBuffer
bool weMadeBuffer
QString videocodec
QString videodevice
bool ntsc
bool ntsc_framerate
double video_frame_rate
uint m_videoAspect
uint m_videoHeight
uint m_videoWidth
FrameRate m_frameRate
RecordingInfocurRecording
QMutex pauseLock
bool request_pause
bool paused
QWaitCondition pauseWait
QWaitCondition unpauseWait
bool request_recording
 True if API call has requested a recording be [re]started.
bool recording
 True while recording is actually being performed.
QWaitCondition recordingWait
QMutex nextRingBufferLock
RingBuffernextRingBuffer
RecordingInfonextRecording
MarkTypes positionMapType
QMutex positionMapLock
frm_pos_map_t positionMap
frm_pos_map_t positionMapDelta
frm_pos_map_t durationMap
frm_pos_map_t durationMapDelta
MythTimer positionMapTimer
QMutex statisticsLock
QAtomicInt timeOfFirstDataIsSet
QDateTime timeOfFirstData
QAtomicInt timeOfLatestDataCount
QAtomicInt timeOfLatestDataPacketInterval
QDateTime timeOfLatestData
MythTimer timeOfLatestDataTimer
RecordingGaps recordingGaps

Static Protected Attributes

static const uint kMaxKeyFrameDistance = 80
 If the number of regular frames detected since the last detected keyframe exceeds this value, then we begin marking random regular frames as keyframes.
static const unsigned char kPayloadStartSeen = 0x2
- Static Protected Attributes inherited from RecorderBase
static const uint kTimeOfLatestDataIntervalTarget = 5000
 timeOfLatest update interval target in milliseconds.

Additional Inherited Members

- Public Types inherited from RecorderBase
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
}
- Static Public Member Functions inherited from RecorderBase
static RecorderBaseCreateRecorder (TVRec *tvrec, ChannelBase *channel, const RecordingProfile &profile, const GeneralDBOptions &genOpt, const DVBDBOptions &dvbOpt)

Detailed Description

This is a specialization of RecorderBase used to handle MPEG-2, MPEG-4, MPEG-4 AVC, DVB and ATSC streams.

See Also
DBox2Recorder, DVBRecorder, FirewireRecorder, HDHRRecoreder, IPTVRecorder

Definition at line 26 of file dtvrecorder.h.

Constructor & Destructor Documentation

DTVRecorder::DTVRecorder ( TVRec rec)

Definition at line 49 of file dtvrecorder.cpp.

DTVRecorder::~DTVRecorder ( )
virtual

Definition at line 100 of file dtvrecorder.cpp.

Member Function Documentation

void DTVRecorder::SetOption ( const QString &  opt,
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 from RecorderBase.

Reimplemented in NuppelVideoRecorder, V4LRecorder, and MpegRecorder.

Definition at line 119 of file dtvrecorder.cpp.

Referenced by V4LRecorder::SetOption(), SetOption(), ImportRecorder::SetOptionsFromProfile(), and SetOptionsFromProfile().

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

handles the "wait_for_seqstart" option.

Reimplemented from RecorderBase.

Reimplemented in NuppelVideoRecorder, ASIRecorder, V4LRecorder, and MpegRecorder.

Definition at line 133 of file dtvrecorder.cpp.

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

Sets basic recorder options.

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

Implements RecorderBase.

Reimplemented in NuppelVideoRecorder, ASIRecorder, FirewireRecorder, ImportRecorder, and MpegRecorder.

Definition at line 141 of file dtvrecorder.cpp.

bool DTVRecorder::IsErrored ( void  )
inlinevirtual
long long DTVRecorder::GetFramesWritten ( void  )
inlinevirtual

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.

Implements RecorderBase.

Reimplemented in NuppelVideoRecorder.

Definition at line 47 of file dtvrecorder.h.

Referenced by MpegRecorder::run().

void DTVRecorder::SetVideoFilters ( QString &  filters)
inlinevirtual

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.

Implements RecorderBase.

Reimplemented in NuppelVideoRecorder, and MpegRecorder.

Definition at line 49 of file dtvrecorder.h.

void DTVRecorder::Initialize ( void  )
inlinevirtual

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

Implements RecorderBase.

Reimplemented in NuppelVideoRecorder, and MpegRecorder.

Definition at line 50 of file dtvrecorder.h.

int DTVRecorder::GetVideoFd ( void  )
inlinevirtual

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.

Implements RecorderBase.

Reimplemented in NuppelVideoRecorder, and MpegRecorder.

Definition at line 51 of file dtvrecorder.h.

void DTVRecorder::SetStreamData ( MPEGStreamData sd)
virtual
MPEGStreamData* DTVRecorder::GetStreamData ( void  ) const
inline
void DTVRecorder::Reset ( void  )
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.

Implements RecorderBase.

Reimplemented in NuppelVideoRecorder, and MpegRecorder.

Definition at line 229 of file dtvrecorder.cpp.

void DTVRecorder::ClearStatistics ( void  )
virtual

Reimplemented from RecorderBase.

Definition at line 208 of file dtvrecorder.cpp.

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

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

Returns a report about the current recordings quality.

Reimplemented from RecorderBase.

Definition at line 1426 of file dtvrecorder.cpp.

void DTVRecorder::HandlePAT ( const ProgramAssociationTable _pat)
virtual

Implements MPEGStreamListener.

Definition at line 1202 of file dtvrecorder.cpp.

void DTVRecorder::HandleCAT ( const ConditionalAccessTable )
inlinevirtual

Implements MPEGStreamListener.

Definition at line 62 of file dtvrecorder.h.

void DTVRecorder::HandlePMT ( uint  pid,
const ProgramMapTable _pmt 
)
virtual

Implements MPEGStreamListener.

Definition at line 1239 of file dtvrecorder.cpp.

void DTVRecorder::HandleEncryptionStatus ( uint  ,
bool   
)
inlinevirtual

Implements MPEGStreamListener.

Definition at line 64 of file dtvrecorder.h.

void DTVRecorder::HandleSingleProgramPAT ( ProgramAssociationTable pat,
bool  insert 
)
virtual
void DTVRecorder::HandleSingleProgramPMT ( ProgramMapTable pmt,
bool  insert 
)
virtual
void DTVRecorder::HandleSTT ( const SystemTimeTable )
inlinevirtual

Implements ATSCMainStreamListener.

Definition at line 71 of file dtvrecorder.h.

void DTVRecorder::HandleVCT ( uint  ,
const VirtualChannelTable  
)
inlinevirtual

Implements ATSCMainStreamListener.

Definition at line 72 of file dtvrecorder.h.

void DTVRecorder::HandleMGT ( const MasterGuideTable )
inlinevirtual

Implements ATSCMainStreamListener.

Definition at line 73 of file dtvrecorder.h.

void DTVRecorder::HandleTDT ( const TimeDateTable )
inlinevirtual

Implements DVBMainStreamListener.

Definition at line 76 of file dtvrecorder.h.

void DTVRecorder::HandleNIT ( const NetworkInformationTable )
inlinevirtual

Implements DVBMainStreamListener.

Definition at line 77 of file dtvrecorder.h.

void DTVRecorder::HandleSDT ( uint  ,
const ServiceDescriptionTable  
)
inlinevirtual

Implements DVBMainStreamListener.

Definition at line 78 of file dtvrecorder.h.

bool DTVRecorder::ProcessTSPacket ( const TSPacket tspacket)
virtual

Implements TSPacketListener.

Reimplemented in FirewireRecorder, and MpegRecorder.

Definition at line 1307 of file dtvrecorder.cpp.

bool DTVRecorder::ProcessVideoTSPacket ( const TSPacket tspacket)
virtual

Implements TSPacketListenerAV.

Definition at line 1346 of file dtvrecorder.cpp.

bool DTVRecorder::ProcessAudioTSPacket ( const TSPacket tspacket)
virtual

Implements TSPacketListenerAV.

Definition at line 1371 of file dtvrecorder.cpp.

bool DTVRecorder::ProcessAVTSPacket ( const TSPacket tspacket)

Common code for processing either audio or video packets.

Definition at line 1387 of file dtvrecorder.cpp.

Referenced by ProcessAudioTSPacket(), and ProcessVideoTSPacket().

void DTVRecorder::InitStreamData ( void  )
protectedvirtual

Reimplemented in FirewireRecorder, and ImportRecorder.

Definition at line 257 of file dtvrecorder.cpp.

Referenced by SetStreamData().

void DTVRecorder::FinishRecording ( void  )
protectedvirtual

Flushes the ringbuffer, and if this is not a live LiveTV recording saves the position map and filesize.

Implements RecorderBase.

Reimplemented in NuppelVideoRecorder.

Definition at line 154 of file dtvrecorder.cpp.

Referenced by HDHRRecorder::run(), CetonRecorder::run(), DVBRecorder::run(), MpegRecorder::run(), IPTVRecorder::run(), ImportRecorder::run(), FirewireRecorder::run(), and ASIRecorder::run().

void DTVRecorder::ResetForNewFile ( void  )
protectedvirtual
void DTVRecorder::HandleKeyframe ( int64_t  extra)
protected

This save the current frame to the position maps and handles ringbuffer switching.

Definition at line 765 of file dtvrecorder.cpp.

Referenced by FindAudioKeyframes(), FindMPEG2Keyframes(), FindOtherKeyframes(), and FindPSKeyFrames().

void DTVRecorder::HandleTimestamps ( int  stream_id,
int64_t  pts,
int64_t  dts 
)
protected

Definition at line 604 of file dtvrecorder.cpp.

Referenced by FindMPEG2Keyframes().

void DTVRecorder::UpdateFramesWritten ( void  )
protected
void DTVRecorder::BufferedWrite ( const TSPacket tspacket,
bool  insert = false 
)
protected
bool DTVRecorder::FindAudioKeyframes ( const TSPacket tspacket)
protected

Definition at line 700 of file dtvrecorder.cpp.

Referenced by ProcessAudioTSPacket(), and FirewireRecorder::ProcessTSPacket().

bool DTVRecorder::FindMPEG2Keyframes ( const TSPacket tspacket)
protected

Locates the keyframes and saves them to the position map.

This searches for three magic integers in the stream. The picture start code 0x00000100, the GOP code 0x000001B8, and the sequence start code 0x000001B3. The GOP code is prefered, but is only required of MPEG1 streams, the sequence start code is a decent fallback for MPEG2 streams, and if all else fails we just look for the picture start codes and call every 16th frame a keyframe.

NOTE: This does not only find keyframes but also tracks the total frames as well. At least a couple times seeking has been broken by short-circuiting the search once a keyframe stream id has been found. This may work on some channels, but will break on others so algorithmic optimizations should be done with great care.

PES header format
byte 0 byte 1 byte 2 byte 3 [byte 4 byte 5]
0x00 0x00 0x01 PESStreamID PES packet length
Returns
Returns true if packet[s] should be output.

Definition at line 410 of file dtvrecorder.cpp.

Referenced by FirewireRecorder::ProcessTSPacket(), and ProcessVideoTSPacket().

bool DTVRecorder::FindH264Keyframes ( const TSPacket tspacket)
protected

This searches the TS packet to identify keyframes.

Parameters
TSPacketPointer the the TS packet data.
Returns
Returns true if a keyframe has been found.

Definition at line 801 of file dtvrecorder.cpp.

Referenced by ProcessVideoTSPacket().

void DTVRecorder::HandleH264Keyframe ( void  )
protected

This save the current frame to the position maps and handles ringbuffer switching.

Definition at line 986 of file dtvrecorder.cpp.

Referenced by FindH264Keyframes().

void DTVRecorder::FindPSKeyFrames ( const uint8_t *  buffer,
uint  len 
)
protected

Definition at line 1014 of file dtvrecorder.cpp.

Referenced by MpegRecorder::run().

bool DTVRecorder::FindOtherKeyframes ( const TSPacket tspacket)
protected

Non-Audio/Video data.

For streams which contain no audio/video, write just 1 key-frame at the start.

Definition at line 739 of file dtvrecorder.cpp.

Referenced by ProcessTSPacket().

bool DTVRecorder::CheckCC ( uint  pid,
uint  cc 
)
inlineprotected

Definition at line 201 of file dtvrecorder.h.

Referenced by ProcessAVTSPacket(), and ProcessTSPacket().

virtual QString DTVRecorder::GetSIStandard ( void  ) const
inlineprotectedvirtual

Reimplemented in CetonRecorder, and HDHRRecorder.

Definition at line 120 of file dtvrecorder.h.

Referenced by HandlePMT().

virtual void DTVRecorder::SetCAMPMT ( const ProgramMapTable )
inlineprotectedvirtual

Definition at line 121 of file dtvrecorder.h.

Referenced by HandlePMT().

virtual void DTVRecorder::UpdateCAMTimeOffset ( void  )
inlineprotectedvirtual

Definition at line 122 of file dtvrecorder.h.

Member Data Documentation

int DTVRecorder::_stream_fd
protected

Definition at line 125 of file dtvrecorder.h.

QString DTVRecorder::_recording_type
protected

Definition at line 127 of file dtvrecorder.h.

Referenced by MpegRecorder::run(), and SetOption().

QTime DTVRecorder::_audio_timer
protected

Definition at line 130 of file dtvrecorder.h.

Referenced by FindAudioKeyframes().

uint32_t DTVRecorder::_start_code
protected
int DTVRecorder::_first_keyframe
protected
unsigned long long DTVRecorder::_last_gop_seen
protected

Definition at line 133 of file dtvrecorder.h.

Referenced by FindMPEG2Keyframes(), FindPSKeyFrames(), and ResetForNewFile().

unsigned long long DTVRecorder::_last_seq_seen
protected

Definition at line 134 of file dtvrecorder.h.

Referenced by FindMPEG2Keyframes(), FindPSKeyFrames(), and ResetForNewFile().

unsigned long long DTVRecorder::_last_keyframe_seen
protected
unsigned int DTVRecorder::_audio_bytes_remaining
protected

Definition at line 136 of file dtvrecorder.h.

Referenced by FindPSKeyFrames(), and ResetForNewFile().

unsigned int DTVRecorder::_video_bytes_remaining
protected

Definition at line 137 of file dtvrecorder.h.

Referenced by FindPSKeyFrames(), and ResetForNewFile().

unsigned int DTVRecorder::_other_bytes_remaining
protected

Definition at line 138 of file dtvrecorder.h.

Referenced by FindPSKeyFrames(), and ResetForNewFile().

int DTVRecorder::_progressive_sequence
protected

Definition at line 141 of file dtvrecorder.h.

Referenced by FindMPEG2Keyframes(), and ResetForNewFile().

int DTVRecorder::_repeat_pict
protected

Definition at line 142 of file dtvrecorder.h.

Referenced by FindMPEG2Keyframes(), ResetForNewFile(), and UpdateFramesWritten().

bool DTVRecorder::_pes_synced
protected

Definition at line 145 of file dtvrecorder.h.

Referenced by FindH264Keyframes().

bool DTVRecorder::_seen_sps
protected
H264Parser DTVRecorder::m_h264_parser
protected
bool DTVRecorder::_wait_for_keyframe_option
protected
bool DTVRecorder::_has_written_other_keyframe
protected

Definition at line 152 of file dtvrecorder.h.

Referenced by FindOtherKeyframes(), and ResetForNewFile().

QString DTVRecorder::_error
protected
MPEGStreamData* DTVRecorder::_stream_data
protected
bool DTVRecorder::_buffer_packets
protected
vector<unsigned char> DTVRecorder::_payload_buffer
protected
QMutex DTVRecorder::_pid_lock
mutableprotected

Definition at line 165 of file dtvrecorder.h.

Referenced by HandlePAT(), and HandlePMT().

ProgramAssociationTable* DTVRecorder::_input_pat
protected

PAT on input side.

Definition at line 166 of file dtvrecorder.h.

Referenced by HandlePAT(), and ~DTVRecorder().

ProgramMapTable* DTVRecorder::_input_pmt
protected
bool DTVRecorder::_has_no_av
protected

Definition at line 168 of file dtvrecorder.h.

Referenced by HandlePMT(), and ProcessTSPacket().

unsigned char DTVRecorder::_stream_id[0x1fff+1]
protected

Definition at line 171 of file dtvrecorder.h.

Referenced by DTVRecorder(), HandleSingleProgramPMT(), and ProcessVideoTSPacket().

unsigned char DTVRecorder::_pid_status[0x1fff+1]
protected

Definition at line 172 of file dtvrecorder.h.

Referenced by DTVRecorder(), and ProcessAVTSPacket().

unsigned char DTVRecorder::_continuity_counter[0x1fff+1]
protected
vector<TSPacket> DTVRecorder::_scratch
protected

Definition at line 174 of file dtvrecorder.h.

Referenced by HandleSingleProgramPAT(), and HandleSingleProgramPMT().

bool DTVRecorder::_use_pts
protected

Definition at line 177 of file dtvrecorder.h.

Referenced by HandleTimestamps().

uint64_t DTVRecorder::_ts_count[256]
protected

Definition at line 178 of file dtvrecorder.h.

Referenced by ClearStatistics(), and HandleTimestamps().

int64_t DTVRecorder::_ts_last[256]
protected

Definition at line 179 of file dtvrecorder.h.

Referenced by ClearStatistics(), and HandleTimestamps().

int64_t DTVRecorder::_ts_first[256]
protected

Definition at line 180 of file dtvrecorder.h.

Referenced by ClearStatistics(), and HandleTimestamps().

QDateTime DTVRecorder::_ts_first_dt[256]
protected

Definition at line 181 of file dtvrecorder.h.

Referenced by HandleTimestamps().

QAtomicInt DTVRecorder::_packet_count
mutableprotected
QAtomicInt DTVRecorder::_continuity_error_count
mutableprotected
unsigned long long DTVRecorder::_frames_seen_count
protected
unsigned long long DTVRecorder::_frames_written_count
protected
double DTVRecorder::_total_duration
protected
double DTVRecorder::_td_base
protected

Definition at line 189 of file dtvrecorder.h.

Referenced by ClearStatistics(), and UpdateFramesWritten().

uint64_t DTVRecorder::_td_tick_count
protected

Definition at line 190 of file dtvrecorder.h.

Referenced by ClearStatistics(), and UpdateFramesWritten().

FrameRate DTVRecorder::_td_tick_framerate
protected

Definition at line 191 of file dtvrecorder.h.

Referenced by ClearStatistics(), and UpdateFramesWritten().

const uint DTVRecorder::kMaxKeyFrameDistance = 80
staticprotected

If the number of regular frames detected since the last detected keyframe exceeds this value, then we begin marking random regular frames as keyframes.

Definition at line 197 of file dtvrecorder.h.

Referenced by FindMPEG2Keyframes(), and FindPSKeyFrames().

const unsigned char DTVRecorder::kPayloadStartSeen = 0x2
staticprotected

Definition at line 198 of file dtvrecorder.h.

Referenced by ProcessAVTSPacket().


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