Ticket #1026: mythtv_multilog_add.patch
File mythtv_multilog_add.patch, 10.1 KB (added by , 20 years ago) |
---|
-
libs/libmythtv/avformatdecoder.cpp
1563 1605 { 1564 1606 long long startpos = pkt->pos; 1565 1607 1566 VERBOSE(VB_PLAYBACK , LOC +1608 VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, LOC + 1567 1609 QString("positionMap[ %1 ] == %2.") 1568 1610 .arg(prevgoppos / keyframedist) 1569 1611 .arg((int)startpos)); … … 2474 2535 (curstream->codec->channels * 2) / 2475 2536 curstream->codec->sample_rate); 2476 2537 2538 VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, LOC + QString("audio timecode %1 %2 %3 %4") 2539 .arg(pkt->pts) 2540 .arg(pkt->dts) 2541 .arg(temppts).arg(lastapts)); 2477 2542 GetNVP()->AddAudioData((char *)audioSamples, data_size, 2478 2543 temppts); 2479 2544 … … 2565 2630 else 2566 2631 temppts = lastvpts; 2567 2632 2633 VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, LOC + QString("video timecode %1 %2 %3 %4") 2634 .arg(pkt->pts) 2635 .arg(pkt->dts) 2636 .arg(temppts).arg(lastvpts)); 2568 2637 /* XXX: Broken. 2569 2638 if (mpa_pic.qscale_table != NULL && mpa_pic.qstride > 0 && 2570 2639 context->height == picframe->height) -
libs/libmythtv/NuppelVideoPlayer.cpp
1413 1414 warpfactor_avg = (warpfactor + (warpfactor_avg * (WARPAVLEN - 1))) / 1414 1415 WARPAVLEN; 1415 1416 1416 //cerr << "Divergence: " << divergence << " Rate: " << rate 1417 //<< " Warpfactor: " << warpfactor << " warpfactor_avg: " 1418 //<< warpfactor_avg << endl; 1417 #if 1 1418 VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, QString("A/V " 1419 "Divergence: %1 " 1420 " Rate: %2" 1421 " Warpfactor: %3" 1422 " warpfactor_avg: %4") 1423 .arg(divergence) 1424 .arg(rate) 1425 .arg(warpfactor) 1426 .arg(warpfactor_avg) 1427 ); 1428 #endif 1419 1429 return divergence; 1420 1430 } 1421 1431 … … 1496 1506 if (diverge < -MAXDIVERGE) 1497 1507 { 1498 1508 // If video is way ahead of audio, adjust for it... 1499 QString dbg = QString(" Video is %1 frames ahead of audio, ")1509 QString dbg = QString("Audio is %1 frames ahead of video, ") 1500 1510 .arg(-diverge); 1501 1511 1502 1512 // Reset A/V Sync … … 1511 1521 // decoding; display the frame, but don't wait for A/V Sync. 1512 1522 videoOutput->PrepareFrame(buffer, ps); 1513 1523 videoOutput->Show(m_scan); 1514 VERBOSE(VB_PLAYBACK , LOC + dbg + "skipping A/V wait.");1524 VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, LOC + dbg + "skipping A/V wait."); 1515 1525 } 1516 1526 else 1517 1527 { 1518 1528 // If we are using software decoding, skip this frame altogether. 1519 VERBOSE(VB_PLAYBACK , LOC + dbg + "dropping frame.");1529 VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, LOC + dbg + "dropping frame."); 1520 1530 } 1521 1531 } 1522 1532 else if (!using_null_videoout) … … 1557 1569 1558 1570 if (output_jmeter && output_jmeter->RecordCycleTime()) 1559 1571 { 1560 //cerr << "avsync_delay: " << avsync_delay / 1000 1561 // << ", avsync_avg: " << avsync_avg / 1000 1562 // << ", warpfactor: " << warpfactor 1563 // << ", warpfactor_avg: " << warpfactor_avg << endl; 1572 #if 1 1573 VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, QString("A/V " 1574 "avsync_delay: %1" 1575 ", avsync_avg: %2" 1576 ", warpfactor: %3" 1577 ", warpfactor_avg: %4") 1578 .arg(avsync_delay / 1000) 1579 .arg(avsync_avg / 1000) 1580 .arg(warpfactor) 1581 .arg(warpfactor_avg)); 1582 #endif 1564 1583 } 1565 1584 1566 1585 videosync->AdvanceTrigger(); … … 1571 1590 // If audio is way ahead of video, adjust for it... 1572 1591 // by cutting the frame rate in half for the length of this frame 1573 1592 1574 1593 avsync_adjustment = frame_interval; 1575 1594 lastsync = true; 1576 VERBOSE(VB_PLAYBACK , LOC +1577 QString(" Audio is %1 frames ahead of video,\n"1595 VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, LOC + 1596 QString("Video is %1 frames ahead of audio,\n" 1578 1597 "\t\t\tdoubling video frame interval.").arg(diverge)); 1579 1598 } 1580 1599 1581 1600 if (audioOutput && normal_speed) 1582 1601 { 1583 1602 long long currentaudiotime = audioOutput->GetAudiotime(); 1584 1603 #if 0 1585 VERBOSE(VB_PLAYBACK , QString(1604 VERBOSE(VB_PLAYBACK|VB_TIMESTAMP, QString( 1586 1605 "A/V timecodes audio %1 video %2 frameinterval %3 " 1587 1606 "avdel %4 avg %5 tcoffset %6") 1588 1607 .arg(currentaudiotime) -
libs/libmyth/audiooutputbase.cpp
452 1007 // NOTE: This function is not threadsafe 453 1008 454 1009 int afree = audiofree(true); 455 1010 int len = samples * audio_bytes_per_sample; 456 1011 457 1012 // Check we have enough space to write the data 458 1013 if (need_resampler && src_ctx) 459 1014 len = (int)ceilf(float(len) * src_data.src_ratio); 460 1015 if ((len > afree) && !blocking) 1016 { 1017 VERBOSE(VB_AUDIO|VB_TIMESTAMP, QString("AddSamples FAILED bytes=%1, used=%2, free=%3, timecode=%4") 1018 .arg(len) 1019 .arg(AUDBUFSIZE-afree).arg(afree).arg(LONGLONGCONVERT timecode)); 461 1020 return false; // would overflow 1021 } 462 1022 463 1023 // resample input if necessary 464 1024 if (need_resampler && src_ctx) … … 492 1052 { 493 1053 if (blocking) 494 1054 { 495 VERBOSE(VB_AUDIO , "Waiting for free space");1055 VERBOSE(VB_AUDIO|VB_TIMESTAMP, "Waiting for free space"); 496 1056 // wait for more space 497 1057 pthread_cond_wait(&audio_bufsig, &audio_buflock); 498 1058 afree = audiofree(false); … … 533 1096 534 1097 int afree = audiofree(false); 535 1098 536 VERBOSE(VB_AUDIO , QString("_AddSamples bytes=%1, used=%2, free=%3, timecode=%4")1099 VERBOSE(VB_AUDIO|VB_TIMESTAMP, QString("_AddSamples bytes=%1, used=%2, free=%3, timecode=%4") 537 1100 .arg(samples * audio_bytes_per_sample) 538 1101 .arg(AUDBUFSIZE-afree).arg(afree).arg((long)timecode)); 539 1102 … … 687 1325 space_on_soundcard = getSpaceOnSoundcard(); 688 1326 689 1327 if (space_on_soundcard != last_space_on_soundcard) { 690 VERBOSE(VB_AUDIO , QString("%1 bytes free on soundcard")1328 VERBOSE(VB_AUDIO|VB_TIMESTAMP, QString("%1 bytes free on soundcard") 691 1329 .arg(space_on_soundcard)); 692 1330 last_space_on_soundcard = space_on_soundcard; 693 1331 } … … 700 1338 WriteAudio(zeros, fragment_size); 701 1339 } else { 702 1340 // this should never happen now -dag 703 VERBOSE(VB_AUDIO ,1341 VERBOSE(VB_AUDIO|VB_TIMESTAMP, 704 1342 QString("waiting for space on soundcard " 705 1343 "to write zeros: have %1 need %2") 706 1344 .arg(space_on_soundcard).arg(fragment_size)); … … 736 1374 if (fragment_size > audiolen(true)) 737 1375 { 738 1376 if (audiolen(true) > 0) // only log if we're sending some audio 739 VERBOSE(VB_AUDIO ,1377 VERBOSE(VB_AUDIO|VB_TIMESTAMP, 740 1378 QString("audio waiting for buffer to fill: " 741 1379 "have %1 want %2") 742 1380 .arg(audiolen(true)).arg(fragment_size)); 743 1381 744 VERBOSE(VB_AUDIO, "Broadcasting free space avail");1382 //VERBOSE(VB_AUDIO|VB_TIMESTAMP, "Broadcasting free space avail"); 745 1383 pthread_mutex_lock(&audio_buflock); 746 1384 pthread_cond_broadcast(&audio_bufsig); 747 1385 pthread_mutex_unlock(&audio_buflock); … … 755 1393 if (fragment_size > space_on_soundcard) 756 1394 { 757 1395 if (space_on_soundcard != last_space_on_soundcard) { 758 VERBOSE(VB_AUDIO ,1396 VERBOSE(VB_AUDIO|VB_TIMESTAMP, 759 1397 QString("audio waiting for space on soundcard: " 760 1398 "have %1 need %2") 761 1399 .arg(space_on_soundcard).arg(fragment_size)); … … 817 1455 818 1456 /* update raud */ 819 1457 raud = (raud + fragment_size) % AUDBUFSIZE; 820 VERBOSE(VB_AUDIO, "Broadcasting free space avail");1458 //VERBOSE(VB_AUDIO|VB_TIMESTAMP, "Broadcasting free space avail"); 821 1459 pthread_cond_broadcast(&audio_bufsig); 822 1460 823 1461 written_size = fragment_size; -
libs/libmyth/audiooutputalsa.cpp
148 150 149 151 tmpbuf = aubuf; 150 152 151 VERBOSE(VB_AUDIO , QString("WriteAudio: Preparing %1 bytes (%2 frames)")153 VERBOSE(VB_AUDIO|VB_TIMESTAMP, QString("WriteAudio: Preparing %1 bytes (%2 frames)") 152 154 .arg(size).arg(frames)); 153 155 154 156 while (frames > 0) -
programs/mythcommflag/main.cpp
848 848 time_now = time(NULL); 849 849 if (!quiet) 850 850 { 851 VERBOSE(VB_ ALL, QString("%1 version: %2 www.mythtv.org")851 VERBOSE(VB_IMPORTANT, QString("%1 version: %2 www.mythtv.org") 852 852 .arg(binname).arg(MYTH_BINARY_VERSION)); 853 853 854 VERBOSE(VB_ ALL, QString("Enabled verbose msgs: %1").arg(verboseString));854 VERBOSE(VB_IMPORTANT, QString("Enabled verbose msgs: %1").arg(verboseString)); 855 855 856 856 cerr << "\nMythTV Commercial Flagger, started at " 857 857 << ctime(&time_now);