diff --git a/mythtv/libs/libmythtv/dtvrecorder.cpp b/mythtv/libs/libmythtv/dtvrecorder.cpp
index b49fe6d..a537bae 100644
a
|
b
|
bool DTVRecorder::FindMPEG2Keyframes(const TSPacket* tspacket) |
550 | 550 | /* Found a frame that is not a keyframe, and we want to |
551 | 551 | * start on a keyframe */ |
552 | 552 | _payload_buffer.clear(); |
| 553 | LOG(VB_GENERAL, LOG_INFO, LOC + |
| 554 | QString("FindMPEG2Keyframes reset buffer")); |
553 | 555 | } |
554 | 556 | } |
555 | 557 | |
… |
… |
bool DTVRecorder::FindAudioKeyframes(const TSPacket*) |
658 | 660 | while (_frames_seen_count > expected_frame + 10000) |
659 | 661 | expected_frame += (uint64_t) ((double)msec_per_day / frame_interval); |
660 | 662 | |
| 663 | LOG(VB_GENERAL, LOG_INFO, LOC + |
| 664 | QString("FindAudioKeyframes _frames_seen_count(%1) expected_frame(%2)") |
| 665 | .arg(_frames_seen_count).arg(expected_frame)); |
| 666 | |
661 | 667 | if (!_frames_seen_count || (_frames_seen_count < expected_frame)) |
662 | 668 | { |
663 | 669 | if (!_frames_seen_count) |
… |
… |
void DTVRecorder::HandleKeyframe(int64_t extra) |
737 | 743 | if (!ringBuffer) |
738 | 744 | return; |
739 | 745 | |
| 746 | LOG(VB_GENERAL, LOG_INFO, LOC + |
| 747 | QString("HandleKeyframe(%2)").arg(extra)); |
| 748 | |
740 | 749 | // Perform ringbuffer switch if needed. |
741 | 750 | CheckForRingBufferSwitch(); |
742 | 751 | |
… |
… |
bool DTVRecorder::FindH264Keyframes(const TSPacket *tspacket) |
917 | 926 | /* Found a frame that is not a keyframe, and we want to |
918 | 927 | * start on a keyframe */ |
919 | 928 | _payload_buffer.clear(); |
| 929 | LOG(VB_GENERAL, LOG_INFO, LOC + |
| 930 | QString("FindH264Keyframes reset buffer")); |
920 | 931 | } |
921 | 932 | } |
922 | 933 | |
… |
… |
bool DTVRecorder::ProcessTSPacket(const TSPacket &tspacket) |
1289 | 1300 | .arg(erate)); |
1290 | 1301 | } |
1291 | 1302 | |
| 1303 | LOG(VB_GENERAL, LOG_INFO, LOC + |
| 1304 | QString("ProcessTSPacket: _input_pmt(%1) _has_no_av(%2) " |
| 1305 | "_wait_for_keyframe_option(%3) _first_keyframe(%4)") |
| 1306 | .arg(_input_pmt ? 1 : 0).arg(_has_no_av) |
| 1307 | .arg(_wait_for_keyframe_option).arg(_first_keyframe));; |
| 1308 | |
1292 | 1309 | // Only create fake keyframe[s] if there are no audio/video streams |
1293 | 1310 | if (_input_pmt && _has_no_av) |
1294 | 1311 | { |
… |
… |
bool DTVRecorder::ProcessVideoTSPacket(const TSPacket &tspacket) |
1321 | 1338 | { |
1322 | 1339 | // buffer packets until we know if this is a keyframe |
1323 | 1340 | _buffer_packets = true; |
| 1341 | LOG(VB_GENERAL, LOG_INFO, LOC + "ProcessVideoTSPacket payload start"); |
1324 | 1342 | } |
1325 | 1343 | |
1326 | 1344 | // Check for keyframes and count frames |
1327 | 1345 | if (streamType == StreamID::H264Video) |
| 1346 | { |
| 1347 | LOG(VB_GENERAL, LOG_INFO, LOC + "ProcessVideoTSPacket H264"); |
1328 | 1348 | FindH264Keyframes(&tspacket); |
| 1349 | } |
1329 | 1350 | else if (streamType != 0) |
| 1351 | { |
| 1352 | LOG(VB_GENERAL, LOG_INFO, LOC + "ProcessVideoTSPacket MPEG2"); |
1330 | 1353 | FindMPEG2Keyframes(&tspacket); |
| 1354 | } |
1331 | 1355 | else |
1332 | 1356 | LOG(VB_RECORD, LOG_ERR, LOC + |
1333 | 1357 | "ProcessVideoTSPacket: unknown stream type!"); |
… |
… |
bool DTVRecorder::ProcessAudioTSPacket(const TSPacket &tspacket) |
1344 | 1368 | { |
1345 | 1369 | // buffer packets until we know if this is a keyframe |
1346 | 1370 | _buffer_packets = true; |
| 1371 | LOG(VB_GENERAL, LOG_INFO, LOC + "ProcessAudioTSPacket payload start"); |
1347 | 1372 | } |
1348 | 1373 | |
1349 | 1374 | FindAudioKeyframes(&tspacket); |