blob: 578e489fad45194e7cd24ea373f821287e239acf [file] [log] [blame]
Wim Taymansf0d1ab12007-04-03 09:13:17 +00001/* GStreamer
Wim Taymans49e501a2007-12-10 15:34:19 +00002 * Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com>
Wim Taymansf0d1ab12007-04-03 09:13:17 +00003 *
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.
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 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
Tim-Philipp Müller230cf412012-11-04 00:07:18 +000016 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
Wim Taymansf0d1ab12007-04-03 09:13:17 +000018 */
19
20#ifndef __GST_RTP_PT_DEMUX_H__
21#define __GST_RTP_PT_DEMUX_H__
22
23#include <gst/gst.h>
24
25#define GST_TYPE_RTP_PT_DEMUX (gst_rtp_pt_demux_get_type())
Tim-Philipp Müller10d6ba42007-08-23 21:39:58 +000026#define GST_RTP_PT_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_PT_DEMUX,GstRtpPtDemux))
27#define GST_RTP_PT_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_PT_DEMUX,GstRtpPtDemuxClass))
Wim Taymansf0d1ab12007-04-03 09:13:17 +000028#define GST_IS_RTP_PT_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_PT_DEMUX))
29#define GST_IS_RTP_PT_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_PT_DEMUX))
30
Tim-Philipp Müller10d6ba42007-08-23 21:39:58 +000031typedef struct _GstRtpPtDemux GstRtpPtDemux;
32typedef struct _GstRtpPtDemuxClass GstRtpPtDemuxClass;
33typedef struct _GstRtpPtDemuxPad GstRtpPtDemuxPad;
Wim Taymansf0d1ab12007-04-03 09:13:17 +000034
Tim-Philipp Müller10d6ba42007-08-23 21:39:58 +000035struct _GstRtpPtDemux
Wim Taymansf0d1ab12007-04-03 09:13:17 +000036{
37 GstElement parent; /**< parent class */
38
39 GstPad *sink; /**< the sink pad */
40 guint16 last_pt; /**< pt of the last packet 0xFFFF if none */
Tim-Philipp Müller10d6ba42007-08-23 21:39:58 +000041 GSList *srcpads; /**< a linked list of GstRtpPtDemuxPad objects */
Mathieu Duponchelle82d09502017-11-28 01:11:54 +010042 GValue ignored_pts; /**< a GstValueArray of payload types that will not have pads created for */
Wim Taymansf0d1ab12007-04-03 09:13:17 +000043};
44
Tim-Philipp Müller10d6ba42007-08-23 21:39:58 +000045struct _GstRtpPtDemuxClass
Wim Taymansf0d1ab12007-04-03 09:13:17 +000046{
47 GstElementClass parent_class;
48
Wim Taymans03bf43d2007-04-11 13:49:54 +000049 /* get the caps for pt */
Tim-Philipp Müller10d6ba42007-08-23 21:39:58 +000050 GstCaps* (*request_pt_map) (GstRtpPtDemux *demux, guint pt);
Wim Taymans03bf43d2007-04-11 13:49:54 +000051
Wim Taymansf0d1ab12007-04-03 09:13:17 +000052 /* signal emmited when a new PT is found from the incoming stream */
Tim-Philipp Müller10d6ba42007-08-23 21:39:58 +000053 void (*new_payload_type) (GstRtpPtDemux *demux, guint pt, GstPad * pad);
Wim Taymansf0d1ab12007-04-03 09:13:17 +000054
55 /* signal emitted when the payload type changes */
Tim-Philipp Müller10d6ba42007-08-23 21:39:58 +000056 void (*payload_type_change) (GstRtpPtDemux *demux, guint pt);
Wim Taymans2a8cfc62007-05-23 13:08:52 +000057
Tim-Philipp Müller10d6ba42007-08-23 21:39:58 +000058 void (*clear_pt_map) (GstRtpPtDemux *demux);
Wim Taymansf0d1ab12007-04-03 09:13:17 +000059};
60
61GType gst_rtp_pt_demux_get_type (void);
62
63#endif /* __GST_RTP_PT_DEMUX_H__ */