m4_define([gst1_version], [1.0.0])
m4_define([gst1_plugins_base_version], [1.0.0])
m4_define([gst1_plugins_bad_version], [1.0.0])
+m4_define([gst12_version], [1.1.0])
+m4_define([gst12_plugins_base_version], [1.1.0])
+m4_define([gst12_plugins_bad_version], [1.1.0])
# Wayland minimum version number
m4_define([wayland_api_version], [1.0.0])
GST_PLUGINS_BASE_VERSION_REQUIRED=gst1_plugins_base_version
GST_PLUGINS_BAD_VERSION_REQUIRED=gst1_plugins_bad_version
;;
+1.2)
+ GST_VERSION_REQUIRED=gst12_version
+ GST_PLUGINS_BASE_VERSION_REQUIRED=gst12_plugins_base_version
+ GST_PLUGINS_BAD_VERSION_REQUIRED=gst12_plugins_bad_version
+ ;;
*)
AC_MSG_ERROR([unsupported GStreamer API version $GST_API_VERSION])
;;
USE_GST_API_0_10="no"
USE_GST_API_1_0p="no"
+USE_GST_API_1_2p="no"
AS_VERSION_COMPARE([$GST_API_VERSION], [0.10],
[], [USE_GST_API_0_10="yes"], [])
AS_VERSION_COMPARE([$GST_API_VERSION], [1.0],
[], [USE_GST_API_1_0p="yes"], [USE_GST_API_1_0p="yes"])
+AS_VERSION_COMPARE([$GST_API_VERSION], [1.2],
+ [], [USE_GST_API_1_2p="yes"], [USE_GST_API_1_2p="yes"])
AM_CONDITIONAL([USE_GST_API_0_10], [test "$USE_GST_API_0_10" = "yes"])
AM_CONDITIONAL([USE_GST_API_1_0p], [test "$USE_GST_API_1_0p" = "yes"])
+AM_CONDITIONAL([USE_GST_API_1_2p], [test "$USE_GST_API_1_2p" = "yes"])
+
+dnl XXX: GStreamer 1.2.x APIs don't have their own namespace yet
+GST_API_VERSION_ORIG=$GST_API_VERSION
+if test "$USE_GST_API_1_2p" = "yes"; then
+ GST_API_VERSION="1.0"
+fi
dnl GStreamer Core
PKG_CHECK_MODULES([GST],
AM_CONDITIONAL([USE_LOCAL_GST_VIDEO_DECODER],
[test "$ac_cv_have_gst_video_decoder" != "yes"])
-dnl GStreamer -bad plugins
+dnl GStreamer -bad plugins (deprecated in GStreamer v1.2)
+if test "$USE_GST_API_1_2p" != "yes"; then
PKG_CHECK_MODULES([GST_BASEVIDEO],
[gstreamer-basevideo-$GST_API_VERSION >= $GST_PLUGINS_BAD_VERSION_REQUIRED])
+fi
dnl ... bitstream parsers
if test "$enable_builtin_codecparsers" = "yes"; then
echo
echo $PACKAGE configuration summary:
echo
-echo GStreamer API version ............ : $GST_API_VERSION
+echo GStreamer API version ............ : $GST_API_VERSION_ORIG
echo VA-API version ................... : $VA_VERSION_STR
echo Video outputs .................... : $VIDEO_OUTPUTS
echo
gstvaapi.c \
gstvaapidecode.c \
gstvaapipluginutil.c \
- gstvaapipostproc.c \
gstvaapisink.c \
gstvaapiuploader.c \
gstvaapivideobuffer.c \
libgstvaapi_source_h = \
gstvaapidecode.h \
gstvaapipluginutil.h \
- gstvaapipostproc.h \
gstvaapisink.h \
gstvaapiuploader.h \
gstvaapivideobuffer.h \
gstvaapivideometa.h \
$(NULL)
+if !USE_GST_API_1_2p
+libgstvaapi_source_c += gstvaapipostproc.c
+libgstvaapi_source_h += gstvaapipostproc.h
+endif
+
libgstvaapi_x11_source_c = gstvaapivideoconverter_x11.c
libgstvaapi_x11_source_h = gstvaapivideoconverter_x11.h
if USE_X11
+if !USE_GST_API_1_2p
libgstvaapi_source_c += $(libgstvaapi_x11_source_c)
libgstvaapi_source_h += $(libgstvaapi_x11_source_h)
endif
+endif
libgstvaapi_glx_source_c = gstvaapivideoconverter_glx.c
libgstvaapi_glx_source_h = gstvaapivideoconverter_glx.h
if USE_GLX
+if !USE_GST_API_1_2p
libgstvaapi_source_c += $(libgstvaapi_glx_source_c)
libgstvaapi_source_h += $(libgstvaapi_glx_source_h)
endif
+endif
libgstvaapi_1_0p_source_c = \
gstvaapivideobufferpool.c \
gst_element_register(plugin, "vaapidecode",
GST_RANK_PRIMARY,
GST_TYPE_VAAPIDECODE);
+#if !GST_CHECK_VERSION(1,1,0)
gst_element_register(plugin, "vaapipostproc",
GST_RANK_PRIMARY,
GST_TYPE_VAAPIPOSTPROC);
+#endif
gst_element_register(plugin, "vaapisink",
GST_RANK_PRIMARY,
GST_TYPE_VAAPISINK);
#include "gst/vaapi/sysdeps.h"
#include <gst/vaapi/gstvaapidisplay.h>
+#if !GST_CHECK_VERSION(1,1,0)
#include <gst/video/videocontext.h>
+#endif
#include "gstvaapidecode.h"
#include "gstvaapipluginutil.h"
#endif
/* GstVideoContext interface */
+#if !GST_CHECK_VERSION(1,1,0)
static void
gst_vaapidecode_set_video_context(GstVideoContext *context, const gchar *type,
const GValue *value)
}
#define GstVideoContextClass GstVideoContextInterface
+#endif
+
G_DEFINE_TYPE_WITH_CODE(
GstVaapiDecode,
gst_vaapidecode,
G_IMPLEMENT_INTERFACE(GST_TYPE_IMPLEMENTS_INTERFACE,
gst_vaapidecode_implements_iface_init);
#endif
+#if !GST_CHECK_VERSION(1,1,0)
G_IMPLEMENT_INTERFACE(GST_TYPE_VIDEO_CONTEXT,
- gst_video_context_interface_init))
+ gst_video_context_interface_init)
+#endif
+ )
static gboolean
gst_vaapidecode_update_src_caps(GstVaapiDecode *decode,
*/
#include "gst/vaapi/sysdeps.h"
+#if !GST_CHECK_VERSION(1,1,0)
#include <gst/video/videocontext.h>
+#endif
#if USE_DRM
# include <gst/vaapi/gstvaapidisplay_drm.h>
#endif
)
{
GstVaapiDisplay *display;
+#if !GST_CHECK_VERSION(1,1,0)
GstVideoContext *context;
g_return_val_if_fail(GST_IS_VIDEO_CONTEXT(element), FALSE);
+#endif
g_return_val_if_fail(display_ptr != NULL, FALSE);
/* Already exist ? */
if (display)
return TRUE;
+#if !GST_CHECK_VERSION(1,1,0)
context = GST_VIDEO_CONTEXT(element);
g_return_val_if_fail(context != NULL, FALSE);
gst_video_context_prepare(context, display_types);
+#endif
/* Neighbour found and it updated the display */
if (*display_ptr)
gboolean
gst_vaapi_reply_to_query(GstQuery *query, GstVaapiDisplay *display)
{
+#if GST_CHECK_VERSION(1,1,0)
+ return FALSE;
+#else
GstVaapiDisplayType display_type;
const gchar **types;
const gchar *type;
}
}
return res;
+#endif /* !GST_CHECK_VERSION(1,1,0) */
}
gboolean
#include "gst/vaapi/sysdeps.h"
#include <gst/gst.h>
#include <gst/video/video.h>
+#if !GST_CHECK_VERSION(1,1,0)
#include <gst/video/videocontext.h>
+#endif
+
#include <gst/vaapi/gstvaapivalue.h>
#if USE_DRM
# include <gst/vaapi/gstvaapidisplay_drm.h>
#endif
/* GstVideoContext interface */
+#if !GST_CHECK_VERSION(1,1,0)
static void
gst_vaapisink_set_video_context(GstVideoContext *context, const gchar *type,
const GValue *value)
{
iface->set_context = gst_vaapisink_set_video_context;
}
+#endif
static void
gst_vaapisink_video_overlay_iface_init(GstVideoOverlayInterface *iface);
G_IMPLEMENT_INTERFACE(GST_TYPE_IMPLEMENTS_INTERFACE,
gst_vaapisink_implements_iface_init);
#endif
+#if !GST_CHECK_VERSION(1,1,0)
G_IMPLEMENT_INTERFACE(GST_TYPE_VIDEO_CONTEXT,
gst_vaapisink_video_context_iface_init);
+#endif
G_IMPLEMENT_INTERFACE(GST_TYPE_VIDEO_OVERLAY,
gst_vaapisink_video_overlay_iface_init))
#include "gst/vaapi/sysdeps.h"
#include "gstvaapivideobuffer.h"
-#if USE_X11
+#if USE_X11 && !GST_CHECK_VERSION(1,1,0)
# include "gstvaapivideoconverter_x11.h"
#endif
-#if USE_GLX
+#if USE_GLX && !GST_CHECK_VERSION(1,1,0)
# include "gstvaapivideoconverter_glx.h"
#endif
-#if GST_CHECK_VERSION(1,0,0)
+#if GST_CHECK_VERSION(1,1,0)
+static inline GstBuffer *
+gst_surface_buffer_new(void)
+{
+ return gst_buffer_new();
+}
+#elif GST_CHECK_VERSION(1,0,0)
#include <gst/video/gstsurfacemeta.h>
#define GST_VAAPI_SURFACE_META_CAST(obj) \
GFunc func;
switch (gst_vaapi_display_get_display_type(display)) {
-#if USE_X11
+#if USE_X11 && !GST_CHECK_VERSION(1,1,0)
case GST_VAAPI_DISPLAY_TYPE_X11:
func = (GFunc)gst_vaapi_video_converter_x11_new;
break;
#endif
-#if USE_GLX
+#if USE_GLX && !GST_CHECK_VERSION(1,1,0)
case GST_VAAPI_DISPLAY_TYPE_GLX:
func = (GFunc)gst_vaapi_video_converter_glx_new;
break;