aggregator: remove DEBUG_FUNCPTR
[platform/upstream/gstreamer.git] / libs / gst / net / gstnetclientclock.h
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2005 Wim Taymans <wim@fluendo.com>
4  *                    2005 Andy Wingo <wingo@pobox.com>
5  * Copyright (C) 2012 Collabora Ltd. <tim.muller@collabora.co.uk>
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
33 G_BEGIN_DECLS
34
35 #define GST_TYPE_NET_CLIENT_CLOCK \
36   (gst_net_client_clock_get_type())
37 #define GST_NET_CLIENT_CLOCK(obj) \
38   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NET_CLIENT_CLOCK,GstNetClientClock))
39 #define GST_NET_CLIENT_CLOCK_CLASS(klass) \
40   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NET_CLIENT_CLOCK,GstNetClientClockClass))
41 #define GST_IS_NET_CLIENT_CLOCK(obj) \
42   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NET_CLIENT_CLOCK))
43 #define GST_IS_NET_CLIENT_CLOCK_CLASS(klass) \
44   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NET_CLIENT_CLOCK))
45
46 typedef struct _GstNetClientClock GstNetClientClock;
47 typedef struct _GstNetClientClockClass GstNetClientClockClass;
48 typedef struct _GstNetClientClockPrivate GstNetClientClockPrivate;
49
50 /**
51  * GstNetClientClock:
52  *
53  * Opaque #GstNetClientClock structure.
54  */
55 struct _GstNetClientClock {
56   GstSystemClock clock;
57
58   /*< private >*/
59   GstNetClientClockPrivate *priv;
60
61   gpointer _gst_reserved[GST_PADDING];
62 };
63
64 struct _GstNetClientClockClass {
65   GstSystemClockClass parent_class;
66
67   /*< private >*/
68   gpointer _gst_reserved[GST_PADDING];
69 };
70
71 GST_EXPORT
72 GType           gst_net_client_clock_get_type   (void);
73
74 GST_EXPORT
75 GstClock*       gst_net_client_clock_new        (const gchar *name, const gchar *remote_address,
76                                                  gint remote_port, GstClockTime base_time);
77
78 #define GST_TYPE_NTP_CLOCK \
79   (gst_ntp_clock_get_type())
80 #define GST_NTP_CLOCK(obj) \
81   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NTP_CLOCK,GstNtpClock))
82 #define GST_NTP_CLOCK_CLASS(klass) \
83   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NTP_CLOCK,GstNtpClockClass))
84 #define GST_IS_NTP_CLOCK(obj) \
85   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NTP_CLOCK))
86 #define GST_IS_NTP_CLOCK_CLASS(klass) \
87   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NTP_CLOCK))
88
89 typedef struct _GstNetClientClock GstNtpClock;
90 typedef struct _GstNetClientClockClass GstNtpClockClass;
91
92 GST_EXPORT
93 GType           gst_ntp_clock_get_type          (void);
94
95 GST_EXPORT
96 GstClock*       gst_ntp_clock_new               (const gchar *name, const gchar *remote_address,
97                                                  gint remote_port, GstClockTime base_time);
98
99 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
100 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNetClientClock, gst_object_unref)
101 #endif
102
103 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
104 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNtpClock, gst_object_unref)
105 #endif
106
107 G_END_DECLS
108
109 #endif /* __GST_NET_CLIENT_CLOCK_H__ */