mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Calculate queued output surfaces and show them in info message.
This commit is contained in:
parent
509329c90a
commit
93981031aa
@ -1,6 +1,8 @@
|
|||||||
User johns
|
User johns
|
||||||
Date:
|
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.
|
Add support for new API of vdr 2.3.1.
|
||||||
Fix bug: EnableDPMSatBlackScreen only available with USE_SCREENSAVER.
|
Fix bug: EnableDPMSatBlackScreen only available with USE_SCREENSAVER.
|
||||||
- H264_EOS_TRICKSPEED and USE_MPEG_COMPLETE enabled as default.
|
- H264_EOS_TRICKSPEED and USE_MPEG_COMPLETE enabled as default.
|
||||||
|
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: VDR \n"
|
"Project-Id-Version: VDR \n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\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"
|
"PO-Revision-Date: blabla\n"
|
||||||
"Last-Translator: blabla\n"
|
"Last-Translator: blabla\n"
|
||||||
"Language-Team: blabla\n"
|
"Language-Team: blabla\n"
|
||||||
@ -1327,6 +1327,10 @@ msgstr ""
|
|||||||
msgid "video/vdpau: can't render mixer: %s\n"
|
msgid "video/vdpau: can't render mixer: %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "video/vdpau: can't query status: %s\n"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "video/vdpau: can't block queue: %s\n"
|
msgid "video/vdpau: can't block queue: %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
32
video.c
32
video.c
@ -5862,6 +5862,7 @@ static VdpChromaType VdpauChromaType; ///< best video surface chroma format
|
|||||||
/// display surface ring buffer
|
/// display surface ring buffer
|
||||||
static VdpOutputSurface VdpauSurfacesRb[OUTPUT_SURFACES_MAX];
|
static VdpOutputSurface VdpauSurfacesRb[OUTPUT_SURFACES_MAX];
|
||||||
static int VdpauSurfaceIndex; ///< current display surface
|
static int VdpauSurfaceIndex; ///< current display surface
|
||||||
|
static int VdpauSurfaceQueued; ///< number of display surfaces queued
|
||||||
static struct timespec VdpauFrameTime; ///< time of last display
|
static struct timespec VdpauFrameTime; ///< time of last display
|
||||||
|
|
||||||
#ifdef USE_BITMAP
|
#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 =
|
status =
|
||||||
VdpauPresentationQueueBlockUntilSurfaceIdle(VdpauQueue,
|
VdpauPresentationQueueBlockUntilSurfaceIdle(VdpauQueue,
|
||||||
@ -8912,14 +8935,15 @@ static void VdpauSyncDecoder(VdpauDecoder * decoder)
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
VdpauMessage(0, NULL);
|
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),
|
Timestamp2String(video_clock),
|
||||||
abs((video_clock - audio_clock) / 90) <
|
abs((video_clock - audio_clock) / 90) <
|
||||||
8888 ? ((video_clock - audio_clock) / 90) : 8888,
|
8888 ? ((video_clock - audio_clock) / 90) : 8888,
|
||||||
AudioGetDelay() / 90, (int)VideoDeltaPTS / 90,
|
AudioGetDelay() / 90, (int)VideoDeltaPTS / 90,
|
||||||
VideoGetBuffers(decoder->Stream),
|
VideoGetBuffers(decoder->Stream),
|
||||||
(1 + decoder->Interlaced) * atomic_read(&decoder->SurfacesFilled)
|
decoder->Interlaced ? 2 * atomic_read(&decoder->SurfacesFilled)
|
||||||
- decoder->SurfaceField);
|
- decoder->SurfaceField : atomic_read(&decoder->SurfacesFilled),
|
||||||
|
VdpauSurfaceQueued);
|
||||||
if (!(decoder->FramesDisplayed % (5 * 60 * 60))) {
|
if (!(decoder->FramesDisplayed % (5 * 60 * 60))) {
|
||||||
VdpauPrintFrames(decoder);
|
VdpauPrintFrames(decoder);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user