summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2010-10-06 08:22:23 +0000
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>2010-10-06 08:22:23 +0000
commitca0d7fa17fd70627577664b4b84cb8e512a89481 (patch)
tree3b2ee7238f856943e8e73714075a76f6c92026f9
parent194671bc2dd17e08daacf0fb2385ccd02bca91d7 (diff)
Add VA-API compat glue.
-rw-r--r--src/Makefile.am1
-rw-r--r--src/vaapi_compat.h64
-rw-r--r--src/vdpau_driver.h25
3 files changed, 66 insertions, 24 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index ff08e31..179e997 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,6 +24,7 @@ source_h = \
uasyncqueue.h \
ulist.h \
uqueue.h \
+ vaapi_compat.h \
vdpau_buffer.h \
vdpau_decode.h \
vdpau_driver.h \
diff --git a/src/vaapi_compat.h b/src/vaapi_compat.h
new file mode 100644
index 0000000..e711799
--- /dev/null
+++ b/src/vaapi_compat.h
@@ -0,0 +1,64 @@
+/*
+ * vaapi_compat.h - VA-API compatibility glue
+ *
+ * vdpau-video (C) 2009-2010 Splitted-Desktop Systems
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef VAAPI_COMPAT_H
+#define VAAPI_COMPAT_H
+
+#ifndef VA_INVALID_ID
+#define VA_INVALID_ID 0xffffffff
+#endif
+#ifndef VA_INVALID_BUFFER
+#define VA_INVALID_BUFFER VA_INVALID_ID
+#endif
+#ifndef VA_INVALID_SURFACE
+#define VA_INVALID_SURFACE VA_INVALID_ID
+#endif
+#ifndef VA_STATUS_ERROR_UNIMPLEMENTED
+#define VA_STATUS_ERROR_UNIMPLEMENTED 0x00000014
+#endif
+#ifndef VA_DISPLAY_X11
+#define VA_DISPLAY_X11 1
+#endif
+#ifndef VA_DISPLAY_GLX
+#define VA_DISPLAY_GLX 2
+#endif
+#ifndef VA_FILTER_SCALING_DEFAULT
+#define VA_FILTER_SCALING_DEFAULT 0x00000000
+#endif
+#ifndef VA_FILTER_SCALING_FAST
+#define VA_FILTER_SCALING_FAST 0x00000100
+#endif
+#ifndef VA_FILTER_SCALING_HQ
+#define VA_FILTER_SCALING_HQ 0x00000200
+#endif
+#ifndef VA_FILTER_SCALING_NL_ANAMORPHIC
+#define VA_FILTER_SCALING_NL_ANAMORPHIC 0x00000300
+#endif
+#ifndef VA_FILTER_SCALING_MASK
+#define VA_FILTER_SCALING_MASK 0x00000f00
+#endif
+
+#if VA_CHECK_VERSION(0,31,1)
+typedef void *VADrawable;
+#else
+typedef Drawable VADrawable;
+#endif
+
+#endif /* VAAPI_COMPAT_H */
diff --git a/src/vdpau_driver.h b/src/vdpau_driver.h
index 2d44a4b..c023afb 100644
--- a/src/vdpau_driver.h
+++ b/src/vdpau_driver.h
@@ -22,33 +22,10 @@
#define VDPAU_DRIVER_H
#include <va/va_backend.h>
+#include "vaapi_compat.h"
#include "vdpau_gate.h"
#include "object_heap.h"
-#ifndef VA_INVALID_ID
-#define VA_INVALID_ID 0xffffffff
-#endif
-#ifndef VA_INVALID_BUFFER
-#define VA_INVALID_BUFFER VA_INVALID_ID
-#endif
-#ifndef VA_INVALID_SURFACE
-#define VA_INVALID_SURFACE VA_INVALID_ID
-#endif
-#ifndef VA_STATUS_ERROR_UNIMPLEMENTED
-#define VA_STATUS_ERROR_UNIMPLEMENTED 0x00000014
-#endif
-#ifndef VA_DISPLAY_X11
-#define VA_DISPLAY_X11 1
-#endif
-#ifndef VA_DISPLAY_GLX
-#define VA_DISPLAY_GLX 2
-#endif
-
-#if VA_CHECK_VERSION(0,31,1)
-typedef void *VADrawable;
-#else
-typedef Drawable VADrawable;
-#endif
#define VDPAU_DRIVER_DATA_INIT \
struct vdpau_driver_data *driver_data = \