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 #include <sys/types.h>
40 #include <sys/socket.h>
41 #include <netinet/in.h>
42 #include <arpa/inet.h>
46 * GST_NET_TIME_PACKET_SIZE:
48 * The size of the packets sent between network clocks.
50 #define GST_NET_TIME_PACKET_SIZE 16
52 typedef struct _GstNetTimePacket GstNetTimePacket;
56 * @local_time: the local time when this packet was sent
57 * @remote_time: the remote time observation
59 * Content of a #GstNetTimePacket.
61 struct _GstNetTimePacket {
62 GstClockTime local_time;
63 GstClockTime remote_time;
66 GstNetTimePacket* gst_net_time_packet_new (const guint8 *buffer);
67 guint8* gst_net_time_packet_serialize (const GstNetTimePacket *packet);
69 GstNetTimePacket* gst_net_time_packet_receive (gint fd, struct sockaddr *addr,
71 gint gst_net_time_packet_send (const GstNetTimePacket *packet,
72 gint fd, struct sockaddr *addr,
78 #endif /* __GST_NET_TIME_PACKET_H__ */