1 /*
2 Copyright (C) 2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
3 Copyright (C) 2010 Collabora Multimedia.
4 @author Mauricio Piacentini <mauricio.piacentini@collabora.co.uk>
5
6 This library is free software; you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published
8 by the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version.
10
11 This program 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
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 #include "videoorientation.h"
20 #include <gst/video/videoorientation.h>
21
22 namespace QGst {
23
horizontalFlipEnabled() const24 bool VideoOrientation::horizontalFlipEnabled() const
25 {
26 gboolean flipped;
27 //Ignoring the gboolean result of the function, can be tested when setting the property
28 gst_video_orientation_get_hflip(object<GstVideoOrientation>(), &flipped);
29 return flipped;
30 }
31
verticalFlipEnabled() const32 bool VideoOrientation::verticalFlipEnabled() const
33 {
34 gboolean flipped;
35 //Ignoring the gboolean result of the function, can be tested when setting the property
36 gst_video_orientation_get_vflip(object<GstVideoOrientation>(), &flipped);
37 return flipped;
38 }
39
horizontalCenter() const40 int VideoOrientation::horizontalCenter() const
41 {
42 int center = 0;
43 //Ignoring the gboolean result of the function, can be tested when setting the property
44 gst_video_orientation_get_hcenter(object<GstVideoOrientation>(), ¢er);
45 return center;
46 }
47
verticalCenter() const48 int VideoOrientation::verticalCenter() const
49 {
50 int center = 0;
51 //Ignoring the gboolean result of the function, can be tested when setting the property
52 gst_video_orientation_get_vcenter(object<GstVideoOrientation>(), ¢er);
53 return center;
54 }
55
enableHorizontalFlip(bool enabled)56 bool VideoOrientation::enableHorizontalFlip(bool enabled)
57 {
58 return gst_video_orientation_set_hflip(object<GstVideoOrientation>(), enabled);
59 }
60
enableVerticalFlip(bool enabled)61 bool VideoOrientation::enableVerticalFlip(bool enabled)
62 {
63 return gst_video_orientation_set_vflip(object<GstVideoOrientation>(), enabled);
64 }
65
setHorizontalCenter(int center)66 bool VideoOrientation::setHorizontalCenter(int center)
67 {
68 return gst_video_orientation_set_hcenter(object<GstVideoOrientation>(), center);
69 }
70
setVerticalCenter(int center)71 bool VideoOrientation::setVerticalCenter(int center)
72 {
73 return gst_video_orientation_set_hcenter(object<GstVideoOrientation>(), center);
74 }
75
76 } //namespace QGst
77
78