net: GST_EXPORT -> GST_NET_API
[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 #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 GstClock*       gst_net_client_clock_new        (const gchar *name, const gchar *remote_address,
77                                                  gint remote_port, GstClockTime base_time);
78
79 #define GST_TYPE_NTP_CLOCK \
80   (gst_ntp_clock_get_type())
81 #define GST_NTP_CLOCK(obj) \
82   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NTP_CLOCK,GstNtpClock))
83 #define GST_NTP_CLOCK_CLASS(klass) \
84   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NTP_CLOCK,GstNtpClockClass))
85 #define GST_IS_NTP_CLOCK(obj) \
86   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NTP_CLOCK))
87 #define GST_IS_NTP_CLOCK_CLASS(klass) \
88   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NTP_CLOCK))
89
90 typedef struct _GstNetClientClock GstNtpClock;
91 typedef struct _GstNetClientClockClass GstNtpClockClass;
92
93 GST_NET_API
94 GType           gst_ntp_clock_get_type          (void);
95
96 GST_NET_API
97 GstClock*       gst_ntp_clock_new               (const gchar *name, const gchar *remote_address,
98                                                  gint remote_port, GstClockTime base_time);
99
100 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
101 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNetClientClock, gst_object_unref)
102 #endif
103
104 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
105 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNtpClock, gst_object_unref)
106 #endif
107
108 G_END_DECLS
109
110 #endif /* __GST_NET_CLIENT_CLOCK_H__ */