rtpac3depay: should output audio/x-ac3 not audio/ac3
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-good / gst / rtp / gstrtpulpfecdec.h
1 /* GStreamer plugin for forward error correction
2  * Copyright (C) 2017 Pexip
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
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  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17  *
18  * Author: Mikhail Fludkov <misha@pexip.com>
19  */
20
21 #ifndef __GST_RTP_ULPFEC_DEC_H__
22 #define __GST_RTP_ULPFEC_DEC_H__
23
24 #include <gst/gst.h>
25
26 #include "rtpstorage.h"
27
28 G_BEGIN_DECLS
29
30 #define GST_TYPE_RTP_ULPFEC_DEC \
31   (gst_rtp_ulpfec_dec_get_type())
32 #define GST_RTP_ULPFEC_DEC(obj) \
33   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_ULPFEC_DEC,GstRtpUlpFecDec))
34 #define GST_RTP_ULPFEC_DEC_CLASS(klass) \
35   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_ULPFEC_DEC,GstRtpUlpFecDecClass))
36 #define GST_IS_RTP_ULPFEC_DEC(obj) \
37   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_ULPFEC_DEC))
38 #define GST_IS_RTP_ULPFEC_DEC_CLASS(klass) \
39   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_ULPFEC_DEC))
40
41 typedef struct _GstRtpUlpFecDec GstRtpUlpFecDec;
42 typedef struct _GstRtpUlpFecDecClass GstRtpUlpFecDecClass;
43
44 struct _GstRtpUlpFecDecClass {
45   GstElementClass parent_class;
46 };
47
48 struct _GstRtpUlpFecDec {
49   GstElement parent;
50   GstPad *srcpad;
51   GstPad *sinkpad;
52
53   /* properties */
54   guint8 fec_pt;
55   RtpStorage *storage;
56   gsize packets_recovered;
57   gsize packets_unrecovered;
58   gboolean passthrough;
59
60   /* internal stuff */
61   GstFlowReturn chain_return_val;
62   gboolean unset_discont_flag;
63   gboolean needs_discont;
64   gboolean have_caps_ssrc;
65   gboolean have_caps_pt;
66   guint32 caps_ssrc;
67   guint8 caps_pt;
68   GList *info_media;
69   GPtrArray *info_fec;
70   GArray *info_arr;
71   GArray *scratch_buf;
72   gboolean lost_packet_from_storage;
73   gboolean lost_packet_returned;
74   guint16 next_seqnum;
75
76   /* stats */
77   gsize fec_packets_received;
78   gsize fec_packets_rejected;
79   gsize packets_rejected;
80 };
81
82 GType gst_rtp_ulpfec_dec_get_type (void);
83
84 G_END_DECLS
85
86 #endif /* __GST_RTP_ULPFEC_DEC_H__ */