]> git.pld-linux.org Git - packages/xine-lib.git/blame - xine-lib-vdpau-hooks.patch
- rebuild with libcdio 2.0.0
[packages/xine-lib.git] / xine-lib-vdpau-hooks.patch
CommitLineData
2ff19726
JB
1diff -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
4@@ -40,6 +40,9 @@
5
6 if ENABLE_VDPAU
7 vdpau_module = xineplug_vo_out_vdpau.la
8+
9+xine_includedir = $(includedir)/xine
10+xine_include_HEADERS = video_out_vdpau.h
11 endif
12
13 if ENABLE_XCB
c930869b
JB
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
16@@ -51,6 +51,7 @@
2ff19726
JB
17 #include <vdpau/vdpau_x11.h>
18 #include "accel_vdpau.h"
19
20+#include "video_out_vdpau.h"
c930869b
JB
21
22
23 #define NUM_FRAMES_BACK 1
24@@ -2637,6 +2638,7 @@
2ff19726
JB
25 {
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;
29 vdpau_driver_t *this;
30 config_values_t *config = class->xine->config;
31 int i;
c930869b
JB
32@@ -2713,15 +2715,22 @@
33 this->ovl_src_rect.x0 = 0;
34 this->ovl_src_rect.y0 = 0;
2ff19726
JB
35
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" );
41- else
42- fprintf(stderr, "unsupported GPU?\n" );
43- vdpau_dispose( &this->vo_driver );
44- return NULL;
45+ VdpStatus st;
46+ if (vdpau) {
47+ vdp_device = vdpau->device;
48+ vdp_get_proc_address = vdpau->vdp_get_proc_address;
49+ }
50+ else {
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" );
56+ else
57+ fprintf(stderr, "unsupported GPU?\n" );
58+ vdpau_dispose( &this->vo_driver );
59+ return NULL;
60+ }
61 }
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 ) )
c930869b 64@@ -2929,6 +2938,22 @@
2ff19726
JB
65 if ( vdpau_init_error( st, "Can't get PREEMPTION_CALLBACK_REGISTER proc address !!", &this->vo_driver, 1 ) )
66 return NULL;
67
68+ /* Check for extended initialization */
69+ if (vdpau) {
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;
79+
80+ vdp_preemption_callback_register = vdpau->vdp_preemption_callback_register;
81+ }
82+
83+
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 ) )
86 return NULL;
87diff -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
90@@ -0,0 +1,58 @@
91+/*
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>
95+ *
96+ * This file is part of xine, a free video player.
97+ *
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.
102+ *
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.
107+ *
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
111+ *
112+ *
113+ * video_out_vdpau.c, a video output plugin
114+ * using VDPAU (Video Decode and Presentation Api for Unix)
115+ *
116+ *
117+ */
118+
119+#ifndef __VIDEO_OUT__VDPAU_H__
120+#define __VIDEO_OUT__VDPAU_H__
121+
122+#include <xine.h>
123+
124+#include <vdpau/vdpau_x11.h>
125+
126+
127+typedef struct {
128+ x11_visual_t x11; // if x11.d (drawable) is zero, it will use this extended struct
129+
130+ VdpDevice device;
131+
132+ VdpGetProcAddress *vdp_get_proc_address;
133+
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;
143+
144+ VdpPreemptionCallbackRegister *vdp_preemption_callback_register;
145+} x11_visual_vdpau_t;
146+
147+#endif
148+
This page took 0.133783 seconds and 4 git commands to generate.