mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
vaapisink: drop checks for new APIs used by default.
GStreamer -base plugins >= 0.10.31 are now required, so the checks for new APIs like GstXOverlay::set_window_handle() and ::set_render_rectangle() are no longer necessary.
This commit is contained in:
parent
edefbb1096
commit
bcae632c32
4 changed files with 3 additions and 107 deletions
10
configure.ac
10
configure.ac
|
@ -163,15 +163,6 @@ PKG_CHECK_MODULES([GST_PLUGINS_BASE],
|
||||||
PKG_CHECK_MODULES([GST_INTERFACES],
|
PKG_CHECK_MODULES([GST_INTERFACES],
|
||||||
[gstreamer-interfaces-$GST_MAJORMINOR >= gst_plugins_base_version])
|
[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)
|
dnl ... GstVideoOverlayComposition (gstreamer-video)
|
||||||
PKG_CHECK_MODULES([GST_VIDEO],
|
PKG_CHECK_MODULES([GST_VIDEO],
|
||||||
[gstreamer-video-$GST_MAJORMINOR >= gst_plugins_base_version])
|
[gstreamer-video-$GST_MAJORMINOR >= gst_plugins_base_version])
|
||||||
|
@ -452,7 +443,6 @@ debian.upstream/libgstvaapi-x11.install.in
|
||||||
gst-libs/Makefile
|
gst-libs/Makefile
|
||||||
gst-libs/gst/Makefile
|
gst-libs/gst/Makefile
|
||||||
gst-libs/gst/codecparsers/Makefile
|
gst-libs/gst/codecparsers/Makefile
|
||||||
gst-libs/gst/gstutils_version.h
|
|
||||||
gst-libs/gst/vaapi/Makefile
|
gst-libs/gst/vaapi/Makefile
|
||||||
gst/Makefile
|
gst/Makefile
|
||||||
gst/vaapi/Makefile
|
gst/vaapi/Makefile
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
SUBDIRS = codecparsers vaapi
|
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*
|
# Extra clean files so that maintainer-clean removes *everything*
|
||||||
MAINTAINERCLEANFILES = Makefile.in $(gen_headers)
|
MAINTAINERCLEANFILES = Makefile.in $(gen_headers)
|
||||||
|
|
|
@ -1,61 +0,0 @@
|
||||||
/*
|
|
||||||
* 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 */
|
|
|
@ -31,7 +31,6 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/gstutils_version.h>
|
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
#include <gst/video/videocontext.h>
|
#include <gst/video/videocontext.h>
|
||||||
#include <gst/vaapi/gstvaapivideobuffer.h>
|
#include <gst/vaapi/gstvaapivideobuffer.h>
|
||||||
|
@ -49,12 +48,6 @@
|
||||||
#include "gstvaapisink.h"
|
#include "gstvaapisink.h"
|
||||||
#include "gstvaapipluginutil.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_NAME "vaapisink"
|
||||||
#define GST_PLUGIN_DESC "A VA-API based videosink"
|
#define GST_PLUGIN_DESC "A VA-API based videosink"
|
||||||
|
|
||||||
|
@ -148,8 +141,8 @@ gst_vaapisink_ensure_window_xid(GstVaapiSink *sink, guintptr window_id);
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_vaapisink_show_frame(GstBaseSink *base_sink, GstBuffer *buffer);
|
gst_vaapisink_show_frame(GstBaseSink *base_sink, GstBuffer *buffer);
|
||||||
|
|
||||||
static inline void
|
static void
|
||||||
_gst_vaapisink_xoverlay_set_xid(GstXOverlay *overlay, guintptr window_id)
|
gst_vaapisink_xoverlay_set_window_handle(GstXOverlay *overlay, guintptr window)
|
||||||
{
|
{
|
||||||
GstVaapiSink * const sink = GST_VAAPISINK(overlay);
|
GstVaapiSink * const sink = GST_VAAPISINK(overlay);
|
||||||
|
|
||||||
|
@ -158,24 +151,9 @@ _gst_vaapisink_xoverlay_set_xid(GstXOverlay *overlay, guintptr window_id)
|
||||||
sink->use_glx = FALSE;
|
sink->use_glx = FALSE;
|
||||||
|
|
||||||
sink->foreign_window = TRUE;
|
sink->foreign_window = TRUE;
|
||||||
gst_vaapisink_ensure_window_xid(sink, window_id);
|
gst_vaapisink_ensure_window_xid(sink, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
#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);
|
|
||||||
}
|
|
||||||
#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
|
static void
|
||||||
gst_vaapisink_xoverlay_set_render_rectangle(
|
gst_vaapisink_xoverlay_set_render_rectangle(
|
||||||
GstXOverlay *overlay,
|
GstXOverlay *overlay,
|
||||||
|
@ -197,7 +175,6 @@ gst_vaapisink_xoverlay_set_render_rectangle(
|
||||||
display_rect->x, display_rect->y,
|
display_rect->x, display_rect->y,
|
||||||
display_rect->width, display_rect->height);
|
display_rect->width, display_rect->height);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_vaapisink_xoverlay_expose(GstXOverlay *overlay)
|
gst_vaapisink_xoverlay_expose(GstXOverlay *overlay)
|
||||||
|
@ -215,14 +192,8 @@ gst_vaapisink_xoverlay_expose(GstXOverlay *overlay)
|
||||||
static void
|
static void
|
||||||
gst_vaapisink_xoverlay_iface_init(GstXOverlayClass *iface)
|
gst_vaapisink_xoverlay_iface_init(GstXOverlayClass *iface)
|
||||||
{
|
{
|
||||||
#if HAVE_GST_XOVERLAY_SET_WINDOW_HANDLE
|
|
||||||
iface->set_window_handle = gst_vaapisink_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;
|
iface->set_render_rectangle = gst_vaapisink_xoverlay_set_render_rectangle;
|
||||||
#endif
|
|
||||||
iface->expose = gst_vaapisink_xoverlay_expose;
|
iface->expose = gst_vaapisink_xoverlay_expose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue