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>
6 * gstnetclientclock.h: clock that synchronizes itself to a time provider over
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the
21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 * Boston, MA 02111-1307, USA.
26 #ifndef __GST_NET_CLIENT_CLOCK_H__
27 #define __GST_NET_CLIENT_CLOCK_H__
30 #include <gst/gstsystemclock.h>
36 #include <sys/types.h>
38 #include <sys/socket.h>
39 #include <netinet/in.h>
40 #include <arpa/inet.h>
44 #define GST_TYPE_NET_CLIENT_CLOCK \
45 (gst_net_client_clock_get_type())
46 #define GST_NET_CLIENT_CLOCK(obj) \
47 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NET_CLIENT_CLOCK,GstNetClientClock))
48 #define GST_NET_CLIENT_CLOCK_CLASS(klass) \
49 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NET_CLIENT_CLOCK,GstNetClientClockClass))
50 #define GST_IS_NET_CLIENT_CLOCK(obj) \
51 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NET_CLIENT_CLOCK))
52 #define GST_IS_NET_CLIENT_CLOCK_CLASS(obj) \
53 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NET_CLIENT_CLOCK))
55 typedef struct _GstNetClientClock GstNetClientClock;
56 typedef struct _GstNetClientClockClass GstNetClientClockClass;
58 struct _GstNetClientClock {
69 GstClockTime current_timeout;
71 struct sockaddr_id *servaddr;
76 gpointer _gst_reserved[GST_PADDING];
79 struct _GstNetClientClockClass {
80 GstSystemClockClass parent_class;
83 gpointer _gst_reserved[GST_PADDING];
86 GType gst_net_client_clock_get_type (void);
87 GstClock* gst_net_client_clock_new (gchar *name, const gchar *remote_address,
88 gint remote_port, GstClockTime base_time);
92 #endif /* __GST_NET_CLIENT_CLOCK_H__ */