webrtc/nice: Support domain name as connection-address of ICE candidate
[platform/upstream/gstreamer.git] / subprojects / gstreamer / plugins / elements / gstclocksync.h
1 /* GStreamer
2  * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3  *                    2000 Wim Taymans <wtay@chello.be>
4  *                    2005 Wim Taymans <wim@fluendo.com>
5  * Copyright (C) 2020 Jan Schmidt <jan@centricular.com>
6  *
7  * gstclocksync.h:
8  *
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.
13  *
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.
18  *
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., 51 Franklin St, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  */
24
25 #ifndef __GST_CLOCKSYNC_H__
26 #define __GST_CLOCKSYNC_H__
27
28 #include <gst/gst.h>
29
30 G_BEGIN_DECLS
31
32 /* #defines don't like whitespacey bits */
33 #define GST_TYPE_CLOCKSYNC \
34   (gst_clock_sync_get_type())
35 #define GST_CLOCKSYNC(obj) \
36   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CLOCKSYNC,GstClockSync))
37 #define GST_CLOCKSYNC_CLASS(klass) \
38   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CLOCKSYNC,GstClockSyncClass))
39 #define GST_IS_CLOCKSYNC(obj) \
40   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CLOCKSYNC))
41 #define GST_IS_CLOCKSYNC_CLASS(klass) \
42   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CLOCKSYNC))
43
44 typedef struct _GstClockSync      GstClockSync;
45 typedef struct _GstClockSyncClass GstClockSyncClass;
46
47 struct _GstClockSync
48 {
49   GstElement element;
50
51   /*< private >*/
52   GstPad *sinkpad, *srcpad;
53
54   GstSegment     segment;
55   GstClockID     clock_id;
56   gboolean       flushing;
57   gboolean           sync;
58
59   GCond          blocked_cond;
60   gboolean       blocked;
61   GstClockTimeDiff  ts_offset;
62   gboolean sync_to_first;
63   gboolean is_first;
64
65   GstClockTime   upstream_latency;
66 };
67
68 struct _GstClockSyncClass
69 {
70   GstElementClass parent_class;
71 };
72
73 GType gst_clock_sync_get_type (void);
74
75 G_END_DECLS
76
77 #endif /* __GST_CLOCKSYNC_H__ */