diff options
author | Edgard Lima <edgard.lima@indt.org.br> | 2006-09-19 13:08:35 +0000 |
---|---|---|
committer | Edgard Lima <edgard.lima@indt.org.br> | 2006-09-19 13:08:35 +0000 |
commit | 7a539c59bff3d81f745a27aaba25f8367f99af98 (patch) | |
tree | 42d53d034711d080db37b625d63f1bf049e8ffab /sys/v4l2/gstv4l2vidorient.c | |
parent | fc8b3f18bf4195b6043de436acda902bc138e0af (diff) | |
download | gst-plugins-bad-7a539c59bff3d81f745a27aaba25f8367f99af98.tar.gz gst-plugins-bad-7a539c59bff3d81f745a27aaba25f8367f99af98.tar.bz2 gst-plugins-bad-7a539c59bff3d81f745a27aaba25f8367f99af98.zip |
Add Video Orientation interface support to v4l2src.
Original commit message from CVS:
Add Video Orientation interface support to v4l2src.
Diffstat (limited to 'sys/v4l2/gstv4l2vidorient.c')
-rw-r--r-- | sys/v4l2/gstv4l2vidorient.c | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2vidorient.c b/sys/v4l2/gstv4l2vidorient.c new file mode 100644 index 00000000..8f9c91af --- /dev/null +++ b/sys/v4l2/gstv4l2vidorient.c @@ -0,0 +1,96 @@ +/* GStreamer + * + * Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br> + * + * gstv4l2vidorient.c: video orientation 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <gst/gst.h> + +#include "gstv4l2vidorient.h" +#include "gstv4l2object.h" +#include "v4l2_calls.h" +#include "v4l2src_calls.h" + +GST_DEBUG_CATEGORY_STATIC (v4l2vo_debug); +#define GST_CAT_DEFAULT v4l2vo_debug + +void +gst_v4l2_video_orientation_interface_init (GstVideoOrientationInterface * klass) +{ + GST_DEBUG_CATEGORY_INIT (v4l2vo_debug, "v4l2vo", 0, + "V4L2 VideoOrientation interface debugging"); +} + + +gboolean +gst_v4l2_video_orientation_get_hflip (GstV4l2Object * v4l2object, + gboolean * flip) +{ + + return gst_v4l2_get_attribute (v4l2object, V4L2_CID_HFLIP, flip); +} + +extern gboolean +gst_v4l2_video_orientation_get_vflip (GstV4l2Object * v4l2object, + gboolean * flip) +{ + return gst_v4l2_get_attribute (v4l2object, V4L2_CID_VFLIP, flip); +} + +extern gboolean +gst_v4l2_video_orientation_get_hcenter (GstV4l2Object * v4l2object, + gint * center) +{ + return gst_v4l2_get_attribute (v4l2object, V4L2_CID_HCENTER, center); +} + +extern gboolean +gst_v4l2_video_orientation_get_vcenter (GstV4l2Object * v4l2object, + gint * center) +{ + return gst_v4l2_get_attribute (v4l2object, V4L2_CID_VCENTER, center); +} + +extern gboolean +gst_v4l2_video_orientation_set_hflip (GstV4l2Object * v4l2object, gboolean flip) +{ + return gst_v4l2_set_attribute (v4l2object, V4L2_CID_HFLIP, flip); +} + +extern gboolean +gst_v4l2_video_orientation_set_vflip (GstV4l2Object * v4l2object, gboolean flip) +{ + return gst_v4l2_set_attribute (v4l2object, V4L2_CID_VFLIP, flip); +} + +extern gboolean +gst_v4l2_video_orientation_set_hcenter (GstV4l2Object * v4l2object, gint center) +{ + return gst_v4l2_set_attribute (v4l2object, V4L2_CID_HCENTER, center); +} + +extern gboolean +gst_v4l2_video_orientation_set_vcenter (GstV4l2Object * v4l2object, gint center) +{ + return gst_v4l2_set_attribute (v4l2object, V4L2_CID_VCENTER, center); +} |