PKG_CHECK_MODULES([GST_INTERFACES],
[gstreamer-interfaces-$GST_MAJORMINOR >= gst_plugins_base_version])
-dnl ... GST_PLUGINS_BASE_CHECK_VERSION() implementation
-V=`$PKG_CONFIG --modversion gstreamer-plugins-base-$GST_MAJORMINOR`
-GST_PLUGINS_BASE_MAJOR_VERSION=`echo "$V" | cut -d'.' -f1`
-GST_PLUGINS_BASE_MINOR_VERSION=`echo "$V" | cut -d'.' -f2`
-GST_PLUGINS_BASE_MICRO_VERSION=`echo "$V" | cut -d'.' -f3`
-AC_SUBST(GST_PLUGINS_BASE_MAJOR_VERSION)
-AC_SUBST(GST_PLUGINS_BASE_MINOR_VERSION)
-AC_SUBST(GST_PLUGINS_BASE_MICRO_VERSION)
-
dnl ... GstVideoOverlayComposition (gstreamer-video)
PKG_CHECK_MODULES([GST_VIDEO],
[gstreamer-video-$GST_MAJORMINOR >= gst_plugins_base_version])
gst-libs/Makefile
gst-libs/gst/Makefile
gst-libs/gst/codecparsers/Makefile
- gst-libs/gst/gstutils_version.h
gst-libs/gst/vaapi/Makefile
gst/Makefile
gst/vaapi/Makefile
SUBDIRS = codecparsers vaapi
-gen_headers = gstutils_version.h
-noinst_HEADERS = $(gen_headers)
-EXTRA_DIST = gstutils_version.h.in
-
# Extra clean files so that maintainer-clean removes *everything*
MAINTAINERCLEANFILES = Makefile.in $(gen_headers)
+++ /dev/null
-/*
- * gstutils_version.h - GStreamer version utilities
- *
- * Copyright (C) 2011 Intel Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA
- */
-
-#ifndef GST_UTILS_VERSION_H
-#define GST_UTILS_VERSION_H
-
-/* gst-plugins-base version */
-#define GST_PLUGINS_BASE_MAJOR_VERSION @GST_PLUGINS_BASE_MAJOR_VERSION@
-#define GST_PLUGINS_BASE_MINOR_VERSION @GST_PLUGINS_BASE_MINOR_VERSION@
-#define GST_PLUGINS_BASE_MICRO_VERSION @GST_PLUGINS_BASE_MICRO_VERSION@
-
-/**
- * GST_UTILS_CHECK_VERSION:
- * @major: major version, like 1 in 1.2.3
- * @minor: minor version, like 2 in 1.2.3
- * @micro: micro version, like 3 in 1.2.3
- *
- * Evaluates to %TRUE if the version of gst-plugins-base is equal or
- * greater than @major, @minor and @micro
- */
-#define GST_UTILS_CHECK_VERSION(major,minor,micro, rmajor,rminor,rmicro) \
- ((rmajor) > (major) || \
- ((rmajor) == (major) && (rminor) > (minor)) || \
- ((rmajor) == (major) && (rminor) == (minor) && (rmicro) >= (micro)))
-
-/**
- * GST_PLUGINS_BASE_CHECK_VERSION:
- * @major: major version, like 1 in 1.2.3
- * @minor: minor version, like 2 in 1.2.3
- * @micro: micro version, like 3 in 1.2.3
- *
- * Evaluates to %TRUE if the version of gst-plugins-base is greater
- * than @major, @minor and @micro
- */
-#ifndef GST_PLUGINS_BASE_CHECK_VERSION
-#define GST_PLUGINS_BASE_CHECK_VERSION(major,minor,micro) \
- GST_UTILS_CHECK_VERSION(major,minor,micro, \
- GST_PLUGINS_BASE_MAJOR_VERSION, \
- GST_PLUGINS_BASE_MINOR_VERSION, \
- GST_PLUGINS_BASE_MICRO_VERSION)
-#endif
-
-#endif /* GST_UTILS_VERSION_H */
#include "config.h"
#include <gst/gst.h>
-#include <gst/gstutils_version.h>
#include <gst/video/video.h>
#include <gst/video/videocontext.h>
#include <gst/vaapi/gstvaapivideobuffer.h>
#include "gstvaapisink.h"
#include "gstvaapipluginutil.h"
-#define HAVE_GST_XOVERLAY_SET_WINDOW_HANDLE \
- GST_PLUGINS_BASE_CHECK_VERSION(0,10,31)
-
-#define HAVE_GST_XOVERLAY_SET_RENDER_RECTANGLE \
- GST_PLUGINS_BASE_CHECK_VERSION(0,10,29)
-
#define GST_PLUGIN_NAME "vaapisink"
#define GST_PLUGIN_DESC "A VA-API based videosink"
static GstFlowReturn
gst_vaapisink_show_frame(GstBaseSink *base_sink, GstBuffer *buffer);
-static inline void
-_gst_vaapisink_xoverlay_set_xid(GstXOverlay *overlay, guintptr window_id)
+static void
+gst_vaapisink_xoverlay_set_window_handle(GstXOverlay *overlay, guintptr window)
{
GstVaapiSink * const sink = GST_VAAPISINK(overlay);
sink->use_glx = FALSE;
sink->foreign_window = TRUE;
- gst_vaapisink_ensure_window_xid(sink, window_id);
-}
-
-#if HAVE_GST_XOVERLAY_SET_WINDOW_HANDLE
-static void
-gst_vaapisink_xoverlay_set_window_handle(GstXOverlay *overlay, guintptr window_id)
-{
- _gst_vaapisink_xoverlay_set_xid(overlay, window_id);
+ gst_vaapisink_ensure_window_xid(sink, window);
}
-#else
-static void
-gst_vaapisink_xoverlay_set_xid(GstXOverlay *overlay, XID xid)
-{
- _gst_vaapisink_xoverlay_set_xid(overlay, xid);
-}
-#endif
-#if HAVE_GST_XOVERLAY_SET_RENDER_RECTANGLE
static void
gst_vaapisink_xoverlay_set_render_rectangle(
GstXOverlay *overlay,
display_rect->x, display_rect->y,
display_rect->width, display_rect->height);
}
-#endif
static void
gst_vaapisink_xoverlay_expose(GstXOverlay *overlay)
static void
gst_vaapisink_xoverlay_iface_init(GstXOverlayClass *iface)
{
-#if HAVE_GST_XOVERLAY_SET_WINDOW_HANDLE
iface->set_window_handle = gst_vaapisink_xoverlay_set_window_handle;
-#else
- iface->set_xwindow_id = gst_vaapisink_xoverlay_set_xid;
-#endif
-#if HAVE_GST_XOVERLAY_SET_RENDER_RECTANGLE
iface->set_render_rectangle = gst_vaapisink_xoverlay_set_render_rectangle;
-#endif
iface->expose = gst_vaapisink_xoverlay_expose;
}