From 7a539c59bff3d81f745a27aaba25f8367f99af98 Mon Sep 17 00:00:00 2001 From: Edgard Lima Date: Tue, 19 Sep 2006 13:08:35 +0000 Subject: Add Video Orientation interface support to v4l2src. Original commit message from CVS: Add Video Orientation interface support to v4l2src. --- sys/v4l2/gstv4l2src.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'sys/v4l2/gstv4l2src.c') diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index cb6335b6..f652539e 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -54,6 +54,7 @@ #include "gstv4l2colorbalance.h" #include "gstv4l2tuner.h" #include "gstv4l2xoverlay.h" +#include "gstv4l2vidorient.h" static const GstElementDetails gst_v4l2src_details = GST_ELEMENT_DETAILS ("Video (video4linux2/raw) Source", @@ -138,6 +139,7 @@ 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); static gboolean gst_v4l2src_iface_supported (GstImplementsInterface * iface, GType iface_type) @@ -146,10 +148,13 @@ gst_v4l2src_iface_supported (GstImplementsInterface * iface, GType iface_type) #ifdef HAVE_XVIDEO g_assert (iface_type == GST_TYPE_TUNER || - iface_type == GST_TYPE_X_OVERLAY || iface_type == GST_TYPE_COLOR_BALANCE); + iface_type == GST_TYPE_X_OVERLAY || + iface_type == GST_TYPE_COLOR_BALANCE || + iface_type == GST_TYPE_VIDEO_ORIENTATION); #else g_assert (iface_type == GST_TYPE_TUNER || - iface_type == GST_TYPE_COLOR_BALANCE); + iface_type == GST_TYPE_COLOR_BALANCE || + iface_type == GST_TYPE_VIDEO_ORIENTATION); #endif if (v4l2object->video_fd == -1) @@ -197,6 +202,11 @@ gst_v4l2src_init_interfaces (GType type) NULL, NULL, }; + static const GInterfaceInfo v4l2_videoorientation_info = { + (GInterfaceInitFunc) gst_v4l2src_video_orientation_interface_init, + NULL, + NULL, + }; static const GInterfaceInfo v4l2_propertyprobe_info = { (GInterfaceInitFunc) gst_v4l2src_property_probe_interface_init, NULL, @@ -211,6 +221,8 @@ gst_v4l2src_init_interfaces (GType type) #endif g_type_add_interface_static (type, GST_TYPE_COLOR_BALANCE, &v4l2_colorbalance_info); + g_type_add_interface_static (type, + GST_TYPE_VIDEO_ORIENTATION, &v4l2_videoorientation_info); g_type_add_interface_static (type, GST_TYPE_PROPERTY_PROBE, &v4l2_propertyprobe_info); } -- cgit v1.2.1