1 diff -r 23f700befc6c src/video_out/Makefile.am
2 --- a/src/video_out/Makefile.am Sun Feb 20 23:38:32 2011 +0100
3 +++ b/src/video_out/Makefile.am Wed Mar 16 14:17:05 2011 +0100
7 vdpau_module = xineplug_vo_out_vdpau.la
9 +xine_includedir = $(includedir)/xine
10 +xine_include_HEADERS = video_out_vdpau.h
14 --- xine-lib-1.2.8/src/video_out/video_out_vdpau.c.orig 2017-02-21 12:13:13.000000000 +0100
15 +++ xine-lib-1.2.8/src/video_out/video_out_vdpau.c 2017-07-08 07:46:55.935788912 +0200
17 #include <vdpau/vdpau_x11.h>
18 #include "accel_vdpau.h"
20 +#include "video_out_vdpau.h"
23 #define NUM_FRAMES_BACK 1
26 vdpau_class_t *class = (vdpau_class_t *) class_gen;
27 x11_visual_t *visual = (x11_visual_t *) visual_gen;
28 + x11_visual_vdpau_t *vdpau = visual->d ? NULL : (x11_visual_vdpau_t *) visual_gen;
30 config_values_t *config = class->xine->config;
32 @@ -2713,15 +2715,22 @@
33 this->ovl_src_rect.x0 = 0;
34 this->ovl_src_rect.y0 = 0;
36 - VdpStatus st = vdp_device_create_x11( visual->display, visual->screen, &vdp_device, &vdp_get_proc_address );
37 - if ( st != VDP_STATUS_OK ) {
38 - fprintf(stderr, "vo_vdpau: Can't create vdp device : " );
39 - if ( st == VDP_STATUS_NO_IMPLEMENTATION )
40 - fprintf(stderr, "No vdpau implementation.\n" );
42 - fprintf(stderr, "unsupported GPU?\n" );
43 - vdpau_dispose( &this->vo_driver );
47 + vdp_device = vdpau->device;
48 + vdp_get_proc_address = vdpau->vdp_get_proc_address;
51 + st = vdp_device_create_x11( visual->display, visual->screen, &vdp_device, &vdp_get_proc_address );
52 + if ( st != VDP_STATUS_OK ) {
53 + fprintf(stderr, "vo_vdpau: Can't create vdp device : " );
54 + if ( st == VDP_STATUS_NO_IMPLEMENTATION )
55 + fprintf(stderr, "No vdpau implementation.\n" );
57 + fprintf(stderr, "unsupported GPU?\n" );
58 + vdpau_dispose( &this->vo_driver );
62 st = vdp_get_proc_address( vdp_device, VDP_FUNC_ID_GET_ERROR_STRING , (void*)&vdp_get_error_string );
63 if ( vdpau_init_error( st, "Can't get GET_ERROR_STRING proc address !!", &this->vo_driver, 0 ) )
64 @@ -2929,6 +2938,22 @@
65 if ( vdpau_init_error( st, "Can't get PREEMPTION_CALLBACK_REGISTER proc address !!", &this->vo_driver, 1 ) )
68 + /* Check for extended initialization */
70 + vdp_queue_target_create_x11 = vdpau->vdp_queue_target_create_x11;
71 + vdp_queue_target_destroy = vdpau->vdp_queue_target_destroy;
72 + vdp_queue_create = vdpau->vdp_queue_create;
73 + vdp_queue_destroy = vdpau->vdp_queue_destroy;
74 + vdp_queue_display = vdpau->vdp_queue_display;
75 + vdp_queue_block = vdpau->vdp_queue_block;
76 + vdp_queue_set_background_color = vdpau->vdp_queue_set_background_color;
77 + vdp_queue_get_time = vdpau->vdp_queue_get_time;
78 + vdp_queue_query_surface_status = vdpau->vdp_queue_query_surface_status;
80 + vdp_preemption_callback_register = vdpau->vdp_preemption_callback_register;
84 st = vdp_preemption_callback_register(vdp_device, &vdp_preemption_callback, (void*)this);
85 if ( vdpau_init_error( st, "Can't register preemption callback !!", &this->vo_driver, 1 ) )
87 diff -r 23f700befc6c src/video_out/video_out_vdpau.h
88 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
89 +++ b/src/video_out/video_out_vdpau.h Wed Mar 16 14:17:05 2011 +0100
92 + * kate: space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; remove-trailing-space on;
93 + * Copyright (C) 2008 the xine project
94 + * Copyright (C) 2008 Christophe Thommeret <hftom@free.fr>
96 + * This file is part of xine, a free video player.
98 + * xine is free software; you can redistribute it and/or modify
99 + * it under the terms of the GNU General Public License as published by
100 + * the Free Software Foundation; either version 2 of the License, or
101 + * (at your option) any later version.
103 + * xine is distributed in the hope that it will be useful,
104 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
105 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
106 + * GNU General Public License for more details.
108 + * You should have received a copy of the GNU General Public License
109 + * along with this program; if not, write to the Free Software
110 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
113 + * video_out_vdpau.c, a video output plugin
114 + * using VDPAU (Video Decode and Presentation Api for Unix)
119 +#ifndef __VIDEO_OUT__VDPAU_H__
120 +#define __VIDEO_OUT__VDPAU_H__
124 +#include <vdpau/vdpau_x11.h>
128 + x11_visual_t x11; // if x11.d (drawable) is zero, it will use this extended struct
132 + VdpGetProcAddress *vdp_get_proc_address;
134 + VdpPresentationQueueTargetCreateX11 *vdp_queue_target_create_x11;
135 + VdpPresentationQueueTargetDestroy *vdp_queue_target_destroy;
136 + VdpPresentationQueueCreate *vdp_queue_create;
137 + VdpPresentationQueueDestroy *vdp_queue_destroy;
138 + VdpPresentationQueueDisplay *vdp_queue_display;
139 + VdpPresentationQueueBlockUntilSurfaceIdle *vdp_queue_block;
140 + VdpPresentationQueueSetBackgroundColor *vdp_queue_set_background_color;
141 + VdpPresentationQueueGetTime *vdp_queue_get_time;
142 + VdpPresentationQueueQuerySurfaceStatus *vdp_queue_query_surface_status;
144 + VdpPreemptionCallbackRegister *vdp_preemption_callback_register;
145 +} x11_visual_vdpau_t;