Ticket #1088: mpegrec_gopbyframe.diff
File mpegrec_gopbyframe.diff, 1.5 KB (added by , 17 years ago) |
---|
-
libs/libmythtv/mpegrecorder.cpp
old new void MpegRecorder::Reset(void) 1021 1021 buildbuffersize = 0; 1022 1022 1023 1023 if (curRecording) 1024 curRecording->ClearPositionMap(MARK_GOP_ START);1024 curRecording->ClearPositionMap(MARK_GOP_BYFRAME); 1025 1025 } 1026 1026 1027 1027 void MpegRecorder::Pause(bool clear) … … void MpegRecorder::SetNextRecording(cons 1065 1065 */ 1066 1066 void MpegRecorder::HandleKeyframe(void) 1067 1067 { 1068 long long frameNum = framesWritten; 1069 1068 1070 // Add key frame to position map 1069 1071 bool save_map = false; 1070 1072 positionMapLock.lock(); 1071 if (!positionMap.contains( numgops))1073 if (!positionMap.contains(frameNum)) 1072 1074 { 1073 positionMapDelta[ numgops] = lastpackheaderpos;1074 positionMap[ numgops] = lastpackheaderpos;1075 positionMapDelta[frameNum] = lastpackheaderpos; 1076 positionMap[frameNum] = lastpackheaderpos; 1075 1077 save_map = true; 1076 1078 } 1077 1079 positionMapLock.unlock(); … … void MpegRecorder::SavePositionMap(bool 1102 1104 if (curRecording && force) 1103 1105 { 1104 1106 curRecording->SetPositionMapDelta(positionMapDelta, 1105 MARK_GOP_ START);1107 MARK_GOP_BYFRAME); 1106 1108 // Stop setting the filesize here until we get the contention issue 1107 1109 // between with this thread and the scheduler worked out. 1108 1110 //curRecording->SetFilesize(lastpackheaderpos);