|
Packit Service |
9402ce |
/*
|
|
Packit Service |
9402ce |
* Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
|
|
Packit Service |
9402ce |
*
|
|
Packit Service |
9402ce |
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
Packit Service |
9402ce |
* copy of this software and associated documentation files (the
|
|
Packit Service |
9402ce |
* "Software"), to deal in the Software without restriction, including
|
|
Packit Service |
9402ce |
* without limitation the rights to use, copy, modify, merge, publish,
|
|
Packit Service |
9402ce |
* distribute, sub license, and/or sell copies of the Software, and to
|
|
Packit Service |
9402ce |
* permit persons to whom the Software is furnished to do so, subject to
|
|
Packit Service |
9402ce |
* the following conditions:
|
|
Packit Service |
9402ce |
*
|
|
Packit Service |
9402ce |
* The above copyright notice and this permission notice (including the
|
|
Packit Service |
9402ce |
* next paragraph) shall be included in all copies or substantial portions
|
|
Packit Service |
9402ce |
* of the Software.
|
|
Packit Service |
9402ce |
*
|
|
Packit Service |
9402ce |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
Packit Service |
9402ce |
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
Packit Service |
9402ce |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
|
Packit Service |
9402ce |
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
|
Packit Service |
9402ce |
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
Packit Service |
9402ce |
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
Packit Service |
9402ce |
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
Packit Service |
9402ce |
*/
|
|
Packit Service |
9402ce |
|
|
Packit Service |
9402ce |
#ifndef VA_GLX_H
|
|
Packit Service |
9402ce |
#define VA_GLX_H
|
|
Packit Service |
9402ce |
|
|
Packit Service |
9402ce |
#include <va/va.h>
|
|
Packit Service |
9402ce |
#include <GL/glx.h>
|
|
Packit Service |
9402ce |
|
|
Packit Service |
9402ce |
#ifdef __cplusplus
|
|
Packit Service |
9402ce |
extern "C" {
|
|
Packit Service |
9402ce |
#endif
|
|
Packit Service |
9402ce |
|
|
Packit Service |
9402ce |
/**
|
|
Packit Service |
9402ce |
* Return a suitable VADisplay for VA API
|
|
Packit Service |
9402ce |
*
|
|
Packit Service |
9402ce |
* @param[in] dpy the X11 display
|
|
Packit Service |
9402ce |
* @return a VADisplay
|
|
Packit Service |
9402ce |
*/
|
|
Packit Service |
9402ce |
VADisplay vaGetDisplayGLX(
|
|
Packit Service |
9402ce |
Display *dpy
|
|
Packit Service |
9402ce |
);
|
|
Packit Service |
9402ce |
|
|
Packit Service |
9402ce |
/**
|
|
Packit Service |
9402ce |
* Create a surface used for display to OpenGL
|
|
Packit Service |
9402ce |
*
|
|
Packit Service |
9402ce |
* The application shall maintain the live GLX context itself.
|
|
Packit Service |
9402ce |
* Implementations are free to use glXGetCurrentContext() and
|
|
Packit Service |
9402ce |
* glXGetCurrentDrawable() functions for internal purposes.
|
|
Packit Service |
9402ce |
*
|
|
Packit Service |
9402ce |
* @param[in] dpy the VA display
|
|
Packit Service |
9402ce |
* @param[in] target the GL target to which the texture needs to be bound
|
|
Packit Service |
9402ce |
* @param[in] texture the GL texture
|
|
Packit Service |
9402ce |
* @param[out] gl_surface the VA/GLX surface
|
|
Packit Service |
9402ce |
* @return VA_STATUS_SUCCESS if successful
|
|
Packit Service |
9402ce |
*/
|
|
Packit Service |
9402ce |
VAStatus vaCreateSurfaceGLX(
|
|
Packit Service |
9402ce |
VADisplay dpy,
|
|
Packit Service |
9402ce |
GLenum target,
|
|
Packit Service |
9402ce |
GLuint texture,
|
|
Packit Service |
9402ce |
void **gl_surface
|
|
Packit Service |
9402ce |
);
|
|
Packit Service |
9402ce |
|
|
Packit Service |
9402ce |
/**
|
|
Packit Service |
9402ce |
* Destroy a VA/GLX surface
|
|
Packit Service |
9402ce |
*
|
|
Packit Service |
9402ce |
* The application shall maintain the live GLX context itself.
|
|
Packit Service |
9402ce |
* Implementations are free to use glXGetCurrentContext() and
|
|
Packit Service |
9402ce |
* glXGetCurrentDrawable() functions for internal purposes.
|
|
Packit Service |
9402ce |
*
|
|
Packit Service |
9402ce |
* @param[in] dpy the VA display
|
|
Packit Service |
9402ce |
* @param[in] gl_surface the VA surface
|
|
Packit Service |
9402ce |
* @return VA_STATUS_SUCCESS if successful
|
|
Packit Service |
9402ce |
*/
|
|
Packit Service |
9402ce |
VAStatus vaDestroySurfaceGLX(
|
|
Packit Service |
9402ce |
VADisplay dpy,
|
|
Packit Service |
9402ce |
void *gl_surface
|
|
Packit Service |
9402ce |
);
|
|
Packit Service |
9402ce |
|
|
Packit Service |
9402ce |
/**
|
|
Packit Service |
9402ce |
* Copy a VA surface to a VA/GLX surface
|
|
Packit Service |
9402ce |
*
|
|
Packit Service |
9402ce |
* This function will not return until the copy is completed. At this
|
|
Packit Service |
9402ce |
* point, the underlying GL texture will contain the surface pixels
|
|
Packit Service |
9402ce |
* in an RGB format defined by the user.
|
|
Packit Service |
9402ce |
*
|
|
Packit Service |
9402ce |
* The application shall maintain the live GLX context itself.
|
|
Packit Service |
9402ce |
* Implementations are free to use glXGetCurrentContext() and
|
|
Packit Service |
9402ce |
* glXGetCurrentDrawable() functions for internal purposes.
|
|
Packit Service |
9402ce |
*
|
|
Packit Service |
9402ce |
* @param[in] dpy the VA display
|
|
Packit Service |
9402ce |
* @param[in] gl_surface the VA/GLX destination surface
|
|
Packit Service |
9402ce |
* @param[in] surface the VA source surface
|
|
Packit Service |
9402ce |
* @param[in] flags the PutSurface flags
|
|
Packit Service |
9402ce |
* @return VA_STATUS_SUCCESS if successful
|
|
Packit Service |
9402ce |
*/
|
|
Packit Service |
9402ce |
VAStatus vaCopySurfaceGLX(
|
|
Packit Service |
9402ce |
VADisplay dpy,
|
|
Packit Service |
9402ce |
void *gl_surface,
|
|
Packit Service |
9402ce |
VASurfaceID surface,
|
|
Packit Service |
9402ce |
unsigned int flags
|
|
Packit Service |
9402ce |
);
|
|
Packit Service |
9402ce |
|
|
Packit Service |
9402ce |
#ifdef __cplusplus
|
|
Packit Service |
9402ce |
}
|
|
Packit Service |
9402ce |
#endif
|
|
Packit Service |
9402ce |
|
|
Packit Service |
9402ce |
#endif /* VA_GLX_H */
|