Debian Codegraph @

gstreamer/gstreamermm/clockutils.cc

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2
3
4 #include <glibmm.h>
5
6 #include <gstreamermm/clockutils.h>
7 #include <gstreamermm/private/clockutils_p.h>
8
9
10 /* gstreamermm - a C++ wrapper for gstreamer
11 *
12 * Copyright 2008-2016 The gstreamermm Development Team
13 *
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free
26 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29 #include <gst/gst.h>
30
31 namespace Gst
32 {
33
34 const ClockTime CLOCK_TIME_NONE = GST_CLOCK_TIME_NONE;
35 const ClockTime SECOND = GST_SECOND;
36 const ClockTime MILLI_SECOND = GST_MSECOND;
37 const ClockTime MICRO_SECOND = GST_USECOND;
38 const ClockTime NANO_SECOND = GST_NSECOND;
39
40
41 guint get_hours(ClockTime time)
42 {
43 return GST_CLOCK_TIME_IS_VALID (time) ? time / (GST_SECOND * 60 * 60) : 99;
44 }
45
46 guint get_minutes(ClockTime time)
47 {
48 return GST_CLOCK_TIME_IS_VALID (time) ? (time / (GST_SECOND * 60)) % 60 : 99;
49 }
50
51 guint get_seconds(ClockTime time)
52 {
53 return GST_CLOCK_TIME_IS_VALID (time) ? (time / GST_SECOND) % 60 : 99;
54 }
55
56 guint get_milliseconds(ClockTime time)
57 {
58 return GST_CLOCK_TIME_IS_VALID (time) ? (time / GST_MSECOND) % 1000 : 999;
59 }
60
61 guint get_microseconds(ClockTime time)
62 {
63 return GST_CLOCK_TIME_IS_VALID (time) ? (time / GST_USECOND) % 1000 : 999;
64 }
65
66 guint get_nanoseconds(ClockTime time)
67 {
68 return GST_CLOCK_TIME_IS_VALID (time) ? (time / GST_NSECOND) % 1000 : 999;
69 }
70
71 guint get_fractional_seconds(ClockTime time)
72 {
73 return GST_CLOCK_TIME_IS_VALID (time) ? time % GST_SECOND : 999999999;
74 }
75
76 } //namespace Gst
77
78 namespace
79 {
80 } // anonymous namespace
81
82 // static
83 GType Glib::Value<Gst::ClockEntryType>::value_type()
84 {
85 return gst_clock_entry_type_get_type();
86 }
87
88 // static
89 GType Glib::Value<Gst::ClockReturn>::value_type()
90 {
91 return gst_clock_return_get_type();
92 }
93
94 // static
95 GType Glib::Value<Gst::ClockFlags>::value_type()
96 {
97 return gst_clock_flags_get_type();
98 }
99
100