comparison libvo/vo_vdpau.c @ 31763:550ffba86d9c

Make the VDPAU background black instead of the default green. (This was reported repeatedly as a problem for users.) Patch by Vlad Seryakov, vseryakov at gmail
author cehoyos
date Tue, 27 Jul 2010 08:38:08 +0000
parents afa2737707e6
children 59949255681d
comparison
equal deleted inserted replaced
31762:da0bfd02286c 31763:550ffba86d9c
122 static VdpPresentationQueueCreate *vdp_presentation_queue_create; 122 static VdpPresentationQueueCreate *vdp_presentation_queue_create;
123 static VdpPresentationQueueDestroy *vdp_presentation_queue_destroy; 123 static VdpPresentationQueueDestroy *vdp_presentation_queue_destroy;
124 static VdpPresentationQueueDisplay *vdp_presentation_queue_display; 124 static VdpPresentationQueueDisplay *vdp_presentation_queue_display;
125 static VdpPresentationQueueBlockUntilSurfaceIdle *vdp_presentation_queue_block_until_surface_idle; 125 static VdpPresentationQueueBlockUntilSurfaceIdle *vdp_presentation_queue_block_until_surface_idle;
126 static VdpPresentationQueueTargetCreateX11 *vdp_presentation_queue_target_create_x11; 126 static VdpPresentationQueueTargetCreateX11 *vdp_presentation_queue_target_create_x11;
127 static VdpPresentationQueueSetBackgroundColor *vdp_presentation_queue_set_background_color;
127 128
128 static VdpOutputSurfaceRenderOutputSurface *vdp_output_surface_render_output_surface; 129 static VdpOutputSurfaceRenderOutputSurface *vdp_output_surface_render_output_surface;
129 static VdpOutputSurfacePutBitsIndexed *vdp_output_surface_put_bits_indexed; 130 static VdpOutputSurfacePutBitsIndexed *vdp_output_surface_put_bits_indexed;
130 static VdpOutputSurfaceRenderBitmapSurface *vdp_output_surface_render_bitmap_surface; 131 static VdpOutputSurfaceRenderBitmapSurface *vdp_output_surface_render_bitmap_surface;
131 132
368 &vdp_presentation_queue_display}, 369 &vdp_presentation_queue_display},
369 {VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE, 370 {VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE,
370 &vdp_presentation_queue_block_until_surface_idle}, 371 &vdp_presentation_queue_block_until_surface_idle},
371 {VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_CREATE_X11, 372 {VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_CREATE_X11,
372 &vdp_presentation_queue_target_create_x11}, 373 &vdp_presentation_queue_target_create_x11},
374 {VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR,
375 &vdp_presentation_queue_set_background_color},
373 {VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE, 376 {VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE,
374 &vdp_output_surface_render_output_surface}, 377 &vdp_output_surface_render_output_surface},
375 {VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED, 378 {VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED,
376 &vdp_output_surface_put_bits_indexed}, 379 &vdp_output_surface_put_bits_indexed},
377 {VDP_FUNC_ID_DECODER_CREATE, &vdp_decoder_create}, 380 {VDP_FUNC_ID_DECODER_CREATE, &vdp_decoder_create},
414 417
415 /* Initialize vdpau_flip_queue, called from config() */ 418 /* Initialize vdpau_flip_queue, called from config() */
416 static int win_x11_init_vdpau_flip_queue(void) 419 static int win_x11_init_vdpau_flip_queue(void)
417 { 420 {
418 VdpStatus vdp_st; 421 VdpStatus vdp_st;
422 VdpColor vdp_bg = { 0, 0, 0, 0 };
419 423
420 vdp_st = vdp_presentation_queue_target_create_x11(vdp_device, vo_window, 424 vdp_st = vdp_presentation_queue_target_create_x11(vdp_device, vo_window,
421 &vdp_flip_target); 425 &vdp_flip_target);
422 CHECK_ST_ERROR("Error when calling vdp_presentation_queue_target_create_x11") 426 CHECK_ST_ERROR("Error when calling vdp_presentation_queue_target_create_x11")
423 427
424 vdp_st = vdp_presentation_queue_create(vdp_device, vdp_flip_target, 428 vdp_st = vdp_presentation_queue_create(vdp_device, vdp_flip_target,
425 &vdp_flip_queue); 429 &vdp_flip_queue);
426 CHECK_ST_ERROR("Error when calling vdp_presentation_queue_create") 430 CHECK_ST_ERROR("Error when calling vdp_presentation_queue_create")
427 431
432 vdp_st = vdp_presentation_queue_set_background_color(vdp_flip_queue, &vdp_bg);
433 CHECK_ST_ERROR("Error when calling vdp_presentation_queue_set_background_color")
428 return 0; 434 return 0;
429 } 435 }
430 436
431 static int update_csc_matrix(void) 437 static int update_csc_matrix(void)
432 { 438 {