Commit 11103c6c authored by Nicolas Dufresne's avatar Nicolas Dufresne

v4l2: Remove XV support

XV support for v4l2 never became upstream and ended up being
commented out with an undef for a long time now.
parent 418a4940
...@@ -498,9 +498,6 @@ AG_GST_CHECK_FEATURE(OSX_VIDEO, [OSX video], osxvideosink, [ ...@@ -498,9 +498,6 @@ AG_GST_CHECK_FEATURE(OSX_VIDEO, [OSX video], osxvideosink, [
]], [[return 0;]])],[HAVE_OSX_VIDEO="yes"],[HAVE_OSX_VIDEO="no"]) ]], [[return 0;]])],[HAVE_OSX_VIDEO="yes"],[HAVE_OSX_VIDEO="no"])
]) ])
dnl check for XOverlay libraries
AG_GST_CHECK_XV
# Optional gudev for device probing # Optional gudev for device probing
AC_ARG_WITH([gudev], AC_ARG_WITH([gudev],
AS_HELP_STRING([--with-gudev],[device detection with gudev]), AS_HELP_STRING([--with-gudev],[device detection with gudev]),
...@@ -603,13 +600,6 @@ AG_GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], , [ ...@@ -603,13 +600,6 @@ AG_GST_CHECK_FEATURE(XSHM, [X Shared Memory extension], , [
AC_SUBST(XSHM_LIBS) AC_SUBST(XSHM_LIBS)
]) ])
dnl for V4L2, we also need to know if we have XVIDEO
translit(dnm, m, l) AM_CONDITIONAL(USE_XVIDEO, true)
AG_GST_CHECK_FEATURE(XVIDEO, [X11 XVideo extensions],
[], [
AG_GST_CHECK_XV
])
dnl *** ext plug-ins *** dnl *** ext plug-ins ***
dnl keep this list sorted alphabetically ! dnl keep this list sorted alphabetically !
...@@ -946,7 +936,6 @@ AM_CONDITIONAL(USE_WAVEFORM, false) ...@@ -946,7 +936,6 @@ AM_CONDITIONAL(USE_WAVEFORM, false)
AM_CONDITIONAL(USE_WAVPACK, false) AM_CONDITIONAL(USE_WAVPACK, false)
AM_CONDITIONAL(USE_X, false) AM_CONDITIONAL(USE_X, false)
AM_CONDITIONAL(USE_XSHM, false) AM_CONDITIONAL(USE_XSHM, false)
AM_CONDITIONAL(USE_XVIDEO, false)
AM_CONDITIONAL(USE_ZLIB, false) AM_CONDITIONAL(USE_ZLIB, false)
fi dnl of EXT plugins fi dnl of EXT plugins
......
...@@ -21,6 +21,5 @@ sys/sunaudio/gstsunaudiomixertrack.c ...@@ -21,6 +21,5 @@ sys/sunaudio/gstsunaudiomixertrack.c
sys/v4l2/gstv4l2bufferpool.c sys/v4l2/gstv4l2bufferpool.c
sys/v4l2/gstv4l2object.c sys/v4l2/gstv4l2object.c
sys/v4l2/gstv4l2radio.c sys/v4l2/gstv4l2radio.c
sys/v4l2/gstv4l2videooverlay.c
sys/v4l2/v4l2_calls.c sys/v4l2/v4l2_calls.c
sys/ximage/gstximagesrc.c sys/ximage/gstximagesrc.c
...@@ -2,5 +2,3 @@ gst/goom/convolve_fx.c ...@@ -2,5 +2,3 @@ gst/goom/convolve_fx.c
gst/goom/mmx.c gst/goom/mmx.c
gst/goom/xmmx.c gst/goom/xmmx.c
gst/oldcore/gstmultifilesrc.c gst/oldcore/gstmultifilesrc.c
sys/v4l2/gstv4l2xoverlay.c
plugin_LTLIBRARIES = libgstvideo4linux2.la plugin_LTLIBRARIES = libgstvideo4linux2.la
if USE_XVIDEO
xv_source = gstv4l2videooverlay.c
xv_libs = $(X_LIBS) $(XVIDEO_LIBS)
else
xv_source =
xv_libs =
endif
include $(top_srcdir)/common/gst-glib-gen.mak include $(top_srcdir)/common/gst-glib-gen.mak
libgstvideo4linux2_la_SOURCES = gstv4l2.c \ libgstvideo4linux2_la_SOURCES = gstv4l2.c \
...@@ -23,8 +15,7 @@ libgstvideo4linux2_la_SOURCES = gstv4l2.c \ ...@@ -23,8 +15,7 @@ libgstvideo4linux2_la_SOURCES = gstv4l2.c \
v4l2_calls.c \ v4l2_calls.c \
tuner.c \ tuner.c \
tunerchannel.c \ tunerchannel.c \
tunernorm.c \ tunernorm.c
$(xv_source)
libgstvideo4linux2_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \ libgstvideo4linux2_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \
...@@ -40,7 +31,6 @@ libgstvideo4linux2_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \ ...@@ -40,7 +31,6 @@ libgstvideo4linux2_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
-lgstvideo-$(GST_API_VERSION) \ -lgstvideo-$(GST_API_VERSION) \
$(GST_BASE_LIBS) \ $(GST_BASE_LIBS) \
$(GST_LIBS) \ $(GST_LIBS) \
$(xv_libs) \
$(LIBV4L2_LIBS) \ $(LIBV4L2_LIBS) \
$(GUDEV_LIBS) \ $(GUDEV_LIBS) \
$(LIBRT) $(LIBRT)
...@@ -55,7 +45,6 @@ noinst_HEADERS = \ ...@@ -55,7 +45,6 @@ noinst_HEADERS = \
gstv4l2tuner.h \ gstv4l2tuner.h \
gstv4l2videodec.h \ gstv4l2videodec.h \
gstv4l2vidorient.h \ gstv4l2vidorient.h \
gstv4l2videooverlay.h \
v4l2_calls.h \ v4l2_calls.h \
tuner.h \ tuner.h \
tunerchannel.h \ tunerchannel.h \
......
...@@ -38,9 +38,6 @@ ...@@ -38,9 +38,6 @@
#include "v4l2_calls.h" #include "v4l2_calls.h"
#include "gstv4l2tuner.h" #include "gstv4l2tuner.h"
#ifdef HAVE_XVIDEO
#include "gstv4l2videooverlay.h"
#endif
#include "gstv4l2colorbalance.h" #include "gstv4l2colorbalance.h"
#include "gst/gst-i18n-plugin.h" #include "gst/gst-i18n-plugin.h"
...@@ -901,10 +898,6 @@ gst_v4l2_object_open (GstV4l2Object * v4l2object) ...@@ -901,10 +898,6 @@ gst_v4l2_object_open (GstV4l2Object * v4l2object)
else else
return FALSE; return FALSE;
#ifdef HAVE_XVIDEO
gst_v4l2_video_overlay_start (v4l2object);
#endif
return TRUE; return TRUE;
} }
...@@ -915,20 +908,12 @@ gst_v4l2_object_open_shared (GstV4l2Object * v4l2object, GstV4l2Object * other) ...@@ -915,20 +908,12 @@ gst_v4l2_object_open_shared (GstV4l2Object * v4l2object, GstV4l2Object * other)
ret = gst_v4l2_dup (v4l2object, other); ret = gst_v4l2_dup (v4l2object, other);
#ifdef HAVE_XVIDEO
gst_v4l2_video_overlay_start (v4l2object);
#endif
return ret; return ret;
} }
gboolean gboolean
gst_v4l2_object_close (GstV4l2Object * v4l2object) gst_v4l2_object_close (GstV4l2Object * v4l2object)
{ {
#ifdef HAVE_XVIDEO
gst_v4l2_video_overlay_stop (v4l2object);
#endif
if (!gst_v4l2_close (v4l2object)) if (!gst_v4l2_close (v4l2object))
return FALSE; return FALSE;
......
...@@ -57,9 +57,6 @@ ...@@ -57,9 +57,6 @@
#include "gstv4l2colorbalance.h" #include "gstv4l2colorbalance.h"
#include "gstv4l2tuner.h" #include "gstv4l2tuner.h"
#ifdef HAVE_XVIDEO
#include "gstv4l2videooverlay.h"
#endif
#include "gstv4l2vidorient.h" #include "gstv4l2vidorient.h"
#include "gstv4l2sink.h" #include "gstv4l2sink.h"
...@@ -89,29 +86,11 @@ enum ...@@ -89,29 +86,11 @@ enum
GST_IMPLEMENT_V4L2_COLOR_BALANCE_METHODS (GstV4l2Sink, gst_v4l2sink); GST_IMPLEMENT_V4L2_COLOR_BALANCE_METHODS (GstV4l2Sink, gst_v4l2sink);
GST_IMPLEMENT_V4L2_TUNER_METHODS (GstV4l2Sink, gst_v4l2sink); GST_IMPLEMENT_V4L2_TUNER_METHODS (GstV4l2Sink, gst_v4l2sink);
#ifdef HAVE_XVIDEO
GST_IMPLEMENT_V4L2_VIDEO_OVERLAY_METHODS (GstV4l2Sink, gst_v4l2sink);
#endif
GST_IMPLEMENT_V4L2_VIDORIENT_METHODS (GstV4l2Sink, gst_v4l2sink); GST_IMPLEMENT_V4L2_VIDORIENT_METHODS (GstV4l2Sink, gst_v4l2sink);
#ifdef HAVE_XVIDEO
static void gst_v4l2sink_navigation_send_event (GstNavigation * navigation,
GstStructure * structure);
static void
gst_v4l2sink_navigation_init (GstNavigationInterface * iface)
{
iface->send_event = gst_v4l2sink_navigation_send_event;
}
#endif
#define gst_v4l2sink_parent_class parent_class #define gst_v4l2sink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstV4l2Sink, gst_v4l2sink, GST_TYPE_VIDEO_SINK, G_DEFINE_TYPE_WITH_CODE (GstV4l2Sink, gst_v4l2sink, GST_TYPE_VIDEO_SINK,
G_IMPLEMENT_INTERFACE (GST_TYPE_TUNER, gst_v4l2sink_tuner_interface_init); G_IMPLEMENT_INTERFACE (GST_TYPE_TUNER, gst_v4l2sink_tuner_interface_init);
#ifdef HAVE_XVIDEO
G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_OVERLAY,
gst_v4l2sink_video_overlay_interface_init);
G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION, gst_v4l2sink_navigation_init);
#endif
G_IMPLEMENT_INTERFACE (GST_TYPE_COLOR_BALANCE, G_IMPLEMENT_INTERFACE (GST_TYPE_COLOR_BALANCE,
gst_v4l2sink_color_balance_interface_init); gst_v4l2sink_color_balance_interface_init);
G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_ORIENTATION, G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_ORIENTATION,
...@@ -526,10 +505,6 @@ gst_v4l2sink_set_caps (GstBaseSink * bsink, GstCaps * caps) ...@@ -526,10 +505,6 @@ gst_v4l2sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
gst_v4l2sink_sync_overlay_fields (v4l2sink); gst_v4l2sink_sync_overlay_fields (v4l2sink);
gst_v4l2sink_sync_crop_fields (v4l2sink); gst_v4l2sink_sync_crop_fields (v4l2sink);
#ifdef HAVE_XVIDEO
gst_v4l2_video_overlay_prepare_window_handle (v4l2sink->v4l2object, TRUE);
#endif
GST_INFO_OBJECT (v4l2sink, "outputting buffers via mmap()"); GST_INFO_OBJECT (v4l2sink, "outputting buffers via mmap()");
v4l2sink->video_width = GST_V4L2_WIDTH (v4l2sink->v4l2object); v4l2sink->video_width = GST_V4L2_WIDTH (v4l2sink->v4l2object);
...@@ -643,47 +618,3 @@ not_negotiated: ...@@ -643,47 +618,3 @@ not_negotiated:
return GST_FLOW_NOT_NEGOTIATED; return GST_FLOW_NOT_NEGOTIATED;
} }
} }
#ifdef HAVE_XVIDEO
static void
gst_v4l2sink_navigation_send_event (GstNavigation * navigation,
GstStructure * structure)
{
GstV4l2Sink *v4l2sink = GST_V4L2SINK (navigation);
GstV4l2Xv *xv = v4l2sink->v4l2object->xv;
GstPad *peer;
if (!xv)
return;
if ((peer = gst_pad_get_peer (GST_VIDEO_SINK_PAD (v4l2sink)))) {
GstVideoRectangle rect;
gdouble x, y, xscale = 1.0, yscale = 1.0;
gst_v4l2_video_overlay_get_render_rect (v4l2sink->v4l2object, &rect);
/* We calculate scaling using the original video frames geometry to
* include pixel aspect ratio scaling.
*/
xscale = (gdouble) v4l2sink->video_width / rect.w;
yscale = (gdouble) v4l2sink->video_height / rect.h;
/* Converting pointer coordinates to the non scaled geometry */
if (gst_structure_get_double (structure, "pointer_x", &x)) {
x = MIN (x, rect.x + rect.w);
x = MAX (x - rect.x, 0);
gst_structure_set (structure, "pointer_x", G_TYPE_DOUBLE,
(gdouble) x * xscale, NULL);
}
if (gst_structure_get_double (structure, "pointer_y", &y)) {
y = MIN (y, rect.y + rect.h);
y = MAX (y - rect.y, 0);
gst_structure_set (structure, "pointer_y", G_TYPE_DOUBLE,
(gdouble) y * yscale, NULL);
}
gst_pad_send_event (peer, gst_event_new_navigation (structure));
gst_object_unref (peer);
}
}
#endif
...@@ -44,8 +44,6 @@ ...@@ -44,8 +44,6 @@
#include <config.h> #include <config.h>
#endif #endif
#undef HAVE_XVIDEO
#include <string.h> #include <string.h>
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
...@@ -57,9 +55,6 @@ ...@@ -57,9 +55,6 @@
#include "gstv4l2colorbalance.h" #include "gstv4l2colorbalance.h"
#include "gstv4l2tuner.h" #include "gstv4l2tuner.h"
#ifdef HAVE_XVIDEO
#include "gstv4l2xoverlay.h"
#endif
#include "gstv4l2vidorient.h" #include "gstv4l2vidorient.h"
#include "gst/gst-i18n-plugin.h" #include "gst/gst-i18n-plugin.h"
...@@ -87,9 +82,6 @@ static guint gst_v4l2_signals[LAST_SIGNAL] = { 0 }; ...@@ -87,9 +82,6 @@ static guint gst_v4l2_signals[LAST_SIGNAL] = { 0 };
GST_IMPLEMENT_V4L2_COLOR_BALANCE_METHODS (GstV4l2Src, gst_v4l2src); GST_IMPLEMENT_V4L2_COLOR_BALANCE_METHODS (GstV4l2Src, gst_v4l2src);
GST_IMPLEMENT_V4L2_TUNER_METHODS (GstV4l2Src, gst_v4l2src); GST_IMPLEMENT_V4L2_TUNER_METHODS (GstV4l2Src, gst_v4l2src);
#ifdef HAVE_XVIDEO
GST_IMPLEMENT_V4L2_XOVERLAY_METHODS (GstV4l2Src, gst_v4l2src);
#endif
GST_IMPLEMENT_V4L2_VIDORIENT_METHODS (GstV4l2Src, gst_v4l2src); GST_IMPLEMENT_V4L2_VIDORIENT_METHODS (GstV4l2Src, gst_v4l2src);
static void gst_v4l2src_uri_handler_init (gpointer g_iface, static void gst_v4l2src_uri_handler_init (gpointer g_iface,
...@@ -99,11 +91,6 @@ static void gst_v4l2src_uri_handler_init (gpointer g_iface, ...@@ -99,11 +91,6 @@ static void gst_v4l2src_uri_handler_init (gpointer g_iface,
G_DEFINE_TYPE_WITH_CODE (GstV4l2Src, gst_v4l2src, GST_TYPE_PUSH_SRC, G_DEFINE_TYPE_WITH_CODE (GstV4l2Src, gst_v4l2src, GST_TYPE_PUSH_SRC,
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_v4l2src_uri_handler_init); G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_v4l2src_uri_handler_init);
G_IMPLEMENT_INTERFACE (GST_TYPE_TUNER, gst_v4l2src_tuner_interface_init); G_IMPLEMENT_INTERFACE (GST_TYPE_TUNER, gst_v4l2src_tuner_interface_init);
#ifdef HAVE_XVIDEO
/* FIXME: does GstXOverlay for v4l2src make sense in a GStreamer context? */
G_IMPLEMENT_INTERFACE (GST_TYPE_X_OVERLAY,
gst_v4l2src_xoverlay_interface_init);
#endif
G_IMPLEMENT_INTERFACE (GST_TYPE_COLOR_BALANCE, G_IMPLEMENT_INTERFACE (GST_TYPE_COLOR_BALANCE,
gst_v4l2src_color_balance_interface_init); gst_v4l2src_color_balance_interface_init);
G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_ORIENTATION, G_IMPLEMENT_INTERFACE (GST_TYPE_VIDEO_ORIENTATION,
......
This diff is collapsed.
/* GStreamer
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2videooverlay.h: tv mixer interface implementation for V4L2
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_V4L2_VIDEO_OVERLAY_H__
#define __GST_V4L2_VIDEO_OVERLAY_H__
#include <X11/X.h>
#include <gst/gst.h>
#include <gst/video/navigation.h>
#include <gst/video/gstvideosink.h> /* for GstVideoRectange */
#include <gst/video/videooverlay.h>
#include "gstv4l2object.h"
G_BEGIN_DECLS
void gst_v4l2_video_overlay_start (GstV4l2Object *v4l2object);
void gst_v4l2_video_overlay_stop (GstV4l2Object *v4l2object);
gboolean gst_v4l2_video_overlay_get_render_rect (GstV4l2Object *v4l2object,
GstVideoRectangle *rect);
void gst_v4l2_video_overlay_interface_init (GstVideoOverlayInterface * iface);
void gst_v4l2_video_overlay_set_window_handle (GstV4l2Object * v4l2object,
guintptr id);
void gst_v4l2_video_overlay_prepare_window_handle (GstV4l2Object * v4l2object,
gboolean required);
#define GST_IMPLEMENT_V4L2_VIDEO_OVERLAY_METHODS(Type, interface_as_function) \
\
static void \
interface_as_function ## _video_overlay_set_window_handle (GstVideoOverlay * overlay, \
guintptr id) \
{ \
Type *this = (Type*) overlay; \
gst_v4l2_video_overlay_set_window_handle (this->v4l2object, id); \
} \
\
static void \
interface_as_function ## _video_overlay_interface_init (GstVideoOverlayInterface * iface) \
{ \
/* default virtual functions */ \
iface->set_window_handle = interface_as_function ## _video_overlay_set_window_handle; \
\
gst_v4l2_video_overlay_interface_init (iface); \
} \
#endif /* __GST_V4L2_VIDEO_OVERLAY_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment