2 * Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com>
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.
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.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __GST_SDP_DEMUX_H__
21 #define __GST_SDP_DEMUX_H__
24 #include <gst/base/gstadapter.h>
28 #define GST_TYPE_SDP_DEMUX \
29 (gst_sdp_demux_get_type())
30 #define GST_SDP_DEMUX(obj) \
31 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SDP_DEMUX,GstSDPDemux))
32 #define GST_SDP_DEMUX_CLASS(klass) \
33 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SDP_DEMUX,GstSDPDemuxClass))
34 #define GST_IS_SDP_DEMUX(obj) \
35 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SDP_DEMUX))
36 #define GST_IS_SDP_DEMUX_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SDP_DEMUX))
38 #define GST_SDP_DEMUX_CAST(obj) \
39 ((GstSDPDemux *)(obj))
41 typedef struct _GstSDPDemux GstSDPDemux;
42 typedef struct _GstSDPDemuxClass GstSDPDemuxClass;
44 #define GST_SDP_STREAM_GET_LOCK(sdp) (GST_SDP_DEMUX_CAST(sdp)->stream_rec_lock)
45 #define GST_SDP_STREAM_LOCK(sdp) (g_static_rec_mutex_lock (GST_SDP_STREAM_GET_LOCK(sdp)))
46 #define GST_SDP_STREAM_UNLOCK(sdp) (g_static_rec_mutex_unlock (GST_SDP_STREAM_GET_LOCK(sdp)))
48 typedef struct _GstSDPStream GstSDPStream;
50 struct _GstSDPStream {
53 GstSDPDemux *parent; /* parent, no extra ref to parent is taken */
55 /* pad we expose or NULL when it does not have an actual pad */
57 GstFlowReturn last_ret;
64 GstElement *udpsrc[2];
65 GstPad *channelpad[2];
73 /* our udp sink back to the server */
89 /* task for UDP loop */
90 gboolean ignore_timeout;
93 GStaticRecMutex *stream_rec_lock;
102 /* session management */
104 gulong session_sig_id;
105 gulong session_ptmap_id;
106 gulong session_nmp_id;
109 struct _GstSDPDemuxClass {
110 GstBinClass parent_class;
113 GType gst_sdp_demux_get_type(void);
117 #endif /* __GST_SDP_DEMUX_H__ */