1 /***************************************************************************
2 \file : ADM_coreVdpau.cpp
3 \brief : Wrapper around vdpau functions
4 \author : (C) 2010 by mean fixounet@free.fr
5 ***************************************************************************/
6
7 /***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15 #include "ADM_default.h"
16 #include "../include/ADM_coreVdpau.h"
17 #ifdef USE_VDPAU
18 #include "../include/ADM_coreVdpauInternal.h"
19 #include "ADM_dynamicLoading.h"
20 #include <map>
21
22 #if 0
23 #define VDP_TRACK printf
24 #else
25 #define VDP_TRACK(...) {}
26 #endif
27
28 GUI_WindowInfo admVdpau::myWindowInfo;
29
30
31 typedef std::map<VdpVideoSurface ,bool >::iterator myIterator;
32
33 namespace ADM_coreVdpau
34 {
35 VdpFunctions funcs;
36 VdpDevice vdpDevice;
37 }
38
39 static ADM_LibWrapper vdpauDynaLoader;
40 static VdpDeviceCreateX11 *ADM_createVdpX11;
41 static VdpGetProcAddress *vdpProcAddress;
42 static bool coreVdpWorking=false;
43 static VdpPresentationQueueTarget queueX11;
44
45
46
47 static std::map <VdpVideoSurface ,bool >listOfAllocatedSurface;
48 /**
49 * \fn admVdpau_exitCleanup
50 */
admVdpau_exitCleanup()51 bool admVdpau_exitCleanup()
52 {
53 std::map <VdpVideoSurface ,bool > cpy=listOfAllocatedSurface;
54 int n=cpy.size();
55 printf("At exit, we have still %d surface\n",n);
56 myIterator it=cpy.begin();
57 for(;it!=cpy.end();it++)
58 admVdpau::surfaceDestroy(it->first);
59 printf("After cleanup we have %d surface\n",(int)listOfAllocatedSurface.size());
60
61 admVdpau::cleanup();
62 return true;
63 }
64
65
66 /**
67 \fn getFunc
68 \brief vdpau function pointers from ID
69 */
getFunc(uint32_t id)70 static void *getFunc(uint32_t id)
71 {
72 void *f;
73 if(VDP_STATUS_OK!=vdpProcAddress(ADM_coreVdpau::vdpDevice,id,&f)) return NULL;
74 return (void *)f;
75 }
76 /**
77
78 */
getVdpDevice(void)79 void *admVdpau::getVdpDevice(void)
80 {
81 return (void *)(intptr_t)ADM_coreVdpau::vdpDevice;
82 }
83 /**
84
85 */
getProcAddress(void)86 void *admVdpau::getProcAddress(void)
87 {
88 printf("==> GetProcAddress called\n");
89 return (void *)vdpProcAddress;
90 }
getProcAddress2(void)91 VdpGetProcAddress *admVdpau::getProcAddress2(void)
92 {
93 printf("==> GetProcAddress called\n");
94 return vdpProcAddress;
95 }
96
97 /**
98 \fn init
99 \brief
100 */
init(GUI_WindowInfo * x)101 bool admVdpau::init(GUI_WindowInfo *x)
102 {
103 memset(&ADM_coreVdpau::funcs,0,sizeof(ADM_coreVdpau::funcs));
104 if(false==vdpauDynaLoader.loadLibrary("libvdpau.so"))
105 {
106 ADM_info("Cannot load libvdpau.so\n");
107 return false;
108 }
109 ADM_createVdpX11=(VdpDeviceCreateX11*)vdpauDynaLoader.getSymbol("vdp_device_create_x11");
110 if(!ADM_createVdpX11) return false;
111
112 //
113 // try to create....
114 if( VDP_STATUS_OK!=ADM_createVdpX11((Display*)x->display,0,&ADM_coreVdpau::vdpDevice,&vdpProcAddress))
115 {
116 return false;
117 }
118 // Now that we have the vdpProcAddress, time to get the functions....
119 #if 0 //def HAS_MOVE_SEMANTICS
120 #define myTypeOf decltype
121 #else
122 #define myTypeOf typeof
123 #endif
124 #define GetMe(fun,id) ADM_coreVdpau::funcs.fun= (myTypeOf(ADM_coreVdpau::funcs.fun))getFunc(id);ADM_assert(ADM_coreVdpau::funcs.fun);
125
126 GetMe(deviceDestroy,VDP_FUNC_ID_DEVICE_DESTROY);
127 GetMe(getErrorString,VDP_FUNC_ID_GET_ERROR_STRING);
128 GetMe(getApiVersion,VDP_FUNC_ID_GET_API_VERSION);
129 GetMe(getInformationString,VDP_FUNC_ID_GET_INFORMATION_STRING);
130
131 GetMe(createSurface,VDP_FUNC_ID_VIDEO_SURFACE_CREATE);
132 GetMe(destroySurface,VDP_FUNC_ID_VIDEO_SURFACE_DESTROY);
133 GetMe(getDataSurface,VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR);
134 GetMe(surfacePutBitsYCbCr,VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR);
135
136
137 GetMe(decoderCreate,VDP_FUNC_ID_DECODER_CREATE);
138 GetMe(decoderDestroy,VDP_FUNC_ID_DECODER_DESTROY);
139 GetMe(decoderRender,VDP_FUNC_ID_DECODER_RENDER);
140 GetMe(createOutputSurface,VDP_FUNC_ID_OUTPUT_SURFACE_CREATE);
141 GetMe(destroyOutputSurface,VDP_FUNC_ID_OUTPUT_SURFACE_DESTROY);
142 GetMe(putBitsYV12OutputSurface,VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_Y_CB_CR);
143 GetMe(putBitsCapsOutputSurface,VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_Y_CB_CR_CAPABILITIES);
144 GetMe(getBitsNativeOutputSurface,VDP_FUNC_ID_OUTPUT_SURFACE_GET_BITS_NATIVE);
145 GetMe(queryDecoderCapabilities,VDP_FUNC_ID_DECODER_QUERY_CAPABILITIES);
146
147
148 GetMe(presentationQueueDestroy,VDP_FUNC_ID_PRESENTATION_QUEUE_DESTROY);
149 GetMe(presentationQueueCreate,VDP_FUNC_ID_PRESENTATION_QUEUE_CREATE);
150 GetMe(presentationQueueGetTime,VDP_FUNC_ID_PRESENTATION_QUEUE_GET_TIME);
151 GetMe(presentationQueueDisplay,VDP_FUNC_ID_PRESENTATION_QUEUE_DISPLAY);
152
153 GetMe(presentationQueueDisplayX11Create,VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_CREATE_X11);
154
155 GetMe(mixerCreate,VDP_FUNC_ID_VIDEO_MIXER_CREATE);
156 GetMe(mixerDestroy,VDP_FUNC_ID_VIDEO_MIXER_DESTROY);
157 GetMe(mixerRender,VDP_FUNC_ID_VIDEO_MIXER_RENDER);
158 GetMe(mixerEnableFeatures,VDP_FUNC_ID_VIDEO_MIXER_SET_FEATURE_ENABLES);
159 GetMe(mixerQueryFeatureSupported,VDP_FUNC_ID_VIDEO_MIXER_QUERY_FEATURE_SUPPORT);
160 GetMe(mixerGetFeaturesEnabled,VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_ENABLES);
161
162 GetMe(mixerGetAttributesValue,VDP_FUNC_ID_VIDEO_MIXER_GET_ATTRIBUTE_VALUES);
163 GetMe(mixerSetAttributesValue,VDP_FUNC_ID_VIDEO_MIXER_SET_ATTRIBUTE_VALUES);
164 GetMe(mixerGetOutputSurfaceParameters,VDP_FUNC_ID_OUTPUT_SURFACE_GET_PARAMETERS); ///
165 GetMe(mixerGetSurfaceParameters,VDP_FUNC_ID_VIDEO_SURFACE_GET_PARAMETERS); ///
166 if(VDP_STATUS_OK!=ADM_coreVdpau::funcs.presentationQueueDisplayX11Create(ADM_coreVdpau::vdpDevice,x->systemWindowId,&queueX11))
167 {
168 ADM_warning("Cannot create X11 Presentation Queue\n");
169 return false;
170 }
171
172 const char *versionString=NULL;
173 uint32_t version=0xff;
174 ADM_coreVdpau::funcs.getInformationString(&versionString);
175 ADM_coreVdpau::funcs.getApiVersion(&version);
176 ADM_info("[VDPAU] API : 0x%x, info : %s\n",version,versionString);
177
178 coreVdpWorking=true;
179 myWindowInfo=*x;
180 #if 0
181 ADM_info("Checking supported format\n");
182 // See http://us.download.nvidia.com/XFree86/Linux-x86/195.36.24/README/vdpausupport.html#vdpau-implementation-limits-output-surface
183 ADM_info("FORMAT_B8G8R8A8->VDP_YCBCR_FORMAT_NV12 : %d\n",(int)queryYUVPutBitSupport(VDP_RGBA_FORMAT_B8G8R8A8,VDP_YCBCR_FORMAT_NV12));
184 ADM_info("FORMAT_B8G8R8A8->VDP_YCBCR_FORMAT_YV12 : %d\n",(int)queryYUVPutBitSupport(VDP_RGBA_FORMAT_B8G8R8A8,VDP_YCBCR_FORMAT_YV12));
185 ADM_info("FORMAT_B8G8R8A8->VDP_YCBCR_FORMAT_UYVY : %d\n",(int)queryYUVPutBitSupport(VDP_RGBA_FORMAT_B8G8R8A8,VDP_YCBCR_FORMAT_UYVY));
186 ADM_info("FORMAT_B8G8R8A8->VDP_YCBCR_FORMAT_Y8U8V8A8 : %d\n",(int)queryYUVPutBitSupport(VDP_RGBA_FORMAT_B8G8R8A8,VDP_YCBCR_FORMAT_Y8U8V8A8));
187
188 ADM_info("FORMAT_R8G8B8A8->VDP_YCBCR_FORMAT_NV12 : %d\n",(int)queryYUVPutBitSupport(VDP_RGBA_FORMAT_R8G8B8A8,VDP_YCBCR_FORMAT_NV12));
189 ADM_info("FORMAT_R8G8B8A8->VDP_YCBCR_FORMAT_YV12 : %d\n",(int)queryYUVPutBitSupport(VDP_RGBA_FORMAT_R8G8B8A8,VDP_YCBCR_FORMAT_YV12));
190 ADM_info("FORMAT_R8G8B8A8->VDP_YCBCR_FORMAT_UYVY : %d\n",(int)queryYUVPutBitSupport(VDP_RGBA_FORMAT_R8G8B8A8,VDP_YCBCR_FORMAT_UYVY));
191 #endif
192 ADM_info("Vdpau supports VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL : %d\n",(int)mixerFeatureSupported(VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL_SPATIAL));
193 ADM_info("Vdpau supports VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL : %d\n",(int)mixerFeatureSupported(VDP_VIDEO_MIXER_FEATURE_DEINTERLACE_TEMPORAL));
194 ADM_info("Vdpau supports VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L5 : %d\n",(int)mixerFeatureSupported(VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L5));
195 ADM_info("Vdpau supports VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L3 : %d\n",(int)mixerFeatureSupported(VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L3));
196 ADM_info("Vdpau supports VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 : %d\n",(int)mixerFeatureSupported(VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1));
197 ADM_info("Vdpau supports VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION : %d\n",(int)mixerFeatureSupported(VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION));
198 ADM_info("Vdpau supports VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE : %d\n",(int)mixerFeatureSupported(VDP_VIDEO_MIXER_FEATURE_INVERSE_TELECINE));
199
200 ADM_info("VDPAU renderer init ok.\n");
201 return true;
202 }
203 /**
204 \fn cleanup
205 */
cleanup(void)206 bool admVdpau::cleanup(void)
207 {
208 if(true==coreVdpWorking)
209 {
210 ADM_info("Destroying vdp device..\n");
211 ADM_coreVdpau::funcs.deviceDestroy(ADM_coreVdpau::vdpDevice);
212 ADM_coreVdpau::vdpDevice=VDP_INVALID_HANDLE;
213 }
214 coreVdpWorking=false;
215 return true;
216 }
217 /**
218 \fn queryYUVPutBitSupport
219 */
queryYUVPutBitSupport(VdpRGBAFormat rgb,VdpYCbCrFormat yuv)220 bool admVdpau::queryYUVPutBitSupport(VdpRGBAFormat rgb,VdpYCbCrFormat yuv)
221 {
222 VdpBool c;
223 if(VDP_STATUS_OK!=ADM_coreVdpau::funcs.putBitsCapsOutputSurface(ADM_coreVdpau::vdpDevice,rgb,yuv,&c))
224 {
225 ADM_warning("Query YCBCR put bits failed\n");
226 return false;
227 }
228 if(c) return true;
229 return false;
230 }
231
232 /**
233 \fn isOperationnal
234 */
isOperationnal(void)235 bool admVdpau::isOperationnal(void)
236 {
237 return coreVdpWorking;
238 }
239 /**
240 \fn
241 \brief
242 */
decoderCreate(VdpDevice dev,VdpDecoderProfile profile,uint32_t width,uint32_t height,uint32_t max_references,VdpDecoder * decoder)243 VdpStatus admVdpau::decoderCreate( VdpDevice dev,VdpDecoderProfile profile, uint32_t width,uint32_t height,
244 uint32_t max_references,VdpDecoder * decoder)
245 {
246 VDP_TRACK("Creating decoder\n");
247 CHECK(ADM_coreVdpau::funcs.decoderCreate(dev,profile,dimensionRoundUp(width),dimensionRoundUp(height),max_references,decoder));
248 }
249 /**
250 \fn
251 \brief
252 */
decoderDestroy(VdpDecoder decoder)253 VdpStatus admVdpau::decoderDestroy(VdpDecoder decoder)
254 {
255 VDP_TRACK("Destroying decoder\n");
256 CHECK(ADM_coreVdpau::funcs.decoderDestroy(decoder));
257 }
258 /**
259 \fn
260 \brief
261 */
262
surfaceCreate(uint32_t width,uint32_t height,VdpVideoSurface * surface)263 VdpStatus admVdpau::surfaceCreate(uint32_t width,uint32_t height,VdpVideoSurface *surface)
264 {
265
266 if(!isOperationnal())
267 {ADM_error("vdpau is not operationnal\n");return VDP_STATUS_ERROR;}
268 VDP_TRACK("[VDPAU] Creating surface %d x %d\n",(int)width,(int)height);
269 VdpStatus r=ADM_coreVdpau::funcs.createSurface(ADM_coreVdpau::vdpDevice,VDP_CHROMA_TYPE_420,dimensionRoundUp(width),dimensionRoundUp(height),surface);
270 if(VDP_STATUS_OK!=r)
271 {
272 ADM_warning("ADM_coreVdpau::funcs.createSurface(ADM_coreVdpau::vdpDevice,VDP_CHROMA_TYPE_420,width,height,surface) call failed with error=%s\n",getErrorString(r));
273 return r;
274 }
275 myIterator already = listOfAllocatedSurface.find(*surface);
276 if(already!=listOfAllocatedSurface.end())
277 {
278 ADM_assert("Doubly used vdpau surface\n");
279 }
280 listOfAllocatedSurface[*surface]=true;
281 return VDP_STATUS_OK;
282 }
283 /**
284 \fn
285 \brief
286 */
287
surfaceDestroy(VdpVideoSurface surface)288 VdpStatus admVdpau::surfaceDestroy(VdpVideoSurface surface)
289 {
290 // De we have it ?
291 myIterator already = listOfAllocatedSurface.find(surface);
292 if(already==listOfAllocatedSurface.end())
293 {
294 ADM_assert("Trying to destroy unallocated vdpau surface\n");
295 }
296 listOfAllocatedSurface.erase(already);
297 CHECK(ADM_coreVdpau::funcs.destroySurface(surface));
298 }
299 /**
300 \fn
301 \brief
302 */
303
getDataSurface(VdpVideoSurface surface,uint8_t * planes[3],uint32_t stride[3])304 VdpStatus admVdpau::getDataSurface(VdpVideoSurface surface,uint8_t *planes[3],uint32_t stride[3])
305 {
306 CHECK(ADM_coreVdpau::funcs.getDataSurface(
307 surface,
308 VDP_YCBCR_FORMAT_YV12, //VdpYCbCrFormat destination_ycbcr_format,
309 ( void * const *)planes, //void * const * destination_data,
310 stride //destination_pitches
311 ));
312 }
313 /**
314 \fn
315 \brief
316 */
surfacePutBits(VdpVideoSurface surface,uint8_t * planes[3],uint32_t stride[3])317 VdpStatus admVdpau::surfacePutBits(VdpVideoSurface surface,uint8_t *planes[3],uint32_t stride[3])
318 {
319 CHECK(ADM_coreVdpau::funcs.surfacePutBitsYCbCr(surface,
320 VDP_YCBCR_FORMAT_YV12, //VdpYCbCrFormat destination_ycbcr_format,
321 ( void * const *)planes, //void * const * destination_data,
322 stride //destination_pitches
323 ));
324 }
325 /**
326 \fn
327 \brief
328 */
329
getErrorString(VdpStatus er)330 const char *admVdpau::getErrorString(VdpStatus er)
331 {
332 return ADM_coreVdpau::funcs.getErrorString(er);
333 }
decoderRender(VdpDecoder decoder,VdpVideoSurface target,const void * info,uint32_t bitstream_buffer_count,VdpBitstreamBuffer const * bitstream_buffers)334 VdpStatus admVdpau::decoderRender(
335 VdpDecoder decoder,
336 VdpVideoSurface target,
337 const void *info,
338 uint32_t bitstream_buffer_count,
339 VdpBitstreamBuffer const * bitstream_buffers)
340 {
341 VDP_TRACK("Calling VDPAU decoder , target surface=%d\n",target);
342 CHECK(ADM_coreVdpau::funcs.decoderRender(decoder, target, (void * const *)info,bitstream_buffer_count, bitstream_buffers));
343 }
344 /**
345 \fn
346 \brief
347 */
348
outputSurfaceCreate(VdpRGBAFormat rgba_format,uint32_t width,uint32_t height,VdpOutputSurface * surface)349 VdpStatus admVdpau::outputSurfaceCreate(
350 VdpRGBAFormat rgba_format,
351 uint32_t width,
352 uint32_t height,
353 VdpOutputSurface * surface)
354 {
355 CHECK(ADM_coreVdpau::funcs.createOutputSurface(ADM_coreVdpau::vdpDevice,rgba_format, width,height,surface));
356 }
357 /**
358 \fn
359 \brief
360 */
361
outputSurfaceDestroy(VdpOutputSurface surface)362 VdpStatus admVdpau::outputSurfaceDestroy( VdpOutputSurface surface)
363 {
364 CHECK(ADM_coreVdpau::funcs.destroyOutputSurface(surface));
365 }
366 /**
367 \fn
368 \brief
369 */
370
outPutSurfacePutBitsYV12(VdpOutputSurface surface,uint8_t * planes[3],uint32_t pitches[3])371 VdpStatus admVdpau::outPutSurfacePutBitsYV12( VdpOutputSurface surface,
372 uint8_t *planes[3],
373 uint32_t pitches[3])
374 {
375 CHECK(ADM_coreVdpau::funcs.putBitsYV12OutputSurface(surface,VDP_YCBCR_FORMAT_YV12,
376 (void const * const *) planes,
377 pitches,
378 NULL,//VdpRect const * destination_rect,
379 NULL)); //VdpCSCMatrix const * csc_matrix );
380 }
381 /**
382 \fn outputSurfaceGetBitsNative
383 */
outputSurfaceGetBitsNative(VdpOutputSurface surface,uint8_t * buffer,uint32_t w,uint32_t h)384 VdpStatus admVdpau::outputSurfaceGetBitsNative(VdpOutputSurface surface, uint8_t *buffer, uint32_t w,uint32_t h)
385 {
386 // Only support RGBA 32
387 uint32_t pitches[3]={w*4,0,0};
388 uint8_t *ptr[4]={buffer,NULL,NULL};
389 CHECK(ADM_coreVdpau::funcs.getBitsNativeOutputSurface( surface,
390 NULL, // Rect
391 ( void * const *)ptr,
392 pitches));
393 }
394 /**
395 \fn outputSurfaceGetBitsNative_FieldWeave
396 */
outputSurfaceGetBitsNative_FieldWeave(VdpOutputSurface surface,uint8_t * buffer,uint32_t w,uint32_t h)397 VdpStatus admVdpau::outputSurfaceGetBitsNative_FieldWeave(VdpOutputSurface surface, uint8_t *buffer, uint32_t w,uint32_t h)
398 {
399 // Only support RGBA 32
400 uint32_t pitches[3]={w*8,0,0};
401 uint8_t *ptr[4]={buffer,NULL,NULL,NULL};
402 CHECK(ADM_coreVdpau::funcs.getBitsNativeOutputSurface( surface,
403 NULL, // Rect
404 ( void * const *)ptr,
405 pitches));
406 }
407
408
409 /**
410 \fn
411 \brief
412 */
outputSurfaceGetParameters(VdpOutputSurface surface,VdpRGBAFormat * rgba_format,uint32_t * width,uint32_t * height)413 VdpStatus admVdpau::outputSurfaceGetParameters( VdpOutputSurface surface, VdpRGBAFormat * rgba_format,
414 uint32_t * width, uint32_t * height)
415 {
416 CHECK(ADM_coreVdpau::funcs.mixerGetOutputSurfaceParameters(surface,rgba_format,width,height));
417 }
418 /**
419 */
surfaceGetParameters(VdpVideoSurface surface,VdpChromaType * chroma,uint32_t * w,uint32_t * h)420 VdpStatus admVdpau::surfaceGetParameters(VdpVideoSurface surface,VdpChromaType *chroma,uint32_t *w,uint32_t *h)
421 {
422 CHECK(ADM_coreVdpau::funcs.mixerGetSurfaceParameters(surface,chroma,w,h));
423 }
424
425 /**
426 \fn
427 \brief
428 */
429
presentationQueueCreate(VdpPresentationQueue * queue)430 VdpStatus admVdpau::presentationQueueCreate(VdpPresentationQueue *queue)
431 {
432 CHECK(ADM_coreVdpau::funcs.presentationQueueCreate(ADM_coreVdpau::vdpDevice,queueX11,queue));
433
434 }
435 /**
436 \fn
437 \brief
438 */
439
presentationQueueDestroy(VdpPresentationQueue queue)440 VdpStatus admVdpau::presentationQueueDestroy(VdpPresentationQueue queue)
441 {
442 CHECK(ADM_coreVdpau::funcs.presentationQueueDestroy(queue));
443 }
444 /**
445 \fn presentationQueueDisplay
446 \brief display immediately the outputsurface
447 */
448
presentationQueueDisplay(VdpPresentationQueue queue,VdpOutputSurface outputSurface)449 VdpStatus admVdpau::presentationQueueDisplay(VdpPresentationQueue queue,VdpOutputSurface outputSurface)
450 {
451 VdpTime t;
452 VdpStatus z=ADM_coreVdpau::funcs.presentationQueueGetTime(queue,&t);
453 if(VDP_STATUS_OK!=z)
454 {
455 ADM_warning("GetTime failed\n");
456 return z;
457 }
458 CHECK(ADM_coreVdpau::funcs.presentationQueueDisplay(queue,outputSurface,0,0,t));
459 }
460
461 #else
462 //******************************************
463 //******************************************
464 // Dummy when vdpau is not there...
465 // Dummy when vdpau is not there...
466 //******************************************
467 //******************************************
468 static bool coreVdpWorking=false;
init(GUI_WindowInfo * x)469 bool admVdpau::init(GUI_WindowInfo *x)
470 {
471 return false;
472 }
473
474 /**
475 \fn isOperationnal
476 */
isOperationnal(void)477 bool admVdpau::isOperationnal(void)
478 {
479 ADM_warning("This binary has no VPDAU support\n");
480 return coreVdpWorking;
481 }
cleanup(void)482 bool admVdpau::cleanup(void)
483 {
484 ADM_warning("This binary has no VPDAU support\n");
485 return true;
486 }
487 #endif
488 // EOF
489