1 diff -urNp -x '*.orig' xine-lib-1.2.8.org/src/video_out/Makefile.am xine-lib-1.2.8/src/video_out/Makefile.am
2 --- xine-lib-1.2.8.org/src/video_out/Makefile.am 2017-02-21 12:13:13.000000000 +0100
3 +++ xine-lib-1.2.8/src/video_out/Makefile.am 2022-02-14 00:14:01.953771680 +0100
4 @@ -48,6 +48,9 @@ endif
7 vdpau_module = xineplug_vo_out_vdpau.la
9 +xine_includedir = $(includedir)/xine
10 +xine_include_HEADERS = video_out_vdpau.h
14 diff -urNp -x '*.orig' xine-lib-1.2.8.org/src/video_out/video_out_vdpau.c xine-lib-1.2.8/src/video_out/video_out_vdpau.c
15 --- xine-lib-1.2.8.org/src/video_out/video_out_vdpau.c 2017-02-21 12:13:13.000000000 +0100
16 +++ xine-lib-1.2.8/src/video_out/video_out_vdpau.c 2022-02-14 00:14:01.953771680 +0100
18 #include <vdpau/vdpau_x11.h>
19 #include "accel_vdpau.h"
21 +#include "video_out_vdpau.h"
24 #define NUM_FRAMES_BACK 1
25 @@ -2637,6 +2638,7 @@ static vo_driver_t *vdpau_open_plugin (v
27 vdpau_class_t *class = (vdpau_class_t *) class_gen;
28 x11_visual_t *visual = (x11_visual_t *) visual_gen;
29 + x11_visual_vdpau_t *vdpau = visual->d ? NULL : (x11_visual_vdpau_t *) visual_gen;
31 config_values_t *config = class->xine->config;
33 @@ -2713,15 +2715,22 @@ static vo_driver_t *vdpau_open_plugin (v
34 this->ovl_src_rect.x0 = 0;
35 this->ovl_src_rect.y0 = 0;
37 - VdpStatus st = vdp_device_create_x11( visual->display, visual->screen, &vdp_device, &vdp_get_proc_address );
38 - if ( st != VDP_STATUS_OK ) {
39 - fprintf(stderr, "vo_vdpau: Can't create vdp device : " );
40 - if ( st == VDP_STATUS_NO_IMPLEMENTATION )
41 - fprintf(stderr, "No vdpau implementation.\n" );
43 - fprintf(stderr, "unsupported GPU?\n" );
44 - vdpau_dispose( &this->vo_driver );
48 + vdp_device = vdpau->device;
49 + vdp_get_proc_address = vdpau->vdp_get_proc_address;
52 + st = vdp_device_create_x11( visual->display, visual->screen, &vdp_device, &vdp_get_proc_address );
53 + if ( st != VDP_STATUS_OK ) {
54 + fprintf(stderr, "vo_vdpau: Can't create vdp device : " );
55 + if ( st == VDP_STATUS_NO_IMPLEMENTATION )
56 + fprintf(stderr, "No vdpau implementation.\n" );
58 + fprintf(stderr, "unsupported GPU?\n" );
59 + vdpau_dispose( &this->vo_driver );
63 st = vdp_get_proc_address( vdp_device, VDP_FUNC_ID_GET_ERROR_STRING , (void*)&vdp_get_error_string );
64 if ( vdpau_init_error( st, "Can't get GET_ERROR_STRING proc address !!", &this->vo_driver, 0 ) )
65 @@ -2929,6 +2938,22 @@ static vo_driver_t *vdpau_open_plugin (v
66 if ( vdpau_init_error( st, "Can't get PREEMPTION_CALLBACK_REGISTER proc address !!", &this->vo_driver, 1 ) )
69 + /* Check for extended initialization */
71 + vdp_queue_target_create_x11 = vdpau->vdp_queue_target_create_x11;
72 + vdp_queue_target_destroy = vdpau->vdp_queue_target_destroy;
73 + vdp_queue_create = vdpau->vdp_queue_create;
74 + vdp_queue_destroy = vdpau->vdp_queue_destroy;
75 + vdp_queue_display = vdpau->vdp_queue_display;
76 + vdp_queue_block = vdpau->vdp_queue_block;
77 + vdp_queue_set_background_color = vdpau->vdp_queue_set_background_color;
78 + vdp_queue_get_time = vdpau->vdp_queue_get_time;
79 + vdp_queue_query_surface_status = vdpau->vdp_queue_query_surface_status;
81 + vdp_preemption_callback_register = vdpau->vdp_preemption_callback_register;
85 st = vdp_preemption_callback_register(vdp_device, &vdp_preemption_callback, (void*)this);
86 if ( vdpau_init_error( st, "Can't register preemption callback !!", &this->vo_driver, 1 ) )
88 diff -urNp -x '*.orig' xine-lib-1.2.8.org/src/video_out/video_out_vdpau.h xine-lib-1.2.8/src/video_out/video_out_vdpau.h
89 --- xine-lib-1.2.8.org/src/video_out/video_out_vdpau.h 1970-01-01 01:00:00.000000000 +0100
90 +++ xine-lib-1.2.8/src/video_out/video_out_vdpau.h 2022-02-14 00:14:01.953771680 +0100
93 + * kate: space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; remove-trailing-space on;
94 + * Copyright (C) 2008 the xine project
95 + * Copyright (C) 2008 Christophe Thommeret <hftom@free.fr>
97 + * This file is part of xine, a free video player.
99 + * xine is free software; you can redistribute it and/or modify
100 + * it under the terms of the GNU General Public License as published by
101 + * the Free Software Foundation; either version 2 of the License, or
102 + * (at your option) any later version.
104 + * xine is distributed in the hope that it will be useful,
105 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
106 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
107 + * GNU General Public License for more details.
109 + * You should have received a copy of the GNU General Public License
110 + * along with this program; if not, write to the Free Software
111 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
114 + * video_out_vdpau.c, a video output plugin
115 + * using VDPAU (Video Decode and Presentation Api for Unix)
120 +#ifndef __VIDEO_OUT__VDPAU_H__
121 +#define __VIDEO_OUT__VDPAU_H__
125 +#include <vdpau/vdpau_x11.h>
129 + x11_visual_t x11; // if x11.d (drawable) is zero, it will use this extended struct
133 + VdpGetProcAddress *vdp_get_proc_address;
135 + VdpPresentationQueueTargetCreateX11 *vdp_queue_target_create_x11;
136 + VdpPresentationQueueTargetDestroy *vdp_queue_target_destroy;
137 + VdpPresentationQueueCreate *vdp_queue_create;
138 + VdpPresentationQueueDestroy *vdp_queue_destroy;
139 + VdpPresentationQueueDisplay *vdp_queue_display;
140 + VdpPresentationQueueBlockUntilSurfaceIdle *vdp_queue_block;
141 + VdpPresentationQueueSetBackgroundColor *vdp_queue_set_background_color;
142 + VdpPresentationQueueGetTime *vdp_queue_get_time;
143 + VdpPresentationQueueQuerySurfaceStatus *vdp_queue_query_surface_status;
145 + VdpPreemptionCallbackRegister *vdp_preemption_callback_register;
146 +} x11_visual_vdpau_t;