• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * GStreamer AVTP Plugin
3  * Copyright (C) 2019 Intel Corporation
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later
9  * version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef __GST_AVTP_BASE_DEPAYLOAD_H__
23 #define __GST_AVTP_BASE_DEPAYLOAD_H__
24 
25 #include <gst/gst.h>
26 
27 G_BEGIN_DECLS
28 
29 #define GST_TYPE_AVTP_BASE_DEPAYLOAD (gst_avtp_base_depayload_get_type())
30 #define GST_AVTP_BASE_DEPAYLOAD(obj) \
31   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AVTP_BASE_DEPAYLOAD,GstAvtpBaseDepayload))
32 #define GST_AVTP_BASE_DEPAYLOAD_CLASS(klass) \
33   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AVTP_BASE_DEPAYLOAD,GstAvtpBaseDepayloadClass))
34 #define GST_IS_AVTP_BASE_DEPAYLOAD(obj) \
35   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AVTP_BASE_DEPAYLOAD))
36 #define GST_IS_AVTP_BASE_DEPAYLOAD_CLASS(klass) \
37   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AVTP_BASE_DEPAYLOAD))
38 
39 typedef struct _GstAvtpBaseDepayload GstAvtpBaseDepayload;
40 typedef struct _GstAvtpBaseDepayloadClass GstAvtpBaseDepayloadClass;
41 
42 struct _GstAvtpBaseDepayload
43 {
44   GstElement element;
45 
46   GstPad *sinkpad;
47   GstPad *srcpad;
48 
49   guint64 streamid;
50 
51   GstClockTime prev_ptime;
52   guint8 seqnum;
53 
54   gpointer _gst_reserved[GST_PADDING];
55 };
56 
57 struct _GstAvtpBaseDepayloadClass
58 {
59   GstElementClass parent_class;
60 
61   /* Pure virtual function. */
62   GstPadChainFunction chain;
63 
64   GstPadEventFunction sink_event;
65 
66   gpointer _gst_reserved[GST_PADDING];
67 };
68 
69 GType gst_avtp_base_depayload_get_type (void);
70 
71 GstClockTime gst_avtp_base_depayload_tstamp_to_ptime (GstAvtpBaseDepayload *
72     avtpbasedepayload, guint32 tstamp, GstClockTime ref);
73 
74 gboolean gst_avtp_base_depayload_push_segment_event (GstAvtpBaseDepayload *
75     avtpbasedepayload, guint32 avtp_tstamp);
76 
77 G_END_DECLS
78 
79 #endif /* __GST_AVTP_BASE_DEPAYLOAD_H__ */
80