1 /** 2 3 */ 4 5 /*************************************************************************** 6 * * 7 * This program is free software; you can redistribute it and/or modify * 8 * it under the terms of the GNU General Public License as published by * 9 * the Free Software Foundation; either version 2 of the License, or * 10 * (at your option) any later version. * 11 * * 12 ***************************************************************************/ 13 #ifndef ADM_CORE_VDPAU_INTERNAL_H 14 #define ADM_CORE_VDPAU_INTERNAL_H 15 16 /** 17 \fn VdpFunctions 18 19 */ 20 typedef struct 21 { 22 VdpGetErrorString *getErrorString; 23 VdpGetApiVersion *getApiVersion; 24 VdpGetInformationString *getInformationString; 25 26 VdpDeviceDestroy *deviceDestroy; 27 28 VdpVideoSurfaceCreate *createSurface; 29 VdpVideoSurfaceDestroy *destroySurface; 30 VdpVideoSurfaceGetBitsYCbCr *getDataSurface; 31 VdpVideoSurfacePutBitsYCbCr *surfacePutBitsYCbCr; 32 33 34 35 VdpOutputSurfaceCreate *createOutputSurface; 36 VdpOutputSurfaceDestroy *destroyOutputSurface; 37 VdpOutputSurfacePutBitsYCbCr *putBitsYV12OutputSurface; 38 VdpOutputSurfaceQueryPutBitsYCbCrCapabilities *putBitsCapsOutputSurface; 39 VdpOutputSurfaceGetBitsNative *getBitsNativeOutputSurface; 40 41 VdpDecoderCreate *decoderCreate; 42 VdpDecoderDestroy *decoderDestroy; 43 VdpDecoderRender *decoderRender; 44 VdpDecoderQueryCapabilities *queryDecoderCapabilities; 45 46 VdpPresentationQueueTargetDestroy *presentationQueueDestroy; 47 VdpPresentationQueueCreate *presentationQueueCreate; 48 VdpPresentationQueueGetTime *presentationQueueGetTime; 49 VdpPresentationQueueDisplay *presentationQueueDisplay; 50 51 VdpVideoMixerCreate *mixerCreate; 52 VdpVideoMixerDestroy *mixerDestroy; 53 VdpVideoMixerRender *mixerRender; 54 VdpVideoMixerSetFeatureEnables *mixerEnableFeatures; 55 VdpVideoMixerGetFeatureEnables *mixerGetFeaturesEnabled; 56 VdpVideoMixerQueryFeatureSupport *mixerQueryFeatureSupported; 57 VdpVideoMixerGetAttributeValues *mixerGetAttributesValue; 58 VdpVideoMixerSetAttributeValues *mixerSetAttributesValue; 59 60 VdpOutputSurfaceGetParameters *mixerGetOutputSurfaceParameters; 61 VdpVideoSurfaceGetParameters *mixerGetSurfaceParameters; 62 63 VdpPresentationQueueTargetCreateX11 *presentationQueueDisplayX11Create; 64 65 66 }VdpFunctions; 67 68 namespace ADM_coreVdpau 69 { 70 extern VdpFunctions funcs; 71 extern VdpDevice vdpDevice; 72 } 73 74 #define CHECK(x) if(!isOperationnal()) {ADM_error("vdpau is not operationnal\n");return VDP_STATUS_ERROR;}\ 75 VdpStatus r=x;\ 76 if(VDP_STATUS_OK!=r) {ADM_warning(#x" call failed with error=%s\n",getErrorString(r));}return r; 77 78 #define CHECKBOOL(x) if(!isOperationnal())\ 79 {ADM_error("vdpau is not operationnal\n");return false;}\ 80 VdpStatus r=x;\ 81 if(VDP_STATUS_OK!=r) \ 82 {\ 83 ADM_warning(#x" call failed with error=%s\n",getErrorString(r));\ 84 return false;}; 85 86 #endif