plugin_LTLIBRARIES = libgstvideo4linux2.la
-# overlay is still not supported in current implementation
-# if USE_XVIDEO
-#xv_source = gstv4l2xoverlay.c
-#xv_libs = $(X_LIBS) $(XVIDEO_LIBS)
-#else
-#xv_source =
-#xv_libs =
-#endif
+if USE_XVIDEO
+xv_source = gstv4l2xoverlay.c
+xv_libs = $(X_LIBS) $(XVIDEO_LIBS)
+else
+xv_source =
+xv_libs =
+endif
libgstvideo4linux2_la_SOURCES = gstv4l2.c \
gstv4l2colorbalance.c \
#include "v4l2_calls.h"
#include "gstv4l2tuner.h"
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
#include "gstv4l2xoverlay.h"
#endif
#include "gstv4l2colorbalance.h"
else
return FALSE;
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
gst_v4l2_xoverlay_start (v4l2object);
#endif
gboolean
gst_v4l2_object_stop (GstV4l2Object * v4l2object)
{
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
gst_v4l2_xoverlay_stop (v4l2object);
#endif
#include "gstv4l2colorbalance.h"
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
#include "gstv4l2xoverlay.h"
#endif
#include "gstv4l2vidorient.h"
GST_IMPLEMENT_V4L2_PROBE_METHODS (GstV4l2SinkClass, gst_v4l2sink);
GST_IMPLEMENT_V4L2_COLOR_BALANCE_METHODS (GstV4l2Sink, gst_v4l2sink);
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
GST_IMPLEMENT_V4L2_XOVERLAY_METHODS (GstV4l2Sink, gst_v4l2sink);
#endif
GST_IMPLEMENT_V4L2_VIDORIENT_METHODS (GstV4l2Sink, gst_v4l2sink);
{
GstV4l2Object *v4l2object = GST_V4L2SINK (iface)->v4l2object;
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
g_assert (iface_type == GST_TYPE_X_OVERLAY ||
iface_type == GST_TYPE_COLOR_BALANCE ||
iface_type == GST_TYPE_VIDEO_ORIENTATION);
if (v4l2object->video_fd == -1)
return FALSE;
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
if (iface_type == GST_TYPE_X_OVERLAY && !GST_V4L2_IS_OVERLAY (v4l2object))
return FALSE;
#endif
NULL,
NULL,
};
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
static const GInterfaceInfo v4l2_xoverlay_info = {
(GInterfaceInitFunc) gst_v4l2sink_xoverlay_interface_init,
NULL,
g_type_add_interface_static (type,
GST_TYPE_IMPLEMENTS_INTERFACE, &v4l2iface_info);
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &v4l2_xoverlay_info);
#endif
g_type_add_interface_static (type,
V4L2_BUF_TYPE_VIDEO_OUTPUT))) {
return GST_FLOW_ERROR;
}
+#ifdef HAVE_XVIDEO
+ if (GST_V4L2_IS_OVERLAY (v4l2sink->v4l2object)) {
+ gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (v4l2sink));
+ }
+#endif
+
v4l2sink->state = STATE_PENDING_STREAMON;
GST_INFO_OBJECT (v4l2sink, "outputting buffers via mmap()");
#include "gstv4l2colorbalance.h"
#include "gstv4l2tuner.h"
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
#include "gstv4l2xoverlay.h"
#endif
#include "gstv4l2vidorient.h"
GST_IMPLEMENT_V4L2_PROBE_METHODS (GstV4l2SrcClass, gst_v4l2src);
GST_IMPLEMENT_V4L2_COLOR_BALANCE_METHODS (GstV4l2Src, gst_v4l2src);
GST_IMPLEMENT_V4L2_TUNER_METHODS (GstV4l2Src, gst_v4l2src);
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
GST_IMPLEMENT_V4L2_XOVERLAY_METHODS (GstV4l2Src, gst_v4l2src);
#endif
GST_IMPLEMENT_V4L2_VIDORIENT_METHODS (GstV4l2Src, gst_v4l2src);
{
GstV4l2Object *v4l2object = GST_V4L2SRC (iface)->v4l2object;
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
g_assert (iface_type == GST_TYPE_TUNER ||
iface_type == GST_TYPE_X_OVERLAY ||
iface_type == GST_TYPE_COLOR_BALANCE ||
if (v4l2object->video_fd == -1)
return FALSE;
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
if (iface_type == GST_TYPE_X_OVERLAY && !GST_V4L2_IS_OVERLAY (v4l2object))
return FALSE;
#endif
NULL,
NULL,
};
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
static const GInterfaceInfo v4l2_xoverlay_info = {
(GInterfaceInitFunc) gst_v4l2src_xoverlay_interface_init,
NULL,
g_type_add_interface_static (type,
GST_TYPE_IMPLEMENTS_INTERFACE, &v4l2iface_info);
g_type_add_interface_static (type, GST_TYPE_TUNER, &v4l2_tuner_info);
-#if 0 /* overlay is still not implemented #ifdef HAVE_XVIDEO */
+#ifdef HAVE_XVIDEO
g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &v4l2_xoverlay_info);
#endif
g_type_add_interface_static (type,
#include "gstv4l2object.h"
#include "v4l2_calls.h"
+#include "gst/gst-i18n-plugin.h"
+
struct _GstV4l2Xv
{
Display *dpy;
}
min = s.st_rdev & 0xff;
for (i = 0; i < anum; i++) {
- if (!strcmp (ai[i].name, "video4linux2")) {
+ if (!strcmp (ai[i].name, "video4linux2") ||
+ !strcmp (ai[i].name, "video4linux")) {
if (first_id == 0)
first_id = ai[i].base_id;