diff --git a/mythtv/libs/libmythtv/recorders/asirecorder.cpp b/mythtv/libs/libmythtv/recorders/asirecorder.cpp
index b6cb4df..44e445f 100644
|
a
|
b
|
void ASIRecorder::SetOption(const QString &name, int value)
|
| 62 | 62 | DTVRecorder::SetOption(name, value); |
| 63 | 63 | } |
| 64 | 64 | |
| | 65 | void ASIRecorder::StartNewFile(void) |
| | 66 | { |
| | 67 | // Make sure the first things in the file are a PAT & PMT |
| | 68 | bool tmp = _wait_for_keyframe_option; |
| | 69 | _wait_for_keyframe_option = false; |
| | 70 | HandleSingleProgramPAT(_stream_data->PATSingleProgram()); |
| | 71 | HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); |
| | 72 | _wait_for_keyframe_option = tmp; |
| | 73 | } |
| | 74 | |
| | 75 | |
| 65 | 76 | void ASIRecorder::run(void) |
| 66 | 77 | { |
| 67 | 78 | if (!Open()) |
| … |
… |
void ASIRecorder::run(void)
|
| 99 | 110 | if (m_channel && (m_channel->GetSIStandard() == "dvb")) |
| 100 | 111 | _stream_data->AddListeningPID(DVB_TDT_PID); |
| 101 | 112 | |
| 102 | | // Make sure the first things in the file are a PAT & PMT |
| 103 | | bool tmp = _wait_for_keyframe_option; |
| 104 | | _wait_for_keyframe_option = false; |
| 105 | | HandleSingleProgramPAT(_stream_data->PATSingleProgram()); |
| 106 | | HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); |
| 107 | | _wait_for_keyframe_option = tmp; |
| | 113 | StartNewFile(); |
| 108 | 114 | |
| 109 | 115 | _stream_data->AddAVListener(this); |
| 110 | 116 | _stream_data->AddWritingListener(this); |
diff --git a/mythtv/libs/libmythtv/recorders/asirecorder.h b/mythtv/libs/libmythtv/recorders/asirecorder.h
index a973f9d..22d52b9 100644
|
a
|
b
|
class ASIRecorder : public DTVRecorder
|
| 69 | 69 | bool Open(void); |
| 70 | 70 | bool IsOpen(void) const; |
| 71 | 71 | void Close(void); |
| | 72 | void StartNewFile(void); |
| 72 | 73 | |
| 73 | 74 | private: |
| 74 | 75 | ASIChannel *m_channel; |
diff --git a/mythtv/libs/libmythtv/recorders/cetonrecorder.cpp b/mythtv/libs/libmythtv/recorders/cetonrecorder.cpp
index f7aacf4..918c2fe 100644
|
a
|
b
|
void CetonRecorder::Close(void)
|
| 46 | 46 | LOG(VB_RECORD, LOG_INFO, LOC + "Close() -- end"); |
| 47 | 47 | } |
| 48 | 48 | |
| | 49 | void CetonRecorder::StartNewFile(void) |
| | 50 | { |
| | 51 | // Make sure the first things in the file are a PAT & PMT |
| | 52 | bool tmp = _wait_for_keyframe_option; |
| | 53 | _wait_for_keyframe_option = false; |
| | 54 | HandleSingleProgramPAT(_stream_data->PATSingleProgram()); |
| | 55 | HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); |
| | 56 | _wait_for_keyframe_option = tmp; |
| | 57 | } |
| | 58 | |
| 49 | 59 | void CetonRecorder::run(void) |
| 50 | 60 | { |
| 51 | 61 | LOG(VB_RECORD, LOG_INFO, LOC + "run -- begin"); |
| … |
… |
void CetonRecorder::run(void)
|
| 65 | 75 | recordingWait.wakeAll(); |
| 66 | 76 | } |
| 67 | 77 | |
| 68 | | // Make sure the first things in the file are a PAT & PMT |
| 69 | | bool tmp = _wait_for_keyframe_option; |
| 70 | | _wait_for_keyframe_option = false; |
| 71 | | HandleSingleProgramPAT(_stream_data->PATSingleProgram()); |
| 72 | | HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); |
| 73 | | _wait_for_keyframe_option = tmp; |
| | 78 | StartNewFile(); |
| 74 | 79 | |
| 75 | 80 | _stream_data->AddAVListener(this); |
| 76 | 81 | _stream_data->AddWritingListener(this); |
diff --git a/mythtv/libs/libmythtv/recorders/cetonrecorder.h b/mythtv/libs/libmythtv/recorders/cetonrecorder.h
index fe2d176..8233d46 100644
|
a
|
b
|
class CetonRecorder : public DTVRecorder
|
| 26 | 26 | |
| 27 | 27 | bool Open(void); |
| 28 | 28 | void Close(void); |
| | 29 | void StartNewFile(void); |
| 29 | 30 | |
| 30 | 31 | bool IsOpen(void) const { return _stream_handler; } |
| 31 | 32 | |
diff --git a/mythtv/libs/libmythtv/recorders/dtvrecorder.cpp b/mythtv/libs/libmythtv/recorders/dtvrecorder.cpp
index 0c30b10..2b26342 100644
|
a
|
b
|
DTVRecorder::DTVRecorder(TVRec *rec) :
|
| 87 | 87 | { |
| 88 | 88 | SetPositionMapType(MARK_GOP_BYFRAME); |
| 89 | 89 | _payload_buffer.reserve(TSPacket::kSize * (50 + 1)); |
| | 90 | |
| | 91 | memset(_stream_id, 0, sizeof(_stream_id)); |
| | 92 | memset(_pid_status, 0, sizeof(_pid_status)); |
| | 93 | memset(_continuity_counter, 0xff, sizeof(_continuity_counter)); |
| | 94 | |
| 90 | 95 | ResetForNewFile(); |
| 91 | 96 | } |
| 92 | 97 | |
| … |
… |
void DTVRecorder::ResetForNewFile(void)
|
| 191 | 196 | //_recording |
| 192 | 197 | _error = QString(); |
| 193 | 198 | |
| 194 | | memset(_stream_id, 0, sizeof(_stream_id)); |
| 195 | | memset(_pid_status, 0, sizeof(_pid_status)); |
| 196 | | memset(_continuity_counter, 0xff, sizeof(_continuity_counter)); |
| 197 | | |
| 198 | 199 | _progressive_sequence = 0; |
| 199 | 200 | _repeat_pict = 0; |
| 200 | 201 | |
| … |
… |
void DTVRecorder::ResetForNewFile(void)
|
| 204 | 205 | positionMapDelta.clear(); |
| 205 | 206 | durationMap.clear(); |
| 206 | 207 | durationMapDelta.clear(); |
| 207 | | _payload_buffer.clear(); |
| 208 | 208 | |
| 209 | 209 | locker.unlock(); |
| 210 | 210 | ClearStatistics(); |
diff --git a/mythtv/libs/libmythtv/recorders/dvbrecorder.cpp b/mythtv/libs/libmythtv/recorders/dvbrecorder.cpp
index c1b66d5..92a05e0 100644
|
a
|
b
|
void DVBRecorder::Close(void)
|
| 72 | 72 | LOG(VB_RECORD, LOG_INFO, LOC + "Close() -- end"); |
| 73 | 73 | } |
| 74 | 74 | |
| | 75 | void DVBRecorder::StartNewFile(void) |
| | 76 | { |
| | 77 | // Make sure the first things in the file are a PAT & PMT |
| | 78 | bool tmp = _wait_for_keyframe_option; |
| | 79 | _wait_for_keyframe_option = false; |
| | 80 | HandleSingleProgramPAT(_stream_data->PATSingleProgram()); |
| | 81 | HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); |
| | 82 | _wait_for_keyframe_option = tmp; |
| | 83 | } |
| | 84 | |
| 75 | 85 | void DVBRecorder::run(void) |
| 76 | 86 | { |
| 77 | 87 | if (!Open()) |
| … |
… |
void DVBRecorder::run(void)
|
| 92 | 102 | if (_channel && (_channel->GetSIStandard() == "dvb")) |
| 93 | 103 | _stream_data->AddListeningPID(DVB_TDT_PID); |
| 94 | 104 | |
| 95 | | // Make sure the first things in the file are a PAT & PMT |
| 96 | | bool tmp = _wait_for_keyframe_option; |
| 97 | | _wait_for_keyframe_option = false; |
| 98 | | HandleSingleProgramPAT(_stream_data->PATSingleProgram()); |
| 99 | | HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); |
| 100 | | _wait_for_keyframe_option = tmp; |
| | 105 | StartNewFile(); |
| 101 | 106 | |
| 102 | 107 | _stream_data->AddAVListener(this); |
| 103 | 108 | _stream_data->AddWritingListener(this); |
diff --git a/mythtv/libs/libmythtv/recorders/dvbrecorder.h b/mythtv/libs/libmythtv/recorders/dvbrecorder.h
index eb0b5f8..e82c2fe 100644
|
a
|
b
|
class DVBRecorder : public DTVRecorder
|
| 28 | 28 | bool Open(void); |
| 29 | 29 | bool IsOpen(void) const; |
| 30 | 30 | void Close(void); |
| | 31 | void StartNewFile(void); |
| 31 | 32 | |
| 32 | 33 | private: |
| 33 | 34 | bool PauseAndWait(int timeout = 100); |
diff --git a/mythtv/libs/libmythtv/recorders/hdhrrecorder.cpp b/mythtv/libs/libmythtv/recorders/hdhrrecorder.cpp
index c8e1436..f84ac1e 100644
|
a
|
b
|
void HDHRRecorder::Close(void)
|
| 47 | 47 | LOG(VB_RECORD, LOG_INFO, LOC + "Close() -- end"); |
| 48 | 48 | } |
| 49 | 49 | |
| | 50 | void HDHRRecorder::StartNewFile(void) |
| | 51 | { |
| | 52 | // Make sure the first things in the file are a PAT & PMT |
| | 53 | bool tmp = _wait_for_keyframe_option; |
| | 54 | _wait_for_keyframe_option = false; |
| | 55 | HandleSingleProgramPAT(_stream_data->PATSingleProgram()); |
| | 56 | HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); |
| | 57 | _wait_for_keyframe_option = tmp; |
| | 58 | } |
| | 59 | |
| 50 | 60 | void HDHRRecorder::run(void) |
| 51 | 61 | { |
| 52 | 62 | LOG(VB_RECORD, LOG_INFO, LOC + "run -- begin"); |
| … |
… |
void HDHRRecorder::run(void)
|
| 66 | 76 | recordingWait.wakeAll(); |
| 67 | 77 | } |
| 68 | 78 | |
| 69 | | // Make sure the first things in the file are a PAT & PMT |
| 70 | | bool tmp = _wait_for_keyframe_option; |
| 71 | | _wait_for_keyframe_option = false; |
| 72 | | HandleSingleProgramPAT(_stream_data->PATSingleProgram()); |
| 73 | | HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); |
| 74 | | _wait_for_keyframe_option = tmp; |
| | 79 | StartNewFile(); |
| 75 | 80 | |
| 76 | 81 | _stream_data->AddAVListener(this); |
| 77 | 82 | _stream_data->AddWritingListener(this); |
diff --git a/mythtv/libs/libmythtv/recorders/hdhrrecorder.h b/mythtv/libs/libmythtv/recorders/hdhrrecorder.h
index 44b3fc1..7523e37 100644
|
a
|
b
|
class HDHRRecorder : public DTVRecorder
|
| 26 | 26 | bool Open(void); |
| 27 | 27 | bool IsOpen(void) const { return _stream_handler; } |
| 28 | 28 | void Close(void); |
| | 29 | void StartNewFile(void); |
| 29 | 30 | |
| 30 | 31 | QString GetSIStandard(void) const; |
| 31 | 32 | |
diff --git a/mythtv/libs/libmythtv/recorders/iptvrecorder.cpp b/mythtv/libs/libmythtv/recorders/iptvrecorder.cpp
index 39a35b1..d9be192 100644
|
a
|
b
|
bool IPTVRecorder::PauseAndWait(int timeout)
|
| 91 | 91 | return IsPaused(true); |
| 92 | 92 | } |
| 93 | 93 | |
| | 94 | void IPTVRecorder::StartNewFile(void) |
| | 95 | { |
| | 96 | // Make sure the first things in the file are a PAT & PMT |
| | 97 | bool tmp = _wait_for_keyframe_option; |
| | 98 | _wait_for_keyframe_option = false; |
| | 99 | HandleSingleProgramPAT(_stream_data->PATSingleProgram()); |
| | 100 | HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); |
| | 101 | _wait_for_keyframe_option = tmp; |
| | 102 | } |
| | 103 | |
| 94 | 104 | void IPTVRecorder::run(void) |
| 95 | 105 | { |
| 96 | 106 | LOG(VB_RECORD, LOG_INFO, LOC + "run -- begin"); |
| … |
… |
void IPTVRecorder::run(void)
|
| 109 | 119 | recordingWait.wakeAll(); |
| 110 | 120 | } |
| 111 | 121 | |
| 112 | | // Make sure the first things in the file are a PAT & PMT |
| 113 | | bool tmp = _wait_for_keyframe_option; |
| 114 | | _wait_for_keyframe_option = false; |
| 115 | | HandleSingleProgramPAT(_stream_data->PATSingleProgram()); |
| 116 | | HandleSingleProgramPMT(_stream_data->PMTSingleProgram()); |
| 117 | | _wait_for_keyframe_option = tmp; |
| | 122 | StartNewFile(); |
| 118 | 123 | |
| 119 | 124 | _stream_data->AddAVListener(this); |
| 120 | 125 | _stream_data->AddWritingListener(this); |
diff --git a/mythtv/libs/libmythtv/recorders/iptvrecorder.h b/mythtv/libs/libmythtv/recorders/iptvrecorder.h
index d68c1e6..cbcd041 100644
|
a
|
b
|
class IPTVRecorder : public DTVRecorder
|
| 24 | 24 | virtual bool Open(void); // RecorderBase |
| 25 | 25 | virtual void Close(void); // RecorderBase |
| 26 | 26 | bool IsOpen(void) const; |
| | 27 | void StartNewFile(void); |
| 27 | 28 | |
| 28 | 29 | virtual void SetStreamData(MPEGStreamData*); // DTVRecorder |
| 29 | 30 | virtual bool PauseAndWait(int timeout = 100); // RecorderBase |