2 * Copyright (C) 2006 Nokia <stefan.kost@nokia.com
4 * videoorientation.h: video flipping and centering interface
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
22 #ifndef __GST_VIDEO_ORIENTATION_H__
23 #define __GST_VIDEO_ORIENTATION_H__
26 #include <gst/video/video-prelude.h>
30 #define GST_TYPE_VIDEO_ORIENTATION \
31 (gst_video_orientation_get_type ())
32 #define GST_VIDEO_ORIENTATION(obj) \
33 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VIDEO_ORIENTATION, GstVideoOrientation))
34 #define GST_IS_VIDEO_ORIENTATION(obj) \
35 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VIDEO_ORIENTATION))
36 #define GST_VIDEO_ORIENTATION_GET_INTERFACE(inst) \
37 (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_VIDEO_ORIENTATION, GstVideoOrientationInterface))
40 * GstVideoOrientation:
42 * Opaque #GstVideoOrientation data structure.
44 typedef struct _GstVideoOrientation GstVideoOrientation;
45 typedef struct _GstVideoOrientationInterface GstVideoOrientationInterface;
48 * GstVideoOrientationInterface:
49 * @iface: parent interface type.
50 * @get_hflip: virtual method to get horizontal flipping state
51 * @get_vflip: virtual method to get vertical flipping state
52 * @get_hcenter: virtual method to get horizontal centering state
53 * @get_vcenter: virtual method to get vertical centering state
54 * @set_hflip: virtual method to set horizontal flipping state
55 * @set_vflip: virtual method to set vertical flipping state
56 * @set_hcenter: virtual method to set horizontal centering state
57 * @set_vcenter: virtual method to set vertical centering state
59 * #GstVideoOrientationInterface interface.
61 struct _GstVideoOrientationInterface {
64 /* FIXME 0.11: fix awkward API? add some kind of get_supported flags thing
65 * and then just return booleans/int from all vfuncs requiring the caller
66 * to check the flags first */
68 /* virtual functions */
69 gboolean (* get_hflip) (GstVideoOrientation *video_orientation, gboolean *flip);
70 gboolean (* get_vflip) (GstVideoOrientation *video_orientation, gboolean *flip);
71 gboolean (* get_hcenter) (GstVideoOrientation *video_orientation, gint *center);
72 gboolean (* get_vcenter) (GstVideoOrientation *video_orientation, gint *center);
74 gboolean (* set_hflip) (GstVideoOrientation *video_orientation, gboolean flip);
75 gboolean (* set_vflip) (GstVideoOrientation *video_orientation, gboolean flip);
76 gboolean (* set_hcenter) (GstVideoOrientation *video_orientation, gint center);
77 gboolean (* set_vcenter) (GstVideoOrientation *video_orientation, gint center);
81 GType gst_video_orientation_get_type (void);
83 /* virtual class function wrappers */
86 gboolean gst_video_orientation_get_hflip (GstVideoOrientation *video_orientation, gboolean *flip);
89 gboolean gst_video_orientation_get_vflip (GstVideoOrientation *video_orientation, gboolean *flip);
92 gboolean gst_video_orientation_get_hcenter (GstVideoOrientation *video_orientation, gint *center);
95 gboolean gst_video_orientation_get_vcenter (GstVideoOrientation *video_orientation, gint *center);
98 gboolean gst_video_orientation_set_hflip (GstVideoOrientation *video_orientation, gboolean flip);
101 gboolean gst_video_orientation_set_vflip (GstVideoOrientation *video_orientation, gboolean flip);
104 gboolean gst_video_orientation_set_hcenter (GstVideoOrientation *video_orientation, gint center);
107 gboolean gst_video_orientation_set_vcenter (GstVideoOrientation *video_orientation, gint center);
111 #endif /* __GST_VIDEO_ORIENTATION_H__ */