plugin_LTLIBRARIES = libgstvideo4linux2.la
if USE_XVIDEO
-xv_source = gstv4l2xoverlay.c
+xv_source = gstv4l2videooverlay.c
xv_libs = $(X_LIBS) $(XVIDEO_LIBS)
else
xv_source =
gstv4l2radio.h \
gstv4l2tuner.h \
gstv4l2vidorient.h \
- gstv4l2xoverlay.h \
+ gstv4l2videooverlay.h \
v4l2_calls.h
#include "v4l2_calls.h"
#include "gstv4l2tuner.h"
#ifdef HAVE_XVIDEO
-#include "gstv4l2xoverlay.h"
+#include "gstv4l2videooverlay.h"
#endif
#include "gstv4l2colorbalance.h"
return FALSE;
#ifdef HAVE_XVIDEO
- gst_v4l2_xoverlay_start (v4l2object);
+ gst_v4l2_video_overlay_start (v4l2object);
#endif
return TRUE;
gst_v4l2_object_close (GstV4l2Object * v4l2object)
{
#ifdef HAVE_XVIDEO
- gst_v4l2_xoverlay_stop (v4l2object);
+ gst_v4l2_video_overlay_stop (v4l2object);
#endif
if (!gst_v4l2_close (v4l2object))
#include "gstv4l2colorbalance.h"
#include "gstv4l2tuner.h"
#ifdef HAVE_XVIDEO
-#include "gstv4l2xoverlay.h"
+#include "gstv4l2videooverlay.h"
#endif
#include "gstv4l2vidorient.h"
GST_IMPLEMENT_V4L2_COLOR_BALANCE_METHODS (GstV4l2Sink, gst_v4l2sink);
GST_IMPLEMENT_V4L2_TUNER_METHODS (GstV4l2Sink, gst_v4l2sink);
#ifdef HAVE_XVIDEO
-GST_IMPLEMENT_V4L2_XOVERLAY_METHODS (GstV4l2Sink, gst_v4l2sink);
+GST_IMPLEMENT_V4L2_VIDEO_OVERLAY_METHODS (GstV4l2Sink, gst_v4l2sink);
#endif
GST_IMPLEMENT_V4L2_VIDORIENT_METHODS (GstV4l2Sink, gst_v4l2sink);
G_DEFINE_TYPE_WITH_CODE (GstV4l2Sink, gst_v4l2sink, GST_TYPE_VIDEO_SINK,
G_IMPLEMENT_INTERFACE (GST_TYPE_TUNER, gst_v4l2sink_tuner_interface_init);
#ifdef HAVE_XVIDEO
- G_IMPLEMENT_INTERFACE (GST_TYPE_X_OVERLAY,
- gst_v4l2sink_xoverlay_interface_init);
+ 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,
gst_v4l2sink_sync_crop_fields (v4l2sink);
#ifdef HAVE_XVIDEO
- gst_v4l2_xoverlay_prepare_xwindow_id (v4l2sink->v4l2object, TRUE);
+ gst_v4l2_video_overlay_prepare_window_handle (v4l2sink->v4l2object, TRUE);
#endif
GST_INFO_OBJECT (v4l2sink, "outputting buffers via mmap()");
GstVideoRectangle rect;
gdouble x, y, xscale = 1.0, yscale = 1.0;
- gst_v4l2_xoverlay_get_render_rect (v4l2sink->v4l2object, &rect);
+ 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.
/* GStreamer
- *
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
- * gstv4l2xoverlay.c: X-based overlay interface implementation for V4L2
+ * gstv4l2video_overlay.c: X-based overlay 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
#include <gst/interfaces/navigation.h>
-#include "gstv4l2xoverlay.h"
+#include "gstv4l2videooverlay.h"
#include "gstv4l2object.h"
#include "v4l2_calls.h"
#define GST_CAT_DEFAULT v4l2xv_debug
void
-gst_v4l2_xoverlay_interface_init (GstXOverlayClass * klass)
+gst_v4l2_video_overlay_interface_init (GstVideoOverlayIface * klass)
{
GST_DEBUG_CATEGORY_INIT (v4l2xv_debug, "v4l2xv", 0,
- "V4L2 XOverlay interface debugging");
+ "V4L2 GstVideoOverlay interface debugging");
}
static void
-gst_v4l2_xoverlay_open (GstV4l2Object * v4l2object)
+gst_v4l2_video_overlay_open (GstV4l2Object * v4l2object)
{
struct stat s;
GstV4l2Xv *v4l2xv;
v4l2object->xv = v4l2xv;
if (v4l2object->xwindow_id) {
- gst_v4l2_xoverlay_set_window_handle (v4l2object, v4l2object->xwindow_id);
+ gst_v4l2_video_overlay_set_window_handle (v4l2object,
+ v4l2object->xwindow_id);
}
}
static void
-gst_v4l2_xoverlay_close (GstV4l2Object * v4l2object)
+gst_v4l2_video_overlay_close (GstV4l2Object * v4l2object)
{
GstV4l2Xv *v4l2xv = v4l2object->xv;
return;
if (v4l2object->xwindow_id) {
- gst_v4l2_xoverlay_set_window_handle (v4l2object, 0);
+ gst_v4l2_video_overlay_set_window_handle (v4l2object, 0);
}
XCloseDisplay (v4l2xv->dpy);
}
void
-gst_v4l2_xoverlay_start (GstV4l2Object * v4l2object)
+gst_v4l2_video_overlay_start (GstV4l2Object * v4l2object)
{
if (v4l2object->xwindow_id) {
- gst_v4l2_xoverlay_open (v4l2object);
+ gst_v4l2_video_overlay_open (v4l2object);
}
}
void
-gst_v4l2_xoverlay_stop (GstV4l2Object * v4l2object)
+gst_v4l2_video_overlay_stop (GstV4l2Object * v4l2object)
{
- gst_v4l2_xoverlay_close (v4l2object);
+ gst_v4l2_video_overlay_close (v4l2object);
}
/* should be called with mutex held */
}
gboolean
-gst_v4l2_xoverlay_get_render_rect (GstV4l2Object * v4l2object,
+gst_v4l2_video_overlay_get_render_rect (GstV4l2Object * v4l2object,
GstVideoRectangle * rect)
{
GstV4l2Xv *v4l2xv = v4l2object->xv;
}
void
-gst_v4l2_xoverlay_set_window_handle (GstV4l2Object * v4l2object, guintptr id)
+gst_v4l2_video_overlay_set_window_handle (GstV4l2Object * v4l2object,
+ guintptr id)
{
GstV4l2Xv *v4l2xv;
XID xwindow_id = id;
(gulong) xwindow_id);
if (!v4l2object->xv && GST_V4L2_IS_OPEN (v4l2object))
- gst_v4l2_xoverlay_open (v4l2object);
+ gst_v4l2_video_overlay_open (v4l2object);
v4l2xv = v4l2object->xv;
}
/**
- * gst_v4l2_xoverlay_prepare_xwindow_id:
+ * gst_v4l2_video_overlay_prepare_window_handle:
* @v4l2object: the v4l2object
* @required: %TRUE if display is required (ie. TRUE for v4l2sink, but
* FALSE for any other element with optional overlay capabilities)
* Helper function to create a windo if none is set from the application.
*/
void
-gst_v4l2_xoverlay_prepare_xwindow_id (GstV4l2Object * v4l2object,
+gst_v4l2_video_overlay_prepare_window_handle (GstV4l2Object * v4l2object,
gboolean required)
{
+ GstVideoOverlay *overlay;
+
if (!GST_V4L2_IS_OVERLAY (v4l2object))
return;
- gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (v4l2object->element));
+ overlay = GST_VIDEO_OVERLAY (v4l2object->element);
+ gst_video_overlay_prepare_window_handle (overlay);
if (required && !v4l2object->xwindow_id) {
GstV4l2Xv *v4l2xv;
long event_mask;
if (!v4l2object->xv && GST_V4L2_IS_OPEN (v4l2object))
- gst_v4l2_xoverlay_open (v4l2object);
+ gst_v4l2_video_overlay_open (v4l2object);
v4l2xv = v4l2object->xv;
- /* if xoverlay is not supported, just bail */
+ /* if video_overlay is not supported, just bail */
if (!v4l2xv)
return;
- /* xoverlay is supported, but we don't have a window.. so create one */
+ /* video_overlay is supported, but we don't have a window.. so create one */
GST_DEBUG_OBJECT (v4l2object->element, "creating window");
g_mutex_lock (v4l2xv->mutex);
GST_DEBUG_OBJECT (v4l2object->element, "got window");
- gst_v4l2_xoverlay_set_window_handle (v4l2object, win);
+ gst_v4l2_video_overlay_set_window_handle (v4l2object, win);
}
}
/* GStreamer
- *
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* 2006 Edgard Lima <edgard.lima@indt.org.br>
*
- * gstv4l2xoverlay.h: tv mixer interface implementation for V4L2
+ * 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
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GST_V4L2_X_OVERLAY_H__
-#define __GST_V4L2_X_OVERLAY_H__
+#ifndef __GST_V4L2_VIDEO_OVERLAY_H__
+#define __GST_V4L2_VIDEO_OVERLAY_H__
#include <X11/X.h>
#include <gst/gst.h>
-#include <gst/interfaces/xoverlay.h>
+#include <gst/interfaces/videooverlay.h>
#include <gst/interfaces/navigation.h>
#include <gst/video/gstvideosink.h> /* for GstVideoRectange */
G_BEGIN_DECLS
-void gst_v4l2_xoverlay_start (GstV4l2Object *v4l2object);
-void gst_v4l2_xoverlay_stop (GstV4l2Object *v4l2object);
-gboolean gst_v4l2_xoverlay_get_render_rect (GstV4l2Object *v4l2object,
+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_xoverlay_interface_init (GstXOverlayClass * klass);
-void gst_v4l2_xoverlay_set_window_handle (GstV4l2Object * v4l2object,
+void gst_v4l2_video_overlay_interface_init (GstVideoOverlayIface * iface);
+void gst_v4l2_video_overlay_set_window_handle (GstV4l2Object * v4l2object,
guintptr id);
-void gst_v4l2_xoverlay_prepare_xwindow_id (GstV4l2Object * v4l2object,
+void gst_v4l2_video_overlay_prepare_window_handle (GstV4l2Object * v4l2object,
gboolean required);
-#define GST_IMPLEMENT_V4L2_XOVERLAY_METHODS(Type, interface_as_function) \
+#define GST_IMPLEMENT_V4L2_VIDEO_OVERLAY_METHODS(Type, interface_as_function) \
\
static void \
-interface_as_function ## _xoverlay_set_window_handle (GstXOverlay * xoverlay, \
- guintptr id) \
+interface_as_function ## _video_overlay_set_window_handle (GstVideoOverlay * overlay, \
+ guintptr id) \
{ \
- Type *this = (Type*) xoverlay; \
- gst_v4l2_xoverlay_set_window_handle (this->v4l2object, id); \
+ Type *this = (Type*) overlay; \
+ gst_v4l2_video_overlay_set_window_handle (this->v4l2object, id); \
} \
\
static void \
-interface_as_function ## _xoverlay_interface_init (GstXOverlayClass * klass) \
+interface_as_function ## _video_overlay_interface_init (GstVideoOverlayIface * iface) \
{ \
/* default virtual functions */ \
- klass->set_window_handle = interface_as_function ## _xoverlay_set_window_handle; \
+ iface->set_window_handle = interface_as_function ## _video_overlay_set_window_handle; \
\
- gst_v4l2_xoverlay_interface_init(klass); \
+ gst_v4l2_video_overlay_interface_init (iface); \
} \
-#endif /* __GST_V4L2_X_OVERLAY_H__ */
+#endif /* __GST_V4L2_VIDEO_OVERLAY_H__ */