1 /* 2 * vdpau_video_glx.h - VDPAU backend for VA-API (GLX rendering) 3 * 4 * libva-vdpau-driver (C) 2009-2011 Splitted-Desktop Systems 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 19 */ 20 21 #ifndef VDPAU_VIDEO_GLX_H 22 #define VDPAU_VIDEO_GLX_H 23 24 #include "vdpau_driver.h" 25 #include "vdpau_video_x11.h" 26 #include "utils_glx.h" 27 28 typedef struct object_glx_surface object_glx_surface_t; 29 typedef struct object_glx_surface *object_glx_surface_p; 30 31 struct object_glx_surface { 32 struct object_base base; 33 GLContextState *gl_context; 34 GLVdpSurface *gl_surface; 35 object_output_p gl_output; 36 GLenum target; 37 GLuint texture; 38 VASurfaceID va_surface; 39 unsigned int width; 40 unsigned int height; 41 GLPixmapObject *pixo; 42 GLFramebufferObject *fbo; 43 }; 44 45 // vaCreateSurfaceGLX 46 VAStatus 47 vdpau_CreateSurfaceGLX( 48 VADriverContextP ctx, 49 unsigned int target, 50 unsigned int texture, 51 void **gl_surface 52 ) attribute_hidden; 53 54 // vaDestroySurfaceGLX 55 VAStatus 56 vdpau_DestroySurfaceGLX( 57 VADriverContextP ctx, 58 void *gl_surface 59 ) attribute_hidden; 60 61 // vaAssociateSurfaceGLX 62 VAStatus 63 vdpau_AssociateSurfaceGLX( 64 VADriverContextP ctx, 65 void *gl_surface, 66 VASurfaceID surface, 67 unsigned int flags 68 ) attribute_hidden; 69 70 // vaDeassociateSurfaceGLX 71 VAStatus 72 vdpau_DeassociateSurfaceGLX( 73 VADriverContextP ctx, 74 void *gl_surface 75 ) attribute_hidden; 76 77 // vaSyncSurfaceGLX 78 VAStatus 79 vdpau_SyncSurfaceGLX( 80 VADriverContextP ctx, 81 void *gl_surface 82 ) attribute_hidden; 83 84 // vaBeginRenderSurfaceGLX 85 VAStatus 86 vdpau_BeginRenderSurfaceGLX( 87 VADriverContextP ctx, 88 void *gl_surface 89 ) attribute_hidden; 90 91 // vaEndRenderSurfaceGLX 92 VAStatus 93 vdpau_EndRenderSurfaceGLX( 94 VADriverContextP ctx, 95 void *gl_surface 96 ) attribute_hidden; 97 98 // vaCopySurfaceGLX 99 VAStatus 100 vdpau_CopySurfaceGLX( 101 VADriverContextP ctx, 102 void *gl_surface, 103 VASurfaceID surface, 104 unsigned int flags 105 ) attribute_hidden; 106 107 #endif /* VDPAU_VIDEO_GLX_H */ 108