Debian Codegraph @

libs/gst/net/gstnetclientclock.h

raw
1 /* GStreamer
2 * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
3 * 2005 Wim Taymans <[email protected]>
4 * 2005 Andy Wingo <[email protected]>
5 * Copyright (C) 2012 Collabora Ltd. <[email protected]>
6 *
7 * gstnetclientclock.h: clock that synchronizes itself to a time provider over
8 * the network
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Library General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Library General Public License for more details.
19 *
20 * You should have received a copy of the GNU Library General Public
21 * License along with this library; if not, write to the
22 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
23 * Boston, MA 02110-1301, USA.
24 */
25
26
27 #ifndef __GST_NET_CLIENT_CLOCK_H__
28 #define __GST_NET_CLIENT_CLOCK_H__
29
30 #include <gst/gst.h>
31 #include <gst/gstsystemclock.h>
32 #include <gst/net/net-prelude.h>
33
34 G_BEGIN_DECLS
35
36 #define GST_TYPE_NET_CLIENT_CLOCK \
37 (gst_net_client_clock_get_type())
38 #define GST_NET_CLIENT_CLOCK(obj) \
39 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NET_CLIENT_CLOCK,GstNetClientClock))
40 #define GST_NET_CLIENT_CLOCK_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NET_CLIENT_CLOCK,GstNetClientClockClass))
42 #define GST_IS_NET_CLIENT_CLOCK(obj) \
43 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NET_CLIENT_CLOCK))
44 #define GST_IS_NET_CLIENT_CLOCK_CLASS(klass) \
45 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NET_CLIENT_CLOCK))
46
47 typedef struct _GstNetClientClock GstNetClientClock;
48 typedef struct _GstNetClientClockClass GstNetClientClockClass;
49 typedef struct _GstNetClientClockPrivate GstNetClientClockPrivate;
50
51 /**
52 * GstNetClientClock:
53 *
54 * Opaque #GstNetClientClock structure.
55 */
56 struct _GstNetClientClock {
57 GstSystemClock clock;
58
59 /*< private >*/
60 GstNetClientClockPrivate *priv;
61
62 gpointer _gst_reserved[GST_PADDING];
63 };
64
65 struct _GstNetClientClockClass {
66 GstSystemClockClass parent_class;
67
68 /*< private >*/
69 gpointer _gst_reserved[GST_PADDING];
70 };
71
72 GST_NET_API
73 GType gst_net_client_clock_get_type (void);
74
75 GST_NET_API
76 void gst_net_client_clock_deinit (void);
77
78 GST_NET_API
79 GstClock* gst_net_client_clock_new (const gchar *name, const gchar *remote_address,
80 gint remote_port, GstClockTime base_time) G_GNUC_WARN_UNUSED_RESULT;
81
82 #define GST_TYPE_NTP_CLOCK \
83 (gst_ntp_clock_get_type())
84 #define GST_NTP_CLOCK(obj) \
85 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NTP_CLOCK,GstNtpClock))
86 #define GST_NTP_CLOCK_CLASS(klass) \
87 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NTP_CLOCK,GstNtpClockClass))
88 #define GST_IS_NTP_CLOCK(obj) \
89 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NTP_CLOCK))
90 #define GST_IS_NTP_CLOCK_CLASS(klass) \
91 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NTP_CLOCK))
92
93 typedef struct _GstNetClientClock GstNtpClock;
94 typedef struct _GstNetClientClockClass GstNtpClockClass;
95
96 GST_NET_API
97 GType gst_ntp_clock_get_type (void);
98
99 GST_NET_API
100 GstClock* gst_ntp_clock_new (const gchar *name, const gchar *remote_address,
101 gint remote_port, GstClockTime base_time) G_GNUC_WARN_UNUSED_RESULT;
102
103 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNetClientClock, gst_object_unref)
104
105 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNtpClock, gst_object_unref)
106
107 G_END_DECLS
108
109 #endif /* __GST_NET_CLIENT_CLOCK_H__ */