diff options
Diffstat (limited to 'abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff')
-rw-r--r-- | abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff b/abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff new file mode 100644 index 0000000..7876a2e --- /dev/null +++ b/abs/core-testing/mythtv/trunk/mythtv/ringbuffer_reset_v2.diff @@ -0,0 +1,91 @@ +Index: libs/libmythtv/recorderbase.cpp +=================================================================== +--- libs/libmythtv/recorderbase.cpp (revision 20635) ++++ libs/libmythtv/recorderbase.cpp (working copy) +@@ -241,6 +241,8 @@ + rb_changed = true; + + StartNewFile(); ++ ++ ResetStreamParser(); + } + nextRingBufferLock.unlock(); + +Index: libs/libmythtv/mpegrecorder.h +=================================================================== +--- libs/libmythtv/mpegrecorder.h (revision 20635) ++++ libs/libmythtv/mpegrecorder.h (working copy) +@@ -63,6 +63,9 @@ + // ReaderPausedCB + virtual void ReaderPaused(int fd) { pauseWait.wakeAll(); } + ++ // Reset stream parsers when necessary ++ virtual void ResetStreamParser(void); ++ + private: + void SetIntOption(RecordingProfile *profile, const QString &name); + void SetStrOption(RecordingProfile *profile, const QString &name); +Index: libs/libmythtv/recorderbase.h +=================================================================== +--- libs/libmythtv/recorderbase.h (revision 20635) ++++ libs/libmythtv/recorderbase.h (working copy) +@@ -212,6 +212,11 @@ + */ + virtual void CheckForRingBufferSwitch(void); + ++ /** \brief Inherited method for the stream parser to be reset after ++ a ringbuffer change. Used mainly in mpegrecorder for H264Parser. ++ */ ++ virtual void ResetStreamParser(void) { }; ++ + /** \brief Save the seektable to the DB + */ + void SavePositionMap(bool force = false); +Index: libs/libmythtv/mpegrecorder.cpp +=================================================================== +--- libs/libmythtv/mpegrecorder.cpp (revision 20635) ++++ libs/libmythtv/mpegrecorder.cpp (working copy) +@@ -1430,12 +1430,7 @@ + { + VERBOSE(VB_RECORD, LOC + "PauseAndWait unpause"); + +- if (driver == "hdpvr") +- { +- m_h264_parser.Reset(); +- _wait_for_keyframe_option = true; +- _seen_sps = false; +- } ++ ResetStreamParser(); + + // Some drivers require streaming to be disabled before + // an input switch and other channel format setting. +@@ -1500,12 +1495,7 @@ + + if (ioctl(fd, VIDIOC_ENCODER_CMD, &command) == 0) + { +- if (driver == "hdpvr") +- { +- m_h264_parser.Reset(); +- _wait_for_keyframe_option = true; +- _seen_sps = false; +- } ++ ResetStreamParser(); + + VERBOSE(VB_RECORD, LOC + "Encoding started"); + return true; +@@ -1762,3 +1752,15 @@ + SetBitrate(bitrate, maxbitrate, "New"); + } + } ++ ++void MpegRecorder::ResetStreamParser(void) ++{ ++ if (driver == "hdpvr") ++ { ++ m_h264_parser.Reset(); ++ _wait_for_keyframe_option = true; ++ _seen_sps = false; ++ } ++ ++ RecorderBase::ResetStreamParser(); ++} |