Tizen 2.1 base
[framework/multimedia/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapicompat.h
1 /*
2  *  gstvapicompat.h - VA-API compatibility glue
3  *
4  *  Copyright (C) 2010-2011 Splitted-Desktop Systems
5  *
6  *  This library is free software; you can redistribute it and/or
7  *  modify it under the terms of the GNU Lesser General Public License
8  *  as published by the Free Software Foundation; either version 2.1
9  *  of the License, or (at your option) any later version.
10  *
11  *  This library 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 GNU
14  *  Lesser General Public License for more details.
15  *
16  *  You should have received a copy of the GNU Lesser General Public
17  *  License along with this library; if not, write to the Free
18  *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  *  Boston, MA 02110-1301 USA
20  */
21
22 #ifndef GST_VAAPI_COMPAT_H
23 #define GST_VAAPI_COMPAT_H
24
25 #include <va/va.h>
26
27 #ifdef HAVE_VA_VA_GLX_H
28 # define USE_VAAPI_GLX 1
29 #else
30 # define USE_VAAPI_GLX 0
31 #endif
32
33 #if USE_VAAPI_GLX
34 # include <va/va_glx.h>
35 #else
36 # define vaGetDisplayGLX(dpy) vaGetDisplay(dpy)
37 #endif
38
39 /* Compatibility glue with VA-API < 0.31 */
40 #if !VA_CHECK_VERSION(0,31,0)
41 #undef  vaSyncSurface
42 #define vaSyncSurface(dpy, s)   (vaSyncSurface)((dpy), VA_INVALID_ID, (s))
43 #undef  vaPutImage
44 #define vaPutImage              vaPutImage2
45 #undef  vaAssociateSubpicture
46 #define vaAssociateSubpicture   vaAssociateSubpicture2
47 #endif
48
49 /* Compatibility glue with VA-API 0.34 */
50 #if VA_CHECK_VERSION(0,34,0)
51 # include <va/va_compat.h>
52 #endif
53
54 #endif /* GST_VAAPI_COMPAT_H */