vaapiplugin: allocate GLX buffers when supported.
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>
Sat, 5 Nov 2011 00:07:52 +0000 (20:07 -0400)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 8 Dec 2011 14:13:42 +0000 (15:13 +0100)
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
gst/vaapi/gstvaapiconvert.c
gst/vaapi/gstvaapidecode.c

index 1574de7..043a6ba 100644 (file)
 #include <gst/vaapi/gstvaapivideosink.h>
 #include <gst/vaapi/gstvaapivideobuffer.h>
 
+#if USE_VAAPI_GLX
+#include <gst/vaapi/gstvaapivideobuffer_glx.h>
+#define gst_vaapi_video_buffer_new_from_pool(pool) \
+    gst_vaapi_video_buffer_glx_new_from_pool(pool)
+#define gst_vaapi_video_buffer_new_from_buffer(buffer) \
+    gst_vaapi_video_buffer_glx_new_from_buffer(buffer)
+#endif
+
 #include "gstvaapipluginutil.h"
 #include "gstvaapiconvert.h"
 
index f267d0f..dff200b 100644 (file)
 #include <gst/vaapi/gstvaapidecoder_ffmpeg.h>
 #include <gst/video/videocontext.h>
 
+#if USE_VAAPI_GLX
+#include <gst/vaapi/gstvaapivideobuffer_glx.h>
+#define gst_vaapi_video_buffer_new(display) \
+    gst_vaapi_video_buffer_glx_new(GST_VAAPI_DISPLAY_GLX(display))
+#endif
+
 #include "gstvaapidecode.h"
 #include "gstvaapipluginutil.h"