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>
39 # include <winsock2.h>
42 # include <sys/socket.h>
43 # include <netinet/in.h>
44 # include <arpa/inet.h>
45 #endif /*G_OS_WIN32 */
49 #define GST_TYPE_NET_CLIENT_CLOCK \
50 (gst_net_client_clock_get_type())
51 #define GST_NET_CLIENT_CLOCK(obj) \
52 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NET_CLIENT_CLOCK,GstNetClientClock))
53 #define GST_NET_CLIENT_CLOCK_CLASS(klass) \
54 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NET_CLIENT_CLOCK,GstNetClientClockClass))
55 #define GST_IS_NET_CLIENT_CLOCK(obj) \
56 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NET_CLIENT_CLOCK))
57 #define GST_IS_NET_CLIENT_CLOCK_CLASS(klass) \
58 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NET_CLIENT_CLOCK))
60 typedef struct _GstNetClientClock GstNetClientClock;
61 typedef struct _GstNetClientClockClass GstNetClientClockClass;
62 typedef struct _GstNetClientClockPrivate GstNetClientClockPrivate;
67 * Opaque #GstNetClientClock structure.
69 struct _GstNetClientClock {
80 GstClockTime current_timeout;
82 struct sockaddr_in *servaddr;
87 GstNetClientClockPrivate *priv;
89 gpointer _gst_reserved[GST_PADDING];
92 struct _GstNetClientClockClass {
93 GstSystemClockClass parent_class;
96 gpointer _gst_reserved[GST_PADDING];
99 GType gst_net_client_clock_get_type (void);
100 GstClock* gst_net_client_clock_new (gchar *name, const gchar *remote_address,
101 gint remote_port, GstClockTime base_time);
105 #endif /* __GST_NET_CLIENT_CLOCK_H__ */