Remove warnings, reduce debug informations.

This commit is contained in:
Johns 2012-01-04 16:58:35 +01:00
parent 9a30d387a1
commit 0f449c2394
2 changed files with 25 additions and 10 deletions

View File

@ -183,7 +183,8 @@ static int FindAudioSync(const AVPacket * avpkt)
** @param size size of PES packet ** @param size size of PES packet
** @param id PES packet type ** @param id PES packet type
*/ */
void PlayAudio(const uint8_t * data, int size, uint8_t id) void PlayAudio(const uint8_t * data, int size,
__attribute__ ((unused)) uint8_t id)
{ {
int n; int n;
AVPacket avpkt[1]; AVPacket avpkt[1];

32
video.c
View File

@ -1002,6 +1002,9 @@ static void VaapiPrintFrames(const VaapiDecoder * decoder)
Debug(3, "video/vaapi: %d missed, %d duped, %d dropped frames of %d\n", Debug(3, "video/vaapi: %d missed, %d duped, %d dropped frames of %d\n",
decoder->FramesMissed, decoder->FramesDuped, decoder->FramesDropped, decoder->FramesMissed, decoder->FramesDuped, decoder->FramesDropped,
decoder->FrameCounter); decoder->FrameCounter);
#ifndef DEBUG
(void)decoder;
#endif
} }
/// ///
@ -1972,7 +1975,7 @@ static void VaapiQueueSurface(VaapiDecoder * decoder, VASurfaceID surface,
++decoder->FramesDropped; ++decoder->FramesDropped;
Warning(_("video: output buffer full, dropping frame (%d/%d)\n"), Warning(_("video: output buffer full, dropping frame (%d/%d)\n"),
decoder->FramesDropped, decoder->FrameCounter); decoder->FramesDropped, decoder->FrameCounter);
if (!(decoder->FramesDisplayed % 100)) { if (!(decoder->FramesDisplayed % 300)) {
VaapiPrintFrames(decoder); VaapiPrintFrames(decoder);
} }
if (softdec) { // software surfaces only if (softdec) { // software surfaces only
@ -2661,7 +2664,7 @@ static void VaapiSyncDisplayFrame(VaapiDecoder * decoder)
decoder->FramesDuped++; decoder->FramesDuped++;
Warning(_("video: display buffer empty, duping frame (%d/%d)\n"), Warning(_("video: display buffer empty, duping frame (%d/%d)\n"),
decoder->FramesDuped, decoder->FrameCounter); decoder->FramesDuped, decoder->FrameCounter);
if (!(decoder->FramesDisplayed % 333)) { if (!(decoder->FramesDisplayed % 300)) {
VaapiPrintFrames(decoder); VaapiPrintFrames(decoder);
} }
} }
@ -2725,7 +2728,7 @@ static void VaapiSyncRenderFrame(VaapiDecoder * decoder,
++decoder->FramesDropped; ++decoder->FramesDropped;
Warning(_("video: dropping frame (%d/%d)\n"), decoder->FramesDropped, Warning(_("video: dropping frame (%d/%d)\n"), decoder->FramesDropped,
decoder->FrameCounter); decoder->FrameCounter);
if (!(decoder->FramesDisplayed % 100)) { if (!(decoder->FramesDisplayed % 300)) {
VaapiPrintFrames(decoder); VaapiPrintFrames(decoder);
} }
decoder->DropNextFrame = 0; decoder->DropNextFrame = 0;
@ -3361,6 +3364,9 @@ static void VdpauPrintFrames(const VdpauDecoder * decoder)
Debug(3, "video/vdpau: %d missed, %d duped, %d dropped frames of %d\n", Debug(3, "video/vdpau: %d missed, %d duped, %d dropped frames of %d\n",
decoder->FramesMissed, decoder->FramesDuped, decoder->FramesDropped, decoder->FramesMissed, decoder->FramesDuped, decoder->FramesDropped,
decoder->FrameCounter); decoder->FrameCounter);
#ifndef DEBUG
(void)decoder;
#endif
} }
/// ///
@ -4352,7 +4358,9 @@ static void VdpauQueueSurface(VdpauDecoder * decoder, VdpVideoSurface surface,
Warning(_ Warning(_
("video/vdpau: output buffer full, dropping frame (%d/%d)\n"), ("video/vdpau: output buffer full, dropping frame (%d/%d)\n"),
++decoder->FramesDropped, decoder->FrameCounter); ++decoder->FramesDropped, decoder->FrameCounter);
VdpauPrintFrames(decoder); if (!(decoder->FramesDisplayed % 300)) {
VdpauPrintFrames(decoder);
}
// software surfaces only // software surfaces only
if (softdec) { if (softdec) {
VdpauReleaseSurface(decoder, surface); VdpauReleaseSurface(decoder, surface);
@ -4778,7 +4786,7 @@ static void VdpauAdvanceFrame(void)
Warning(_ Warning(_
("video: display buffer empty, duping frame (%d/%d)\n"), ("video: display buffer empty, duping frame (%d/%d)\n"),
decoder->FramesDuped, decoder->FrameCounter); decoder->FramesDuped, decoder->FrameCounter);
if (!(decoder->FramesDisplayed % 333)) { if (!(decoder->FramesDisplayed % 300)) {
VdpauPrintFrames(decoder); VdpauPrintFrames(decoder);
} }
decoder->SurfaceField = decoder->Interlaced; decoder->SurfaceField = decoder->Interlaced;
@ -4825,7 +4833,12 @@ static void VdpauDisplayFrame(void)
// FIXME: can be more than 1 frame long shown // FIXME: can be more than 1 frame long shown
for (i = 0; i < VdpauDecoderN; ++i) { for (i = 0; i < VdpauDecoderN; ++i) {
VdpauDecoders[i]->FramesMissed++; VdpauDecoders[i]->FramesMissed++;
VdpauPrintFrames(VdpauDecoders[i]); Warning(_("video: missed frame (%d/%d)\n"),
VdpauDecoders[i]->FramesMissed,
VdpauDecoders[i]->FrameCounter);
if (!(VdpauDecoders[i]->FramesDisplayed % 300)) {
VdpauPrintFrames(VdpauDecoders[i]);
}
} }
} }
last_time = first_time; last_time = first_time;
@ -4899,7 +4912,7 @@ static void VdpauSyncDisplayFrame(VdpauDecoder * decoder)
decoder->FramesDuped++; decoder->FramesDuped++;
Warning(_("video: display buffer empty, duping frame (%d/%d)\n"), Warning(_("video: display buffer empty, duping frame (%d/%d)\n"),
decoder->FramesDuped, decoder->FrameCounter); decoder->FramesDuped, decoder->FrameCounter);
if (!(decoder->FramesDisplayed % 333)) { if (!(decoder->FramesDisplayed % 300)) {
VdpauPrintFrames(decoder); VdpauPrintFrames(decoder);
} }
} }
@ -4964,7 +4977,7 @@ static void VdpauSyncRenderFrame(VdpauDecoder * decoder,
++decoder->FramesDropped; ++decoder->FramesDropped;
Warning(_("video: dropping frame (%d/%d)\n"), decoder->FramesDropped, Warning(_("video: dropping frame (%d/%d)\n"), decoder->FramesDropped,
decoder->FrameCounter); decoder->FrameCounter);
if (!(decoder->FramesDisplayed % 100)) { if (!(decoder->FramesDisplayed % 300)) {
VdpauPrintFrames(decoder); VdpauPrintFrames(decoder);
} }
decoder->DropNextFrame = 0; decoder->DropNextFrame = 0;
@ -5996,7 +6009,8 @@ void VideoDrawRenderState(VideoHwDecoder * decoder,
VdpauGetErrorString(status)); VdpauGetErrorString(status));
} }
if (end - start > 35) { if (end - start > 35) {
Debug(3, "video/vdpau: decoder render too slow %u ms\n", // report this
Info(_("video/vdpau: decoder render too slow %u ms\n"),
end - start); end - start);
} }
return; return;