2 * Copyright (C) 2005 Andy Wingo <wingo@pobox.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 #ifndef __GST_NET_TIME_PACKET_H__
22 #define __GST_NET_TIME_PACKET_H__
30 * GST_NET_TIME_PACKET_SIZE:
32 * The size of the packets sent between network clocks.
34 #define GST_NET_TIME_PACKET_SIZE 16
36 typedef struct _GstNetTimePacket GstNetTimePacket;
40 * @local_time: the local time when this packet was sent
41 * @remote_time: the remote time observation
43 * Content of a #GstNetTimePacket.
45 struct _GstNetTimePacket {
46 GstClockTime local_time;
47 GstClockTime remote_time;
50 /* FIXME 0.11: get rid of the packet stuff? add an unref/free function? */
51 GstNetTimePacket* gst_net_time_packet_new (const guint8 *buffer);
52 guint8* gst_net_time_packet_serialize (const GstNetTimePacket *packet);
54 GstNetTimePacket* gst_net_time_packet_receive (GSocket * socket,
55 GSocketAddress ** src_address,
58 gboolean gst_net_time_packet_send (const GstNetTimePacket * packet,
60 GSocketAddress * dest_address,
66 #endif /* __GST_NET_TIME_PACKET_H__ */