summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-03 19:41:09 +0200
committerwm4 <wm4@nowhere>2014-04-17 22:58:47 +0200
commit3c2777994b6d45ec4503b088231bd2dac4861d9e (patch)
tree924bcbd8b0996b5714a91f0c29332908dade2830
parent80741f27f3e818476fe770c501338a8334e12097 (diff)
downloadmpv-3c2777994b6d45ec4503b088231bd2dac4861d9e.tar.bz2
mpv-3c2777994b6d45ec4503b088231bd2dac4861d9e.tar.xz
vo_vdpau: more debugging output
Might help to debug certain problems with Mesa.
-rw-r--r--video/out/vo_vdpau.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index 11d7650467..1b99a3fe86 100644
--- a/video/out/vo_vdpau.c
+++ b/video/out/vo_vdpau.c
@@ -1019,6 +1019,15 @@ static int update_presentation_queue_status(struct vo *vo)
&status, &vtime);
CHECK_VDP_WARNING(vo, "Error calling "
"presentation_queue_query_surface_status");
+ if (mp_msg_test(vo->log, MSGL_TRACE)) {
+ VdpTime current;
+ vdp_st = vdp->presentation_queue_get_time(vc->flip_queue, &current);
+ CHECK_VDP_WARNING(vo, "Error when calling "
+ "vdp_presentation_queue_get_time");
+ MP_TRACE(vo, "Vdpau time: %"PRIu64"\n", (uint64_t)current);
+ MP_TRACE(vo, "Surface %d status: %d time: %"PRIu64"\n",
+ (int)surface, (int)status, (uint64_t)vtime);
+ }
if (status == VDP_PRESENTATION_QUEUE_STATUS_QUEUED)
break;
if (vc->vsync_interval > 1) {
@@ -1129,12 +1138,19 @@ static void flip_page_timed(struct vo *vo, int64_t pts_us, int duration)
if (npts < vsync + vsync_interval)
return;
pts = vsync + (vsync_interval >> 2);
- vdp_st =
- vdp->presentation_queue_display(vc->flip_queue,
- vc->output_surfaces[vc->surface_num],
- vo->dwidth, vo->dheight, pts);
+ VdpOutputSurface frame = vc->output_surfaces[vc->surface_num];
+ vdp_st = vdp->presentation_queue_display(vc->flip_queue, frame,
+ vo->dwidth, vo->dheight, pts);
CHECK_VDP_WARNING(vo, "Error when calling vdp_presentation_queue_display");
+ if (mp_msg_test(vo->log, MSGL_TRACE)) {
+ VdpTime vdp_time;
+ vdp_st = vdp->presentation_queue_get_time(vc->flip_queue, &vdp_time);
+ CHECK_VDP_WARNING(vo, "Error when calling vdp_presentation_queue_display");
+ MP_TRACE(vo, "Queue new surface %d: current=%"PRIu64" int=%"PRIu64
+ " pts=%"PRIu64"\n", (int)frame, (uint64_t)vdp_time, now, pts);
+ }
+
vc->last_queue_time = pts;
vc->queue_time[vc->surface_num] = pts;
vc->last_ideal_time = ideal_pts;