Debian Codegraph @

gstreamer/src/videoorientation.hg

raw
1 /* gstreamermm - a C++ wrapper for gstreamer
2 *
3 * Copyright 2008 The gstreamermm Development Team
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #include <gst/video/videoorientation.h>
21 #include <glibmm/interface.h>
22
23 _DEFS(gstreamermm,gst)
24
25 namespace Gst
26 {
27
28 /** An interface for elements providing video orientation controls.
29 * The interface allows unified access to control flipping and autocenter
30 * operation of video-sources or operators.
31 * @ingroup GstInterfaces
32 */
33 class VideoOrientation : public Glib::Interface
34 {
35 _CLASS_INTERFACE(VideoOrientation, GstVideoOrientation, GST_VIDEO_ORIENTATION, GstVideoOrientationInterface)
36
37 public:
38 _WRAP_METHOD(bool get_hcenter(int& center) const, gst_video_orientation_get_hcenter)
39 _WRAP_METHOD_DOCS_ONLY(gst_video_orientation_get_hflip)
40 bool get_hflip(bool& flip) const;
41 _WRAP_METHOD(bool get_vcenter(int& center) const, gst_video_orientation_get_vcenter)
42 _WRAP_METHOD_DOCS_ONLY(gst_video_orientation_get_vflip)
43 bool get_vflip(bool& flip) const;
44 _WRAP_METHOD(bool set_hcenter(int center), gst_video_orientation_set_hcenter)
45 _WRAP_METHOD(bool set_hflip(bool flip), gst_video_orientation_set_hflip)
46 _WRAP_METHOD(bool set_vcenter(int center), gst_video_orientation_set_vcenter)
47 _WRAP_METHOD(bool set_vflip(bool flip), gst_video_orientation_set_vflip)
48
49 virtual bool get_hflip_vfunc(bool& flip) const;
50 virtual bool get_vflip_vfunc(bool& flip) const;
51
52 _WRAP_VFUNC(bool get_hcenter(int& center) const, "get_hcenter")
53 _WRAP_VFUNC(bool get_vcenter(int& center) const, "get_vcenter")
54 _WRAP_VFUNC(bool set_hflip(bool flip), "set_hflip")
55 _WRAP_VFUNC(bool set_vflip(bool flip), "set_vflip")
56 _WRAP_VFUNC(bool set_hcenter(int center), "set_hcenter")
57 _WRAP_VFUNC(bool set_vcenter(int center), "set_vcenter")
58
59 protected:
60 #m4begin
61 _PUSH(SECTION_PCC_CLASS_INIT_VFUNCS)
62 klass->get_hflip = &get_hflip_vfunc_callback;
63 klass->get_vflip = &get_vflip_vfunc_callback;
64 _SECTION(SECTION_PH_VFUNCS)
65 static gboolean get_hflip_vfunc_callback(GstVideoOrientation* self, gboolean* flip);
66 static gboolean get_vflip_vfunc_callback(GstVideoOrientation* self, gboolean* flip);
67 _POP()
68 #m4end
69 };
70
71 } // namespace Gst