# HG changeset patch # User reimar # Date 1369774565 0 # Node ID a3aaf74a68a1cc88e7061cd87958ebb4f3506a8b # Parent 6feedb93c0738aecb78a8c6dbfc770ed8752459a Try to support -monitor-orientation with VDPAU. It doesn't work on my system with a radeon card, though maybe that feature just isn't implemented. diff -r 6feedb93c073 -r a3aaf74a68a1 libvo/vo_vdpau.c --- a/libvo/vo_vdpau.c Tue May 28 20:43:50 2013 +0000 +++ b/libvo/vo_vdpau.c Tue May 28 20:56:05 2013 +0000 @@ -266,6 +266,13 @@ } } +static const uint32_t rotate_flags[4] = { + VDP_OUTPUT_SURFACE_RENDER_ROTATE_0, + VDP_OUTPUT_SURFACE_RENDER_ROTATE_90, + VDP_OUTPUT_SURFACE_RENDER_ROTATE_180, + VDP_OUTPUT_SURFACE_RENDER_ROTATE_270 +}; + static void resize(void) { VdpStatus vdp_st; @@ -314,12 +321,12 @@ vdp_st = vdp_output_surface_render_output_surface(output_surfaces[surface_num], NULL, VDP_INVALID_HANDLE, NULL, NULL, NULL, - VDP_OUTPUT_SURFACE_RENDER_ROTATE_0); + rotate_flags[vo_rotate & 3]); CHECK_ST_WARNING("Error when calling vdp_output_surface_render_output_surface") vdp_st = vdp_output_surface_render_output_surface(output_surfaces[1 - surface_num], NULL, VDP_INVALID_HANDLE, NULL, NULL, NULL, - VDP_OUTPUT_SURFACE_RENDER_ROTATE_0); + rotate_flags[vo_rotate & 3]); CHECK_ST_WARNING("Error when calling vdp_output_surface_render_output_surface") } else video_to_output_surface(); @@ -827,7 +834,7 @@ &output_indexed_rect_vid, NULL, &blend_state, - VDP_OUTPUT_SURFACE_RENDER_ROTATE_0); + rotate_flags[vo_rotate & 3]); CHECK_ST_WARNING("Error when calling vdp_output_surface_render_output_surface") } @@ -851,7 +858,7 @@ output_surface, &eosd_targets[i].dest, eosd_targets[i].surface, &eosd_targets[i].source, &eosd_targets[i].color, &blend_state, - VDP_OUTPUT_SURFACE_RENDER_ROTATE_0); + rotate_flags[vo_rotate & 3]); CHECK_ST_WARNING("EOSD: Error when rendering") } } @@ -1041,7 +1048,7 @@ &out_rect_vid, output_surfaces[2], &src_rect_vid, NULL, NULL, - VDP_OUTPUT_SURFACE_RENDER_ROTATE_0); + rotate_flags[vo_rotate & 3]); CHECK_ST_ERROR("Error when calling vdp_output_surface_render_output_surface") } else if (!(mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)) { VdpStatus vdp_st;