diff options
author | Johns <johns98@gmx.net> | 2015-09-30 11:16:50 +0200 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2015-09-30 11:16:50 +0200 |
commit | 93981031aa8d542f7c6778deaba7fe62beb2af69 (patch) | |
tree | 163874e3a50115accc1527cb2c9bcbf575b5de8e | |
parent | 509329c90a524600be720ed332574fbf6454735e (diff) | |
download | vdr-plugin-softhddevice-93981031aa8d542f7c6778deaba7fe62beb2af69.tar.gz vdr-plugin-softhddevice-93981031aa8d542f7c6778deaba7fe62beb2af69.tar.bz2 |
Calculate queued output surfaces and show them in info message.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | po/de_DE.po | 6 | ||||
-rw-r--r-- | video.c | 32 |
3 files changed, 35 insertions, 5 deletions
@@ -1,6 +1,8 @@ User johns Date: + Fix bug: info shows wrong decoded video surfaces. + Calculate queued output surfaces and show them in info message. Add support for new API of vdr 2.3.1. Fix bug: EnableDPMSatBlackScreen only available with USE_SCREENSAVER. - H264_EOS_TRICKSPEED and USE_MPEG_COMPLETE enabled as default. diff --git a/po/de_DE.po b/po/de_DE.po index 5e2d706..a0a32c7 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: VDR \n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2015-06-10 21:21+0200\n" +"POT-Creation-Date: 2015-09-30 10:48+0200\n" "PO-Revision-Date: blabla\n" "Last-Translator: blabla\n" "Language-Team: blabla\n" @@ -1328,6 +1328,10 @@ msgid "video/vdpau: can't render mixer: %s\n" msgstr "" #, c-format +msgid "video/vdpau: can't query status: %s\n" +msgstr "" + +#, c-format msgid "video/vdpau: can't block queue: %s\n" msgstr "" @@ -5862,6 +5862,7 @@ static VdpChromaType VdpauChromaType; ///< best video surface chroma format /// display surface ring buffer static VdpOutputSurface VdpauSurfacesRb[OUTPUT_SURFACES_MAX]; static int VdpauSurfaceIndex; ///< current display surface +static int VdpauSurfaceQueued; ///< number of display surfaces queued static struct timespec VdpauFrameTime; ///< time of last display #ifdef USE_BITMAP @@ -8586,7 +8587,29 @@ static void VdpauDisplayFrame(void) } } // - // wait for surface visible (blocks max ~5ms) + // check how many surfaces are queued + // + VdpauSurfaceQueued = 0; + for (i = 0; i < OUTPUT_SURFACES_MAX; ++i) { + VdpPresentationQueueStatus qstatus; + + status = + VdpauPresentationQueueQuerySurfaceStatus(VdpauQueue, + VdpauSurfacesRb[(VdpauSurfaceIndex + i) % OUTPUT_SURFACES_MAX], + &qstatus, &first_time); + if (status != VDP_STATUS_OK) { + Error(_("video/vdpau: can't query status: %s\n"), + VdpauGetErrorString(status)); + break; + } + if (qstatus == VDP_PRESENTATION_QUEUE_STATUS_IDLE) { + continue; + } + // STATUS_QUEUED | STATUS_VISIBLE + VdpauSurfaceQueued++; + } + // + // wait for surface no longer visible (blocks max ~5ms) // status = VdpauPresentationQueueBlockUntilSurfaceIdle(VdpauQueue, @@ -8912,14 +8935,15 @@ static void VdpauSyncDecoder(VdpauDecoder * decoder) if (!err) { VdpauMessage(0, NULL); } - Info("video: %s%+5" PRId64 " %4" PRId64 " %3d/\\ms %3d%+d v-buf\n", + Info("video: %s%+5" PRId64 " %4" PRId64 " %3d/\\ms %3d%+d%+d v-buf\n", Timestamp2String(video_clock), abs((video_clock - audio_clock) / 90) < 8888 ? ((video_clock - audio_clock) / 90) : 8888, AudioGetDelay() / 90, (int)VideoDeltaPTS / 90, VideoGetBuffers(decoder->Stream), - (1 + decoder->Interlaced) * atomic_read(&decoder->SurfacesFilled) - - decoder->SurfaceField); + decoder->Interlaced ? 2 * atomic_read(&decoder->SurfacesFilled) + - decoder->SurfaceField : atomic_read(&decoder->SurfacesFilled), + VdpauSurfaceQueued); if (!(decoder->FramesDisplayed % (5 * 60 * 60))) { VdpauPrintFrames(decoder); } |