Debian Codegraph @

gstreamer/src/clockutils.hg

raw
1 /* gstreamermm - a C++ wrapper for gstreamer
2 *
3 * Copyright 2008-2016 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/gstclock.h>
21 #include <gstreamermmconfig.h>
22
23 _DEFS(gstreamermm,gst)
24
25 namespace Gst
26 {
27
28 /** A data type to hold a time, measured in nanoseconds.
29 */
30 typedef GstClockTime ClockTime;
31
32 /** A data type to hold a timedifference, measured in nanoseconds.
33 */
34 typedef GstClockTimeDiff ClockTimeDiff;
35
36 /** A constant to define an undefined clock time.
37 */
38 extern GSTREAMERMM_API const ClockTime CLOCK_TIME_NONE;
39
40 /** A constant that defines one GStreamer second.
41 */
42 extern GSTREAMERMM_API const ClockTime SECOND;
43
44 /** A constant that defines one GStreamer millisecond.
45 */
46 extern GSTREAMERMM_API const ClockTime MILLI_SECOND;
47
48 /** A constant that defines one GStreamer microsecond.
49 */
50 extern GSTREAMERMM_API const ClockTime MICRO_SECOND;
51
52 /** A constant that defines one GStreamer nanosecond.
53 */
54 extern GSTREAMERMM_API const ClockTime NANO_SECOND;
55
56 _WRAP_ENUM(ClockEntryType, GstClockEntryType)
57 _WRAP_ENUM(ClockReturn, GstClockReturn)
58 _WRAP_ENUM(ClockFlags, GstClockFlags)
59
60
61 /** Gets the hour component of Gst::ClockTime.
62 * @param time The Gst::ClockTime to parse.
63 * @return The hour component of the Gst::ClockTime.
64 */
65 guint get_hours(Gst::ClockTime time);
66
67 /** Gets the minute component of Gst::ClockTime.
68 * @param time The Gst::ClockTime to parse.
69 * @return The minute component of the Gst::ClockTime.
70 */
71 guint get_minutes(Gst::ClockTime time);
72
73 /** Gets the seconds component of Gst::ClockTime.
74 * @param time The Gst::ClockTime to parse.
75 * @return The seconds component of the Gst::ClockTime.
76 */
77 guint get_seconds(Gst::ClockTime time);
78
79 /** Gets the milliseconds component of Gst::ClockTime.
80 * @param time The Gst::ClockTime to parse.
81 * @return The milliseconds component of the Gst::ClockTime.
82 */
83 guint get_milliseconds(Gst::ClockTime time);
84
85 /** Gets the microseconds component of Gst::ClockTime.
86 * @param time The Gst::ClockTime to parse.
87 * @return The microseconds component of the Gst::ClockTime.
88 */
89 guint get_microseconds(Gst::ClockTime time);
90
91 /** Gets the nanoseconds component of Gst::ClockTime.
92 * @param time The Gst::ClockTime to parse.
93 * @return The nanoseconds component of the Gst::ClockTime.
94 */
95 guint get_nanoseconds(Gst::ClockTime time);
96
97 /** Gets the fractional component (milli, micro and nano seconds) of
98 * Gst::ClockTime.
99 * @param time The Gst::ClockTime to parse.
100 * @return The fractional component of the Gst::ClockTime.
101 */
102 guint get_fractional_seconds(Gst::ClockTime time);
103
104 }