Debian Codegraph @

gstreamer/gstreamermm/clockutils.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2 #ifndef _GSTREAMERMM_CLOCKUTILS_H
3 #define _GSTREAMERMM_CLOCKUTILS_H
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /* gstreamermm - a C++ wrapper for gstreamer
10 *
11 * Copyright 2008-2016 The gstreamermm Development Team
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2.1 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28 #include <gst/gstclock.h>
29 #include <gstreamermmconfig.h>
30
31
32 namespace Gst
33 {
34
35 /** A data type to hold a time, measured in nanoseconds.
36 */
37 typedef GstClockTime ClockTime;
38
39 /** A data type to hold a timedifference, measured in nanoseconds.
40 */
41 typedef GstClockTimeDiff ClockTimeDiff;
42
43 /** A constant to define an undefined clock time.
44 */
45 extern GSTREAMERMM_API const ClockTime CLOCK_TIME_NONE;
46
47 /** A constant that defines one GStreamer second.
48 */
49 extern GSTREAMERMM_API const ClockTime SECOND;
50
51 /** A constant that defines one GStreamer millisecond.
52 */
53 extern GSTREAMERMM_API const ClockTime MILLI_SECOND;
54
55 /** A constant that defines one GStreamer microsecond.
56 */
57 extern GSTREAMERMM_API const ClockTime MICRO_SECOND;
58
59 /** A constant that defines one GStreamer nanosecond.
60 */
61 extern GSTREAMERMM_API const ClockTime NANO_SECOND;
62
63 /** @addtogroup gstreamermmEnums gstreamermm Enums and Flags */
64
65 /**
66 * @var ClockEntryType CLOCK_ENTRY_SINGLE
67 * A single shot timeout.
68 *
69 * @var ClockEntryType CLOCK_ENTRY_PERIODIC
70 * A periodic timeout request.
71 *
72 * @enum ClockEntryType
73 *
74 * The type of the clock entry
75 *
76 * @ingroup gstreamermmEnums
77 */
78 enum ClockEntryType
79 {
80 CLOCK_ENTRY_SINGLE,
81 CLOCK_ENTRY_PERIODIC
82 };
83
84 } // namespace Gst
85
86 #ifndef DOXYGEN_SHOULD_SKIP_THIS
87 namespace Glib
88 {
89
90 template <>
91 class Value<Gst::ClockEntryType> : public Glib::Value_Enum<Gst::ClockEntryType>
92 {
93 public:
94 static GType value_type() G_GNUC_CONST;
95 };
96
97 } // namespace Glib
98 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
99
100 namespace Gst
101 {
102
103 /**
104 * @var ClockReturn CLOCK_OK
105 * The operation succeeded.
106 *
107 * @var ClockReturn CLOCK_EARLY
108 * The operation was scheduled too late.
109 *
110 * @var ClockReturn CLOCK_UNSCHEDULED
111 * The clockID was unscheduled.
112 *
113 * @var ClockReturn CLOCK_BUSY
114 * The ClockID is busy.
115 *
116 * @var ClockReturn CLOCK_BADTIME
117 * A bad time was provided to a function.
118 *
119 * @var ClockReturn CLOCK_ERROR
120 * An error occurred.
121 *
122 * @var ClockReturn CLOCK_UNSUPPORTED
123 * Operation is not supported.
124 *
125 * @var ClockReturn CLOCK_DONE
126 * The ClockID is done waiting.
127 *
128 * @enum ClockReturn
129 *
130 * The return value of a clock operation.
131 *
132 * @ingroup gstreamermmEnums
133 */
134 enum ClockReturn
135 {
136 CLOCK_OK,
137 CLOCK_EARLY,
138 CLOCK_UNSCHEDULED,
139 CLOCK_BUSY,
140 CLOCK_BADTIME,
141 CLOCK_ERROR,
142 CLOCK_UNSUPPORTED,
143 CLOCK_DONE
144 };
145
146 } // namespace Gst
147
148 #ifndef DOXYGEN_SHOULD_SKIP_THIS
149 namespace Glib
150 {
151
152 template <>
153 class Value<Gst::ClockReturn> : public Glib::Value_Enum<Gst::ClockReturn>
154 {
155 public:
156 static GType value_type() G_GNUC_CONST;
157 };
158
159 } // namespace Glib
160 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
161
162 namespace Gst
163 {
164
165 /**
166 * @var ClockFlags CLOCK_FLAG_CAN_DO_SINGLE_SYNC
167 * Clock can do a single sync timeout request.
168 *
169 * @var ClockFlags CLOCK_FLAG_CAN_DO_SINGLE_ASYNC
170 * Clock can do a single async timeout request.
171 *
172 * @var ClockFlags CLOCK_FLAG_CAN_DO_PERIODIC_SYNC
173 * Clock can do sync periodic timeout requests.
174 *
175 * @var ClockFlags CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC
176 * Clock can do async periodic timeout callbacks.
177 *
178 * @var ClockFlags CLOCK_FLAG_CAN_SET_RESOLUTION
179 * Clock's resolution can be changed.
180 *
181 * @var ClockFlags CLOCK_FLAG_CAN_SET_MASTER
182 * Clock can be slaved to a master clock.
183 *
184 * @var ClockFlags CLOCK_FLAG_NEEDS_STARTUP_SYNC
185 * Clock needs to be synced before it can be used
186 * (Since 1.6).
187 *
188 * @var ClockFlags CLOCK_FLAG_LAST
189 * Subclasses can add additional flags starting from this flag.
190 *
191 * @enum ClockFlags
192 *
193 * The capabilities of this clock
194 *
195 * @ingroup gstreamermmEnums
196 * @par Bitwise operators:
197 * <tt>%ClockFlags operator|(ClockFlags, ClockFlags)</tt><br>
198 * <tt>%ClockFlags operator&(ClockFlags, ClockFlags)</tt><br>
199 * <tt>%ClockFlags operator^(ClockFlags, ClockFlags)</tt><br>
200 * <tt>%ClockFlags operator~(ClockFlags)</tt><br>
201 * <tt>%ClockFlags& operator|=(ClockFlags&, ClockFlags)</tt><br>
202 * <tt>%ClockFlags& operator&=(ClockFlags&, ClockFlags)</tt><br>
203 * <tt>%ClockFlags& operator^=(ClockFlags&, ClockFlags)</tt><br>
204 */
205 enum ClockFlags
206 {
207 CLOCK_FLAG_CAN_DO_SINGLE_SYNC = (GST_OBJECT_FLAG_LAST << 0),
208 CLOCK_FLAG_CAN_DO_SINGLE_ASYNC = (GST_OBJECT_FLAG_LAST << 1),
209 CLOCK_FLAG_CAN_DO_PERIODIC_SYNC = (GST_OBJECT_FLAG_LAST << 2),
210 CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC = (GST_OBJECT_FLAG_LAST << 3),
211 CLOCK_FLAG_CAN_SET_RESOLUTION = (GST_OBJECT_FLAG_LAST << 4),
212 CLOCK_FLAG_CAN_SET_MASTER = (GST_OBJECT_FLAG_LAST << 5),
213 CLOCK_FLAG_NEEDS_STARTUP_SYNC = (GST_OBJECT_FLAG_LAST << 6),
214 CLOCK_FLAG_LAST = (GST_OBJECT_FLAG_LAST << 8)
215 };
216
217 /** @ingroup gstreamermmEnums */
218 inline ClockFlags operator|(ClockFlags lhs, ClockFlags rhs)
219 { return static_cast<ClockFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
220
221 /** @ingroup gstreamermmEnums */
222 inline ClockFlags operator&(ClockFlags lhs, ClockFlags rhs)
223 { return static_cast<ClockFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
224
225 /** @ingroup gstreamermmEnums */
226 inline ClockFlags operator^(ClockFlags lhs, ClockFlags rhs)
227 { return static_cast<ClockFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
228
229 /** @ingroup gstreamermmEnums */
230 inline ClockFlags operator~(ClockFlags flags)
231 { return static_cast<ClockFlags>(~static_cast<unsigned>(flags)); }
232
233 /** @ingroup gstreamermmEnums */
234 inline ClockFlags& operator|=(ClockFlags& lhs, ClockFlags rhs)
235 { return (lhs = static_cast<ClockFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
236
237 /** @ingroup gstreamermmEnums */
238 inline ClockFlags& operator&=(ClockFlags& lhs, ClockFlags rhs)
239 { return (lhs = static_cast<ClockFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
240
241 /** @ingroup gstreamermmEnums */
242 inline ClockFlags& operator^=(ClockFlags& lhs, ClockFlags rhs)
243 { return (lhs = static_cast<ClockFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
244
245 } // namespace Gst
246
247 #ifndef DOXYGEN_SHOULD_SKIP_THIS
248 namespace Glib
249 {
250
251 template <>
252 class Value<Gst::ClockFlags> : public Glib::Value_Flags<Gst::ClockFlags>
253 {
254 public:
255 static GType value_type() G_GNUC_CONST;
256 };
257
258 } // namespace Glib
259 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
260
261 namespace Gst
262 {
263
264
265 /** Gets the hour component of Gst::ClockTime.
266 * @param time The Gst::ClockTime to parse.
267 * @return The hour component of the Gst::ClockTime.
268 */
269 guint get_hours(Gst::ClockTime time);
270
271 /** Gets the minute component of Gst::ClockTime.
272 * @param time The Gst::ClockTime to parse.
273 * @return The minute component of the Gst::ClockTime.
274 */
275 guint get_minutes(Gst::ClockTime time);
276
277 /** Gets the seconds component of Gst::ClockTime.
278 * @param time The Gst::ClockTime to parse.
279 * @return The seconds component of the Gst::ClockTime.
280 */
281 guint get_seconds(Gst::ClockTime time);
282
283 /** Gets the milliseconds component of Gst::ClockTime.
284 * @param time The Gst::ClockTime to parse.
285 * @return The milliseconds component of the Gst::ClockTime.
286 */
287 guint get_milliseconds(Gst::ClockTime time);
288
289 /** Gets the microseconds component of Gst::ClockTime.
290 * @param time The Gst::ClockTime to parse.
291 * @return The microseconds component of the Gst::ClockTime.
292 */
293 guint get_microseconds(Gst::ClockTime time);
294
295 /** Gets the nanoseconds component of Gst::ClockTime.
296 * @param time The Gst::ClockTime to parse.
297 * @return The nanoseconds component of the Gst::ClockTime.
298 */
299 guint get_nanoseconds(Gst::ClockTime time);
300
301 /** Gets the fractional component (milli, micro and nano seconds) of
302 * Gst::ClockTime.
303 * @param time The Gst::ClockTime to parse.
304 * @return The fractional component of the Gst::ClockTime.
305 */
306 guint get_fractional_seconds(Gst::ClockTime time);
307
308 }
309
310
311 #endif /* _GSTREAMERMM_CLOCKUTILS_H */
312