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>
7 * gstnetclientclock.h: clock that synchronizes itself to a time provider over
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.
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.
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.
27 #ifndef __GST_NET_CLIENT_CLOCK_H__
28 #define __GST_NET_CLIENT_CLOCK_H__
31 #include <gst/gstsystemclock.h>
32 #include <gst/net/net-prelude.h>
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))
47 typedef struct _GstNetClientClock GstNetClientClock;
48 typedef struct _GstNetClientClockClass GstNetClientClockClass;
49 typedef struct _GstNetClientClockPrivate GstNetClientClockPrivate;
54 * Opaque #GstNetClientClock structure.
56 struct _GstNetClientClock {
60 GstNetClientClockPrivate *priv;
62 gpointer _gst_reserved[GST_PADDING];
65 struct _GstNetClientClockClass {
66 GstSystemClockClass parent_class;
69 gpointer _gst_reserved[GST_PADDING];
73 GType gst_net_client_clock_get_type (void);
76 GstClock* gst_net_client_clock_new (const gchar *name, const gchar *remote_address,
77 gint remote_port, GstClockTime base_time);
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))
90 typedef struct _GstNetClientClock GstNtpClock;
91 typedef struct _GstNetClientClockClass GstNtpClockClass;
94 GType gst_ntp_clock_get_type (void);
97 GstClock* gst_ntp_clock_new (const gchar *name, const gchar *remote_address,
98 gint remote_port, GstClockTime base_time);
100 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
101 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNetClientClock, gst_object_unref)
104 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
105 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstNtpClock, gst_object_unref)
110 #endif /* __GST_NET_CLIENT_CLOCK_H__ */