This is a specialization of RecorderBase used to handle MPEG-2, MPEG-4, MPEG-4 AVC, DVB and ATSC streams. More...
#include <dtvrecorder.h>
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 | SetNextRecording (const ProgramInfo *, RingBuffer *) |
| Sets next recording info, to be applied as soon as practical. | |
| virtual void | SetStreamData (void) |
| void | SetStreamData (MPEGStreamData *sd) |
| MPEGStreamData * | GetStreamData (void) const |
| virtual void | Reset (void) |
| Reset the recorder to the startup state. | |
| virtual void | ClearStatistics (void) |
| virtual RecordingQuality * | GetRecordingQuality (void) 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) |
| void | HandleSingleProgramPMT (ProgramMapTable *pmt) |
| 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. | |
Protected Member Functions | |
| 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 (uint64_t frameNum, int64_t extra=0) |
| void | HandleTimestamps (int stream_id, int64_t pts, int64_t dts) |
| void | BufferedWrite (const TSPacket &tspacket) |
| 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 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 |
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 |
This is a specialization of RecorderBase used to handle MPEG-2, MPEG-4, MPEG-4 AVC, DVB and ATSC streams.
Definition at line 26 of file dtvrecorder.h.
| DTVRecorder::DTVRecorder | ( | TVRec * | rec | ) |
Definition at line 47 of file dtvrecorder.cpp.
| DTVRecorder::~DTVRecorder | ( | ) | [virtual] |
Definition at line 89 of file dtvrecorder.cpp.
| 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 MpegRecorder, NuppelVideoRecorder, and V4LRecorder.
Definition at line 108 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 ASIRecorder, MpegRecorder, NuppelVideoRecorder, and V4LRecorder.
Definition at line 122 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 ASIRecorder, FirewireRecorder, ImportRecorder, IPTVRecorder, MpegRecorder, and NuppelVideoRecorder.
Definition at line 130 of file dtvrecorder.cpp.
| bool DTVRecorder::IsErrored | ( | void | ) | [inline, virtual] |
Tells us whether an unrecoverable error has been encountered.
Implements RecorderBase.
Definition at line 45 of file dtvrecorder.h.
Referenced by NuppelVideoRecorder::doAudioThread(), NuppelVideoRecorder::DoMJPEG(), NuppelVideoRecorder::DoV4L1(), NuppelVideoRecorder::DoV4L2(), NuppelVideoRecorder::doWriteThread(), IPTVRecorder::Open(), MpegRecorder::run(), IPTVRecorder::run(), ImportRecorder::run(), HDHRRecorder::run(), FirewireRecorder::run(), DVBRecorder::run(), CetonRecorder::run(), ASIRecorder::run(), V4LRecorder::RunVBIDevice(), and Transcode::TranscodeFile().
| long long DTVRecorder::GetFramesWritten | ( | void | ) | [inline, 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.
Implements RecorderBase.
Reimplemented in NuppelVideoRecorder.
Definition at line 47 of file dtvrecorder.h.
Referenced by MpegRecorder::run().
| void DTVRecorder::SetVideoFilters | ( | QString & | filters | ) | [inline, 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.
Implements RecorderBase.
Reimplemented in MpegRecorder, and NuppelVideoRecorder.
Definition at line 49 of file dtvrecorder.h.
| void DTVRecorder::Initialize | ( | void | ) | [inline, virtual] |
This is called between SetOptionsFromProfile() and run() to initialize any devices, etc.
Implements RecorderBase.
Reimplemented in MpegRecorder, and NuppelVideoRecorder.
Definition at line 50 of file dtvrecorder.h.
| int DTVRecorder::GetVideoFd | ( | void | ) | [inline, 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.
Implements RecorderBase.
Reimplemented in MpegRecorder, and NuppelVideoRecorder.
Definition at line 51 of file dtvrecorder.h.
| void DTVRecorder::SetNextRecording | ( | const ProgramInfo * | , | |
| RingBuffer * | ||||
| ) | [virtual] |
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.
Implements RecorderBase.
Reimplemented in NuppelVideoRecorder.
Definition at line 672 of file dtvrecorder.cpp.
| void DTVRecorder::SetStreamData | ( | void | ) | [virtual] |
Reimplemented in FirewireRecorder, ImportRecorder, IPTVRecorder, and MpegRecorder.
Definition at line 247 of file dtvrecorder.cpp.
Referenced by ASIRecorder::ASIRecorder(), SetStreamData(), TVRec::SetupDTVSignalMonitor(), TVRec::TuningNewRecorder(), and ~DTVRecorder().
| void DTVRecorder::SetStreamData | ( | MPEGStreamData * | sd | ) |
Definition at line 233 of file dtvrecorder.cpp.
| MPEGStreamData* DTVRecorder::GetStreamData | ( | void | ) | const [inline] |
Definition at line 56 of file dtvrecorder.h.
Referenced by FindAudioKeyframes(), FindOtherKeyframes(), FirewireRecorder::ProcessTSPacket(), TVRec::SetupDTVSignalMonitor(), TVRec::TuningFrequency(), TVRec::TuningOnSameMultiplex(), TVRec::TuningShutdowns(), and DVBRecorder::UpdateCAMTimeOffset().
| 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 MpegRecorder, and NuppelVideoRecorder.
Definition at line 222 of file dtvrecorder.cpp.
| void DTVRecorder::ClearStatistics | ( | void | ) | [virtual] |
Reimplemented from RecorderBase.
Definition at line 205 of file dtvrecorder.cpp.
Referenced by NuppelVideoRecorder::ResetForNewFile(), and ResetForNewFile().
| RecordingQuality * DTVRecorder::GetRecordingQuality | ( | void | ) | const [virtual] |
Returns a report about the current recordings quality.
Reimplemented from RecorderBase.
Definition at line 1326 of file dtvrecorder.cpp.
| void DTVRecorder::HandlePAT | ( | const ProgramAssociationTable * | _pat | ) | [virtual] |
Implements MPEGStreamListener.
Definition at line 1110 of file dtvrecorder.cpp.
| void DTVRecorder::HandleCAT | ( | const ConditionalAccessTable * | ) | [inline, virtual] |
Implements MPEGStreamListener.
Definition at line 64 of file dtvrecorder.h.
| void DTVRecorder::HandlePMT | ( | uint | pid, | |
| const ProgramMapTable * | _pmt | |||
| ) | [virtual] |
Implements MPEGStreamListener.
Definition at line 1146 of file dtvrecorder.cpp.
Implements MPEGStreamListener.
Definition at line 66 of file dtvrecorder.h.
| void DTVRecorder::HandleSingleProgramPAT | ( | ProgramAssociationTable * | pat | ) | [virtual] |
Implements MPEGSingleProgramStreamListener.
Definition at line 1171 of file dtvrecorder.cpp.
Referenced by MpegRecorder::RestartEncoding(), MpegRecorder::run(), HDHRRecorder::run(), DVBRecorder::run(), CetonRecorder::run(), and ASIRecorder::run().
| void DTVRecorder::HandleSingleProgramPMT | ( | ProgramMapTable * | pmt | ) | [virtual] |
Implements MPEGSingleProgramStreamListener.
Definition at line 1190 of file dtvrecorder.cpp.
Referenced by MpegRecorder::RestartEncoding(), MpegRecorder::run(), HDHRRecorder::run(), DVBRecorder::run(), CetonRecorder::run(), and ASIRecorder::run().
| void DTVRecorder::HandleSTT | ( | const SystemTimeTable * | ) | [inline, virtual] |
Implements ATSCMainStreamListener.
Definition at line 73 of file dtvrecorder.h.
| void DTVRecorder::HandleVCT | ( | uint | , | |
| const VirtualChannelTable * | ||||
| ) | [inline, virtual] |
Implements ATSCMainStreamListener.
Definition at line 74 of file dtvrecorder.h.
| void DTVRecorder::HandleMGT | ( | const MasterGuideTable * | ) | [inline, virtual] |
Implements ATSCMainStreamListener.
Definition at line 75 of file dtvrecorder.h.
| void DTVRecorder::HandleTDT | ( | const TimeDateTable * | ) | [inline, virtual] |
Implements DVBMainStreamListener.
Definition at line 78 of file dtvrecorder.h.
| void DTVRecorder::HandleNIT | ( | const NetworkInformationTable * | ) | [inline, virtual] |
Implements DVBMainStreamListener.
Definition at line 79 of file dtvrecorder.h.
| void DTVRecorder::HandleSDT | ( | uint | , | |
| const ServiceDescriptionTable * | ||||
| ) | [inline, virtual] |
Implements DVBMainStreamListener.
Definition at line 80 of file dtvrecorder.h.
Implements TSPacketListener.
Reimplemented in FirewireRecorder, IPTVRecorder, and MpegRecorder.
Definition at line 1213 of file dtvrecorder.cpp.
Implements TSPacketListenerAV.
Definition at line 1253 of file dtvrecorder.cpp.
Implements TSPacketListenerAV.
Definition at line 1275 of file dtvrecorder.cpp.
Common code for processing either audio or video packets.
Definition at line 1285 of file dtvrecorder.cpp.
Referenced by ProcessAudioTSPacket(), and ProcessVideoTSPacket().
| void DTVRecorder::FinishRecording | ( | void | ) | [protected, virtual] |
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 143 of file dtvrecorder.cpp.
Referenced by MpegRecorder::run(), IPTVRecorder::run(), ImportRecorder::run(), HDHRRecorder::run(), FirewireRecorder::run(), DVBRecorder::run(), CetonRecorder::run(), and ASIRecorder::run().
| void DTVRecorder::ResetForNewFile | ( | void | ) | [protected, virtual] |
Implements RecorderBase.
Reimplemented in NuppelVideoRecorder.
Definition at line 163 of file dtvrecorder.cpp.
Referenced by DTVRecorder(), MpegRecorder::Open(), ImportRecorder::Open(), HDHRRecorder::Open(), FirewireRecorder::Open(), DVBRecorder::Open(), CetonRecorder::Open(), ASIRecorder::Open(), MpegRecorder::Reset(), and Reset().
Definition at line 700 of file dtvrecorder.cpp.
Referenced by FindAudioKeyframes(), FindMPEG2Keyframes(), FindOtherKeyframes(), and FindPSKeyFrames().
Definition at line 545 of file dtvrecorder.cpp.
Referenced by FindMPEG2Keyframes().
| void DTVRecorder::BufferedWrite | ( | const TSPacket & | tspacket | ) | [protected] |
Definition at line 265 of file dtvrecorder.cpp.
Referenced by HandleSingleProgramPAT(), HandleSingleProgramPMT(), ProcessAVTSPacket(), IPTVRecorder::ProcessTSPacket(), FirewireRecorder::ProcessTSPacket(), and ProcessTSPacket().
Definition at line 611 of file dtvrecorder.cpp.
Referenced by ProcessAudioTSPacket(), IPTVRecorder::ProcessTSPacket(), and FirewireRecorder::ProcessTSPacket().
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
Definition at line 375 of file dtvrecorder.cpp.
Referenced by IPTVRecorder::ProcessTSPacket(), FirewireRecorder::ProcessTSPacket(), and ProcessVideoTSPacket().
This searches the TS packet to identify keyframes.
| TSPacket | Pointer the the TS packet data. |
Definition at line 739 of file dtvrecorder.cpp.
Referenced by IPTVRecorder::ProcessTSPacket(), and ProcessVideoTSPacket().
| void DTVRecorder::HandleH264Keyframe | ( | void | ) | [protected] |
This save the current frame to the position maps and handles ringbuffer switching.
Definition at line 905 of file dtvrecorder.cpp.
Referenced by FindH264Keyframes().
Definition at line 924 of file dtvrecorder.cpp.
Referenced by MpegRecorder::run().
Non-Audio/Video data.
For streams which contain no audio/video, write just 1 key-frame at the start.
Definition at line 649 of file dtvrecorder.cpp.
Referenced by ProcessTSPacket().
Definition at line 194 of file dtvrecorder.h.
Referenced by ProcessAVTSPacket(), and ProcessTSPacket().
| virtual QString DTVRecorder::GetSIStandard | ( | void | ) | const [inline, protected, virtual] |
Reimplemented in CetonRecorder, DVBRecorder, and HDHRRecorder.
Definition at line 119 of file dtvrecorder.h.
Referenced by HandlePMT().
| virtual void DTVRecorder::SetCAMPMT | ( | const ProgramMapTable * | ) | [inline, protected, virtual] |
Reimplemented in DVBRecorder.
Definition at line 120 of file dtvrecorder.h.
Referenced by HandlePMT().
| virtual void DTVRecorder::UpdateCAMTimeOffset | ( | void | ) | [inline, protected, virtual] |
Reimplemented in DVBRecorder.
Definition at line 121 of file dtvrecorder.h.
Referenced by HandleSTT(), and HandleTDT().
int DTVRecorder::_stream_fd [protected] |
Definition at line 124 of file dtvrecorder.h.
Referenced by GetVideoFd().
QString DTVRecorder::_recording_type [protected] |
Definition at line 126 of file dtvrecorder.h.
Referenced by MpegRecorder::run(), and SetOption().
QTime DTVRecorder::_audio_timer [protected] |
Definition at line 129 of file dtvrecorder.h.
Referenced by FindAudioKeyframes().
uint32_t DTVRecorder::_start_code [protected] |
Definition at line 130 of file dtvrecorder.h.
Referenced by FindH264Keyframes(), FindMPEG2Keyframes(), FindPSKeyFrames(), MpegRecorder::Reset(), Reset(), and ResetForNewFile().
int DTVRecorder::_first_keyframe [protected] |
Definition at line 131 of file dtvrecorder.h.
Referenced by BufferedWrite(), FindAudioKeyframes(), FindH264Keyframes(), FindMPEG2Keyframes(), FindPSKeyFrames(), HandleH264Keyframe(), HandleKeyframe(), ProcessAVTSPacket(), and ProcessTSPacket().
unsigned long long DTVRecorder::_last_gop_seen [protected] |
Definition at line 132 of file dtvrecorder.h.
Referenced by FindMPEG2Keyframes(), FindPSKeyFrames(), and ResetForNewFile().
unsigned long long DTVRecorder::_last_seq_seen [protected] |
Definition at line 133 of file dtvrecorder.h.
Referenced by FindMPEG2Keyframes(), FindPSKeyFrames(), and ResetForNewFile().
unsigned long long DTVRecorder::_last_keyframe_seen [protected] |
Definition at line 134 of file dtvrecorder.h.
Referenced by FindAudioKeyframes(), FindH264Keyframes(), FindMPEG2Keyframes(), FindOtherKeyframes(), FindPSKeyFrames(), and ResetForNewFile().
unsigned int DTVRecorder::_audio_bytes_remaining [protected] |
Definition at line 135 of file dtvrecorder.h.
Referenced by FindPSKeyFrames(), and ResetForNewFile().
unsigned int DTVRecorder::_video_bytes_remaining [protected] |
Definition at line 136 of file dtvrecorder.h.
Referenced by FindPSKeyFrames(), and ResetForNewFile().
unsigned int DTVRecorder::_other_bytes_remaining [protected] |
Definition at line 137 of file dtvrecorder.h.
Referenced by FindPSKeyFrames(), and ResetForNewFile().
int DTVRecorder::_progressive_sequence [protected] |
Definition at line 140 of file dtvrecorder.h.
Referenced by FindMPEG2Keyframes(), and ResetForNewFile().
int DTVRecorder::_repeat_pict [protected] |
Definition at line 141 of file dtvrecorder.h.
Referenced by FindMPEG2Keyframes(), and ResetForNewFile().
bool DTVRecorder::_pes_synced [protected] |
Definition at line 144 of file dtvrecorder.h.
Referenced by FindH264Keyframes(), and ResetForNewFile().
bool DTVRecorder::_seen_sps [protected] |
Definition at line 145 of file dtvrecorder.h.
Referenced by FindH264Keyframes(), MpegRecorder::PauseAndWait(), IPTVRecorder::ProcessTSPacket(), ProcessVideoTSPacket(), and MpegRecorder::StartEncoding().
H264Parser DTVRecorder::m_h264_parser [protected] |
Definition at line 146 of file dtvrecorder.h.
Referenced by FindH264Keyframes(), HandleH264Keyframe(), MpegRecorder::OpenV4L2DeviceAsInput(), MpegRecorder::PauseAndWait(), and MpegRecorder::StartEncoding().
bool DTVRecorder::_wait_for_keyframe_option [protected] |
Wait for the a GOP/SEQ-start before sending data.
Definition at line 149 of file dtvrecorder.h.
Referenced by BufferedWrite(), FindAudioKeyframes(), FindH264Keyframes(), FindMPEG2Keyframes(), FindPSKeyFrames(), MpegRecorder::PauseAndWait(), ProcessAVTSPacket(), ProcessTSPacket(), ProcessVideoTSPacket(), MpegRecorder::RestartEncoding(), MpegRecorder::run(), HDHRRecorder::run(), DVBRecorder::run(), CetonRecorder::run(), ASIRecorder::run(), SetOption(), and MpegRecorder::StartEncoding().
bool DTVRecorder::_has_written_other_keyframe [protected] |
Definition at line 151 of file dtvrecorder.h.
Referenced by FindOtherKeyframes(), and ResetForNewFile().
QString DTVRecorder::_error [protected] |
non-empty iff irrecoverable recording error detected
Definition at line 155 of file dtvrecorder.h.
Referenced by NuppelVideoRecorder::DoMJPEG(), NuppelVideoRecorder::DoV4L1(), NuppelVideoRecorder::DoV4L2(), NuppelVideoRecorder::Initialize(), IsErrored(), NuppelVideoRecorder::Open(), IPTVRecorder::Open(), MpegRecorder::OpenV4L2DeviceAsInput(), ResetForNewFile(), NuppelVideoRecorder::run(), MpegRecorder::run(), IPTVRecorder::run(), HDHRRecorder::run(), FirewireRecorder::run(), DVBRecorder::run(), CetonRecorder::run(), ASIRecorder::run(), and NuppelVideoRecorder::WriteAudio().
MPEGStreamData* DTVRecorder::_stream_data [protected] |
Definition at line 157 of file dtvrecorder.h.
Referenced by ASIRecorder::ASIRecorder(), GetStreamData(), HandlePAT(), HandlePMT(), MpegRecorder::PauseAndWait(), IPTVRecorder::PauseAndWait(), HDHRRecorder::PauseAndWait(), DVBRecorder::PauseAndWait(), CetonRecorder::PauseAndWait(), IPTVRecorder::ProcessTSPacket(), MpegRecorder::Reset(), MpegRecorder::RestartEncoding(), MpegRecorder::run(), HDHRRecorder::run(), DVBRecorder::run(), CetonRecorder::run(), ASIRecorder::run(), MpegRecorder::SetStreamData(), IPTVRecorder::SetStreamData(), FirewireRecorder::SetStreamData(), and SetStreamData().
bool DTVRecorder::_buffer_packets [protected] |
Definition at line 160 of file dtvrecorder.h.
Referenced by BufferedWrite(), ProcessAudioTSPacket(), IPTVRecorder::ProcessTSPacket(), FirewireRecorder::ProcessTSPacket(), ProcessTSPacket(), and ProcessVideoTSPacket().
vector<unsigned char> DTVRecorder::_payload_buffer [protected] |
Definition at line 161 of file dtvrecorder.h.
Referenced by BufferedWrite(), DTVRecorder(), FindH264Keyframes(), FindMPEG2Keyframes(), FindPSKeyFrames(), FinishRecording(), HandleKeyframe(), and ResetForNewFile().
QMutex DTVRecorder::_pid_lock [mutable, protected] |
Definition at line 164 of file dtvrecorder.h.
Referenced by HandlePAT(), and HandlePMT().
ProgramAssociationTable* DTVRecorder::_input_pat [protected] |
PAT on input side.
Definition at line 165 of file dtvrecorder.h.
Referenced by HandlePAT(), and ~DTVRecorder().
ProgramMapTable* DTVRecorder::_input_pmt [protected] |
PMT on input side.
Definition at line 166 of file dtvrecorder.h.
Referenced by HandlePMT(), ProcessTSPacket(), HDHRRecorder::run(), DVBRecorder::run(), CetonRecorder::run(), ASIRecorder::run(), and ~DTVRecorder().
bool DTVRecorder::_has_no_av [protected] |
Definition at line 167 of file dtvrecorder.h.
Referenced by HandlePMT(), and ProcessTSPacket().
unsigned char DTVRecorder::_stream_id[0x1fff+1] [protected] |
Definition at line 170 of file dtvrecorder.h.
Referenced by HandleSingleProgramPMT(), ProcessVideoTSPacket(), and ResetForNewFile().
unsigned char DTVRecorder::_pid_status[0x1fff+1] [protected] |
Definition at line 171 of file dtvrecorder.h.
Referenced by ProcessAVTSPacket(), and ResetForNewFile().
unsigned char DTVRecorder::_continuity_counter[0x1fff+1] [protected] |
Definition at line 172 of file dtvrecorder.h.
Referenced by CheckCC(), ProcessAVTSPacket(), MpegRecorder::ProcessTSPacket(), ProcessTSPacket(), and ResetForNewFile().
vector<TSPacket> DTVRecorder::_scratch [protected] |
Definition at line 173 of file dtvrecorder.h.
Referenced by HandleSingleProgramPAT(), and HandleSingleProgramPMT().
bool DTVRecorder::_use_pts [protected] |
Definition at line 176 of file dtvrecorder.h.
Referenced by HandleTimestamps().
uint64_t DTVRecorder::_ts_count[256] [protected] |
Definition at line 177 of file dtvrecorder.h.
Referenced by ClearStatistics(), and HandleTimestamps().
int64_t DTVRecorder::_ts_last[256] [protected] |
Definition at line 178 of file dtvrecorder.h.
Referenced by ClearStatistics(), and HandleTimestamps().
int64_t DTVRecorder::_ts_first[256] [protected] |
Definition at line 179 of file dtvrecorder.h.
Referenced by ClearStatistics(), and HandleTimestamps().
QDateTime DTVRecorder::_ts_first_dt[256] [protected] |
Definition at line 180 of file dtvrecorder.h.
Referenced by HandleTimestamps().
QAtomicInt DTVRecorder::_packet_count [mutable, protected] |
Definition at line 181 of file dtvrecorder.h.
Referenced by ClearStatistics(), GetRecordingQuality(), ProcessAVTSPacket(), and ProcessTSPacket().
QAtomicInt DTVRecorder::_continuity_error_count [mutable, protected] |
Definition at line 182 of file dtvrecorder.h.
Referenced by ClearStatistics(), GetRecordingQuality(), ProcessAVTSPacket(), and ProcessTSPacket().
unsigned long long DTVRecorder::_frames_seen_count [protected] |
Definition at line 183 of file dtvrecorder.h.
Referenced by ClearStatistics(), FindAudioKeyframes(), FindH264Keyframes(), FindMPEG2Keyframes(), FindOtherKeyframes(), and FindPSKeyFrames().
unsigned long long DTVRecorder::_frames_written_count [protected] |
Definition at line 184 of file dtvrecorder.h.
Referenced by ClearStatistics(), FindAudioKeyframes(), FindH264Keyframes(), FindMPEG2Keyframes(), FindOtherKeyframes(), FindPSKeyFrames(), GetFramesWritten(), HandleH264Keyframe(), and HandleKeyframe().
const uint DTVRecorder::kMaxKeyFrameDistance = 80 [static, protected] |
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 190 of file dtvrecorder.h.
Referenced by FindMPEG2Keyframes(), and FindPSKeyFrames().
const unsigned char DTVRecorder::kPayloadStartSeen = 0x2 [static, protected] |
Definition at line 191 of file dtvrecorder.h.
Referenced by ProcessAVTSPacket().
1.6.3