Ticket #6602: ringbuffer_reset_v2.diff
File ringbuffer_reset_v2.diff, 2.8 KB (added by , 15 years ago) |
---|
-
libs/libmythtv/recorderbase.cpp
241 241 rb_changed = true; 242 242 243 243 StartNewFile(); 244 245 ResetStreamParser(); 244 246 } 245 247 nextRingBufferLock.unlock(); 246 248 -
libs/libmythtv/mpegrecorder.h
63 63 // ReaderPausedCB 64 64 virtual void ReaderPaused(int fd) { pauseWait.wakeAll(); } 65 65 66 // Reset stream parsers when necessary 67 virtual void ResetStreamParser(void); 68 66 69 private: 67 70 void SetIntOption(RecordingProfile *profile, const QString &name); 68 71 void SetStrOption(RecordingProfile *profile, const QString &name); -
libs/libmythtv/recorderbase.h
212 212 */ 213 213 virtual void CheckForRingBufferSwitch(void); 214 214 215 /** \brief Inherited method for the stream parser to be reset after 216 a ringbuffer change. Used mainly in mpegrecorder for H264Parser. 217 */ 218 virtual void ResetStreamParser(void) { }; 219 215 220 /** \brief Save the seektable to the DB 216 221 */ 217 222 void SavePositionMap(bool force = false); -
libs/libmythtv/mpegrecorder.cpp
1430 1430 { 1431 1431 VERBOSE(VB_RECORD, LOC + "PauseAndWait unpause"); 1432 1432 1433 if (driver == "hdpvr") 1434 { 1435 m_h264_parser.Reset(); 1436 _wait_for_keyframe_option = true; 1437 _seen_sps = false; 1438 } 1433 ResetStreamParser(); 1439 1434 1440 1435 // Some drivers require streaming to be disabled before 1441 1436 // an input switch and other channel format setting. … … 1500 1495 1501 1496 if (ioctl(fd, VIDIOC_ENCODER_CMD, &command) == 0) 1502 1497 { 1503 if (driver == "hdpvr") 1504 { 1505 m_h264_parser.Reset(); 1506 _wait_for_keyframe_option = true; 1507 _seen_sps = false; 1508 } 1498 ResetStreamParser(); 1509 1499 1510 1500 VERBOSE(VB_RECORD, LOC + "Encoding started"); 1511 1501 return true; … … 1762 1752 SetBitrate(bitrate, maxbitrate, "New"); 1763 1753 } 1764 1754 } 1755 1756 void MpegRecorder::ResetStreamParser(void) 1757 { 1758 if (driver == "hdpvr") 1759 { 1760 m_h264_parser.Reset(); 1761 _wait_for_keyframe_option = true; 1762 _seen_sps = false; 1763 } 1764 1765 RecorderBase::ResetStreamParser(); 1766 }