1 /* RTP Retransmission receiver element for GStreamer
5 * Copyright (C) 2013 Collabora Ltd.
6 * @author Julien Isorce <julien.isorce@collabora.co.uk>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef __GST_RTP_RTX_RECEIVE_H__
25 #define __GST_RTP_RTX_RECEIVE_H__
28 #include <gst/rtp/gstrtpbuffer.h>
31 #define GST_TYPE_RTP_RTX_RECEIVE (gst_rtp_rtx_receive_get_type())
32 #define GST_RTP_RTX_RECEIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_RTX_RECEIVE, GstRtpRtxReceive))
33 #define GST_RTP_RTX_RECEIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_RTX_RECEIVE, GstRtpRtxReceiveClass))
34 #define GST_RTP_RTX_RECEIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTP_RTX_RECEIVE, GstRtpRtxReceiveClass))
35 #define GST_IS_RTP_RTX_RECEIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_RTX_RECEIVE))
36 #define GST_IS_RTP_RTX_RECEIVE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_RTX_RECEIVE))
37 typedef struct _GstRtpRtxReceive GstRtpRtxReceive;
38 typedef struct _GstRtpRtxReceiveClass GstRtpRtxReceiveClass;
40 struct _GstRtpRtxReceive
48 /* retrieve associated master stream from rtx stream
49 * it also works to retrieve rtx stream from master stream
50 * as we make sure all ssrc are unique */
51 GHashTable *ssrc2_ssrc1_map;
53 /* contains seqnum of request packets of whom their ssrc have
54 * not been associated to a rtx stream yet */
55 GHashTable *seqnum_ssrc1_map;
57 /* rtx pt (uint) -> origin pt (uint) */
58 GHashTable *rtx_pt_map;
59 /* origin pt (string) -> rtx pt (uint) */
60 GstStructure *rtx_pt_map_structure;
63 guint num_rtx_requests;
64 guint num_rtx_packets;
65 guint num_rtx_assoc_packets;
67 GstClockTime last_time;
70 struct _GstRtpRtxReceiveClass
72 GstElementClass parent_class;
76 GType gst_rtp_rtx_receive_get_type (void);
77 gboolean gst_rtp_rtx_receive_plugin_init (GstPlugin * plugin);
80 #endif /* __GST_RTP_RTX_RECEIVE_H__ */