mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
Rename all GstRTPFoo structs to GstRtpFoo so that GST_BOILERPLATE registers a GType that's different than the GstRTPF...
Original commit message from CVS: * docs/plugins/gst-plugins-bad-plugins-sections.txt: * docs/plugins/gst-plugins-bad-plugins.hierarchy: * docs/plugins/gst-plugins-bad-plugins.interfaces: * docs/plugins/gst-plugins-bad-plugins.signals: * gst/rtpmanager/gstrtpbin.c: * gst/rtpmanager/gstrtpbin.h: * gst/rtpmanager/gstrtpclient.c: * gst/rtpmanager/gstrtpclient.h: * gst/rtpmanager/gstrtpjitterbuffer.c: * gst/rtpmanager/gstrtpjitterbuffer.h: * gst/rtpmanager/gstrtpptdemux.c: * gst/rtpmanager/gstrtpptdemux.h: * gst/rtpmanager/gstrtpsession.c: * gst/rtpmanager/gstrtpsession.h: * gst/rtpmanager/gstrtpssrcdemux.c: * gst/rtpmanager/gstrtpssrcdemux.h: Rename all GstRTPFoo structs to GstRtpFoo so that GST_BOILERPLATE registers a GType that's different than the GstRTPFoo types that farsight registers (luckily GType names are case sensitive). Should finally fix #430664.
This commit is contained in:
parent
dcc4837a23
commit
3adc3a9878
17 changed files with 431 additions and 399 deletions
23
ChangeLog
23
ChangeLog
|
@ -1,3 +1,26 @@
|
|||
2007-08-23 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* docs/plugins/gst-plugins-bad-plugins-sections.txt:
|
||||
* docs/plugins/gst-plugins-bad-plugins.hierarchy:
|
||||
* docs/plugins/gst-plugins-bad-plugins.interfaces:
|
||||
* docs/plugins/gst-plugins-bad-plugins.signals:
|
||||
* gst/rtpmanager/gstrtpbin.c:
|
||||
* gst/rtpmanager/gstrtpbin.h:
|
||||
* gst/rtpmanager/gstrtpclient.c:
|
||||
* gst/rtpmanager/gstrtpclient.h:
|
||||
* gst/rtpmanager/gstrtpjitterbuffer.c:
|
||||
* gst/rtpmanager/gstrtpjitterbuffer.h:
|
||||
* gst/rtpmanager/gstrtpptdemux.c:
|
||||
* gst/rtpmanager/gstrtpptdemux.h:
|
||||
* gst/rtpmanager/gstrtpsession.c:
|
||||
* gst/rtpmanager/gstrtpsession.h:
|
||||
* gst/rtpmanager/gstrtpssrcdemux.c:
|
||||
* gst/rtpmanager/gstrtpssrcdemux.h:
|
||||
Rename all GstRTPFoo structs to GstRtpFoo so that GST_BOILERPLATE
|
||||
registers a GType that's different than the GstRTPFoo types that
|
||||
farsight registers (luckily GType names are case sensitive). Should
|
||||
finally fix #430664.
|
||||
|
||||
2007-08-23 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* configure.ac:
|
||||
|
|
|
@ -233,10 +233,10 @@ gst_rg_volume_get_type
|
|||
<SECTION>
|
||||
<FILE>element-gstrtpbin</FILE>
|
||||
<TITLE>gstrtpbin</TITLE>
|
||||
GstRTPBin
|
||||
GstRtpBin
|
||||
<SUBSECTION Standard>
|
||||
GstRTPBinPrivate
|
||||
GstRTPBinClass
|
||||
GstRtpBinPrivate
|
||||
GstRtpBinClass
|
||||
GST_RTP_BIN
|
||||
GST_IS_RTP_BIN
|
||||
GST_TYPE_RTP_BIN
|
||||
|
@ -248,10 +248,10 @@ GST_IS_RTP_BIN_CLASS
|
|||
<SECTION>
|
||||
<FILE>element-gstrtpclient</FILE>
|
||||
<TITLE>gstrtpclient</TITLE>
|
||||
GstRTPClient
|
||||
GstRtpClient
|
||||
<SUBSECTION Standard>
|
||||
GstRTPClientClass
|
||||
GstRTPClientPrivate
|
||||
GstRtpClientClass
|
||||
GstRtpClientPrivate
|
||||
GST_RTP_CLIENT
|
||||
GST_IS_RTP_CLIENT
|
||||
GST_TYPE_RTP_CLIENT
|
||||
|
@ -263,10 +263,10 @@ GST_IS_RTP_CLIENT_CLASS
|
|||
<SECTION>
|
||||
<FILE>element-gstrtpjitterbuffer</FILE>
|
||||
<TITLE>gstrtpjitterbuffer</TITLE>
|
||||
GstRTPJitterBuffer
|
||||
GstRtpJitterBuffer
|
||||
<SUBSECTION Standard>
|
||||
GstRTPJitterBufferClass
|
||||
GstRTPJitterBufferPrivate
|
||||
GstRtpJitterBufferClass
|
||||
GstRtpJitterBufferPrivate
|
||||
GST_RTP_JITTER_BUFFER
|
||||
GST_IS_RTP_JITTER_BUFFER
|
||||
GST_TYPE_RTP_JITTER_BUFFER
|
||||
|
@ -278,10 +278,10 @@ GST_IS_RTP_JITTER_BUFFER_CLASS
|
|||
<SECTION>
|
||||
<FILE>element-gstrtpptdemux</FILE>
|
||||
<TITLE>gstrtpptdemux</TITLE>
|
||||
GstRTPPtDemux
|
||||
GstRtpPtDemux
|
||||
<SUBSECTION Standard>
|
||||
GstRTPPtDemuxClass
|
||||
GstRTPPtDemuxPad
|
||||
GstRtpPtDemuxClass
|
||||
GstRtpPtDemuxPad
|
||||
GST_RTP_PT_DEMUX
|
||||
GST_IS_RTP_PT_DEMUX
|
||||
GST_TYPE_RTP_PT_DEMUX
|
||||
|
@ -293,10 +293,10 @@ GST_IS_RTP_PT_DEMUX_CLASS
|
|||
<SECTION>
|
||||
<FILE>element-gstrtpsession</FILE>
|
||||
<TITLE>gstrtpsession</TITLE>
|
||||
GstRTPSession
|
||||
GstRtpSession
|
||||
<SUBSECTION Standard>
|
||||
GstRTPSessionClass
|
||||
GstRTPSessionPrivate
|
||||
GstRtpSessionClass
|
||||
GstRtpSessionPrivate
|
||||
GST_RTP_SESSION
|
||||
GST_IS_RTP_SESSION
|
||||
GST_TYPE_RTP_SESSION
|
||||
|
@ -309,10 +309,10 @@ GST_RTP_SESSION_CAST
|
|||
<SECTION>
|
||||
<FILE>element-gstrtpssrcdemux</FILE>
|
||||
<TITLE>gstrtpssrcdemux</TITLE>
|
||||
GstRTPSsrcDemux
|
||||
GstRtpSsrcDemux
|
||||
<SUBSECTION Standard>
|
||||
GstRTPSsrcDemuxClass
|
||||
GstRTPSsrcDemuxPad
|
||||
GstRtpSsrcDemuxClass
|
||||
GstRtpSsrcDemuxPad
|
||||
GST_RTP_SSRC_DEMUX
|
||||
GST_IS_RTP_SSRC_DEMUX
|
||||
GST_TYPE_RTP_SSRC_DEMUX
|
||||
|
|
|
@ -8,8 +8,8 @@ GObject
|
|||
GstElement
|
||||
GstBin
|
||||
GstPipeline
|
||||
GstRTPBin
|
||||
GstRTPClient
|
||||
GstRtpBin
|
||||
GstRtpClient
|
||||
GstRgVolume
|
||||
GstX264Enc
|
||||
GstXvidEnc
|
||||
|
@ -60,10 +60,10 @@ GObject
|
|||
GstDtsDec
|
||||
GstBz2enc
|
||||
GstBz2dec
|
||||
GstRTPJitterBuffer
|
||||
GstRTPPtDemux
|
||||
GstRTPSession
|
||||
GstRTPSsrcDemux
|
||||
GstRtpJitterBuffer
|
||||
GstRtpPtDemux
|
||||
GstRtpSession
|
||||
GstRtpSsrcDemux
|
||||
GstVMncDec
|
||||
MpegVideoParse
|
||||
GstRealVideoDec
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
GstBin GstChildProxy
|
||||
GstPipeline GstChildProxy
|
||||
GstRTPBin GstChildProxy
|
||||
GstRTPClient GstChildProxy
|
||||
GstRtpBin GstChildProxy
|
||||
GstRtpClient GstChildProxy
|
||||
GstRgVolume GstChildProxy
|
||||
GstSDLVideoSink GstImplementsInterface GstXOverlay GstNavigation
|
||||
GstDfbVideoSink GstImplementsInterface GstNavigation GstColorBalance
|
||||
|
|
|
@ -6,190 +6,190 @@ GstXvidEnc *gstxvidenc
|
|||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPSsrcDemux::new-ssrc-pad</NAME>
|
||||
<NAME>GstRtpSsrcDemux::new-ssrc-pad</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPSsrcDemux *gstrtpssrcdemux
|
||||
GstRtpSsrcDemux *gstrtpssrcdemux
|
||||
guint arg1
|
||||
GstPad *arg2
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPSession::clear-pt-map</NAME>
|
||||
<NAME>GstRtpSession::clear-pt-map</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>a</FLAGS>
|
||||
GstRTPSession *gstrtpsession
|
||||
GstRtpSession *gstrtpsession
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPSession::request-pt-map</NAME>
|
||||
<NAME>GstRtpSession::request-pt-map</NAME>
|
||||
<RETURNS>GstCaps*</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPSession *gstrtpsession
|
||||
GstRtpSession *gstrtpsession
|
||||
guint arg1
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPSession::on-bye-ssrc</NAME>
|
||||
<NAME>GstRtpSession::on-bye-ssrc</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPSession *gstrtpsession
|
||||
GstRtpSession *gstrtpsession
|
||||
guint arg1
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPSession::on-bye-timeout</NAME>
|
||||
<NAME>GstRtpSession::on-bye-timeout</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPSession *gstrtpsession
|
||||
GstRtpSession *gstrtpsession
|
||||
guint arg1
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPSession::on-new-ssrc</NAME>
|
||||
<NAME>GstRtpSession::on-new-ssrc</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPSession *gstrtpsession
|
||||
GstRtpSession *gstrtpsession
|
||||
guint arg1
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPSession::on-ssrc-collision</NAME>
|
||||
<NAME>GstRtpSession::on-ssrc-collision</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPSession *gstrtpsession
|
||||
GstRtpSession *gstrtpsession
|
||||
guint arg1
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPSession::on-ssrc-validated</NAME>
|
||||
<NAME>GstRtpSession::on-ssrc-validated</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPSession *gstrtpsession
|
||||
GstRtpSession *gstrtpsession
|
||||
guint arg1
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPSession::on-timeout</NAME>
|
||||
<NAME>GstRtpSession::on-timeout</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPSession *gstrtpsession
|
||||
GstRtpSession *gstrtpsession
|
||||
guint arg1
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPPtDemux::clear-pt-map</NAME>
|
||||
<NAME>GstRtpPtDemux::clear-pt-map</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>la</FLAGS>
|
||||
GstRTPPtDemux *gstrtpptdemux
|
||||
GstRtpPtDemux *gstrtpptdemux
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPPtDemux::new-payload-type</NAME>
|
||||
<NAME>GstRtpPtDemux::new-payload-type</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPPtDemux *gstrtpptdemux
|
||||
GstRtpPtDemux *gstrtpptdemux
|
||||
guint arg1
|
||||
GstPad *arg2
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPPtDemux::payload-type-change</NAME>
|
||||
<NAME>GstRtpPtDemux::payload-type-change</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPPtDemux *gstrtpptdemux
|
||||
GstRtpPtDemux *gstrtpptdemux
|
||||
guint arg1
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPPtDemux::request-pt-map</NAME>
|
||||
<NAME>GstRtpPtDemux::request-pt-map</NAME>
|
||||
<RETURNS>GstCaps*</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPPtDemux *gstrtpptdemux
|
||||
GstRtpPtDemux *gstrtpptdemux
|
||||
guint arg1
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPJitterBuffer::clear-pt-map</NAME>
|
||||
<NAME>GstRtpJitterBuffer::clear-pt-map</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPJitterBuffer *gstrtpjitterbuffer
|
||||
GstRtpJitterBuffer *gstrtpjitterbuffer
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPJitterBuffer::request-pt-map</NAME>
|
||||
<NAME>GstRtpJitterBuffer::request-pt-map</NAME>
|
||||
<RETURNS>GstCaps*</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPJitterBuffer *gstrtpjitterbuffer
|
||||
GstRtpJitterBuffer *gstrtpjitterbuffer
|
||||
guint arg1
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPBin::clear-pt-map</NAME>
|
||||
<NAME>GstRtpBin::clear-pt-map</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>a</FLAGS>
|
||||
GstRTPBin *gstrtpbin
|
||||
GstRtpBin *gstrtpbin
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPBin::request-pt-map</NAME>
|
||||
<NAME>GstRtpBin::request-pt-map</NAME>
|
||||
<RETURNS>GstCaps*</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPBin *gstrtpbin
|
||||
GstRtpBin *gstrtpbin
|
||||
guint arg1
|
||||
guint arg2
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPBin::on-bye-ssrc</NAME>
|
||||
<NAME>GstRtpBin::on-bye-ssrc</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPBin *gstrtpbin
|
||||
GstRtpBin *gstrtpbin
|
||||
guint arg1
|
||||
guint arg2
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPBin::on-bye-timeout</NAME>
|
||||
<NAME>GstRtpBin::on-bye-timeout</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPBin *gstrtpbin
|
||||
GstRtpBin *gstrtpbin
|
||||
guint arg1
|
||||
guint arg2
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPBin::on-new-ssrc</NAME>
|
||||
<NAME>GstRtpBin::on-new-ssrc</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPBin *gstrtpbin
|
||||
GstRtpBin *gstrtpbin
|
||||
guint arg1
|
||||
guint arg2
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPBin::on-ssrc-collision</NAME>
|
||||
<NAME>GstRtpBin::on-ssrc-collision</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPBin *gstrtpbin
|
||||
GstRtpBin *gstrtpbin
|
||||
guint arg1
|
||||
guint arg2
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPBin::on-ssrc-validated</NAME>
|
||||
<NAME>GstRtpBin::on-ssrc-validated</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPBin *gstrtpbin
|
||||
GstRtpBin *gstrtpbin
|
||||
guint arg1
|
||||
guint arg2
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>GstRTPBin::on-timeout</NAME>
|
||||
<NAME>GstRtpBin::on-timeout</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
GstRTPBin *gstrtpbin
|
||||
GstRtpBin *gstrtpbin
|
||||
guint arg1
|
||||
guint arg2
|
||||
</SIGNAL>
|
||||
|
@ -202,3 +202,12 @@ GstCDAudio *gstcdaudio
|
|||
gint arg1
|
||||
</SIGNAL>
|
||||
|
||||
<SIGNAL>
|
||||
<NAME>MpegTSParse::pmt-info</NAME>
|
||||
<RETURNS>void</RETURNS>
|
||||
<FLAGS>l</FLAGS>
|
||||
MpegTSParse *mpegtsparse
|
||||
gint arg1
|
||||
MpegTSPmtInfo *arg2
|
||||
</SIGNAL>
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@
|
|||
* </para>
|
||||
* <para>
|
||||
* The session manager needs the clock-rate of the payload types it is handling
|
||||
* and will signal the GstRTPSession::request-pt-map signal when it needs such a
|
||||
* mapping. One can clear the cached values with the GstRTPSession::clear-pt-map
|
||||
* and will signal the GstRtpSession::request-pt-map signal when it needs such a
|
||||
* mapping. One can clear the cached values with the GstRtpSession::clear-pt-map
|
||||
* signal.
|
||||
* </para>
|
||||
* <title>Example pipelines</title>
|
||||
|
@ -143,12 +143,12 @@ GST_STATIC_PAD_TEMPLATE ("send_rtp_src_%d",
|
|||
);
|
||||
|
||||
#define GST_RTP_BIN_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_RTP_BIN, GstRTPBinPrivate))
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_RTP_BIN, GstRtpBinPrivate))
|
||||
|
||||
#define GST_RTP_BIN_LOCK(bin) g_mutex_lock ((bin)->priv->bin_lock)
|
||||
#define GST_RTP_BIN_UNLOCK(bin) g_mutex_unlock ((bin)->priv->bin_lock)
|
||||
|
||||
struct _GstRTPBinPrivate
|
||||
struct _GstRtpBinPrivate
|
||||
{
|
||||
GMutex *bin_lock;
|
||||
};
|
||||
|
@ -177,30 +177,30 @@ enum
|
|||
};
|
||||
|
||||
/* helper objects */
|
||||
typedef struct _GstRTPBinSession GstRTPBinSession;
|
||||
typedef struct _GstRTPBinStream GstRTPBinStream;
|
||||
typedef struct _GstRTPBinClient GstRTPBinClient;
|
||||
typedef struct _GstRtpBinSession GstRtpBinSession;
|
||||
typedef struct _GstRtpBinStream GstRtpBinStream;
|
||||
typedef struct _GstRtpBinClient GstRtpBinClient;
|
||||
|
||||
static guint gst_rtp_bin_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static GstCaps *pt_map_requested (GstElement * element, guint pt,
|
||||
GstRTPBinSession * session);
|
||||
GstRtpBinSession * session);
|
||||
|
||||
/* Manages the RTP stream for one SSRC.
|
||||
*
|
||||
* We pipe the stream (comming from the SSRC demuxer) into a jitterbuffer.
|
||||
* If we see an SDES RTCP packet that links multiple SSRCs together based on a
|
||||
* common CNAME, we create a GstRTPBinClient structure to group the SSRCs
|
||||
* common CNAME, we create a GstRtpBinClient structure to group the SSRCs
|
||||
* together (see below).
|
||||
*/
|
||||
struct _GstRTPBinStream
|
||||
struct _GstRtpBinStream
|
||||
{
|
||||
/* the SSRC of this stream */
|
||||
guint32 ssrc;
|
||||
/* parent bin */
|
||||
GstRTPBin *bin;
|
||||
GstRtpBin *bin;
|
||||
/* the session this SSRC belongs to */
|
||||
GstRTPBinSession *session;
|
||||
GstRtpBinSession *session;
|
||||
/* the jitterbuffer of the SSRC */
|
||||
GstElement *buffer;
|
||||
/* the PT demuxer of the SSRC */
|
||||
|
@ -218,14 +218,14 @@ struct _GstRTPBinStream
|
|||
* We get the RTP/RTCP packets and stuff them into the session manager. From
|
||||
* there they are pushed into an SSRC demuxer that splits the stream based on
|
||||
* SSRC. Each of the SSRC streams go into their own jitterbuffer (managed with
|
||||
* the GstRTPBinStream above).
|
||||
* the GstRtpBinStream above).
|
||||
*/
|
||||
struct _GstRTPBinSession
|
||||
struct _GstRtpBinSession
|
||||
{
|
||||
/* session id */
|
||||
gint id;
|
||||
/* the parent bin */
|
||||
GstRTPBin *bin;
|
||||
GstRtpBin *bin;
|
||||
/* the session element */
|
||||
GstElement *session;
|
||||
/* the SSRC demuxer */
|
||||
|
@ -234,7 +234,7 @@ struct _GstRTPBinSession
|
|||
|
||||
GMutex *lock;
|
||||
|
||||
/* list of GstRTPBinStream */
|
||||
/* list of GstRtpBinStream */
|
||||
GSList *streams;
|
||||
|
||||
/* mapping of payload type to caps */
|
||||
|
@ -251,13 +251,13 @@ struct _GstRTPBinSession
|
|||
};
|
||||
|
||||
/* find a session with the given id. Must be called with RTP_BIN_LOCK */
|
||||
static GstRTPBinSession *
|
||||
find_session_by_id (GstRTPBin * rtpbin, gint id)
|
||||
static GstRtpBinSession *
|
||||
find_session_by_id (GstRtpBin * rtpbin, gint id)
|
||||
{
|
||||
GSList *walk;
|
||||
|
||||
for (walk = rtpbin->sessions; walk; walk = g_slist_next (walk)) {
|
||||
GstRTPBinSession *sess = (GstRTPBinSession *) walk->data;
|
||||
GstRtpBinSession *sess = (GstRtpBinSession *) walk->data;
|
||||
|
||||
if (sess->id == id)
|
||||
return sess;
|
||||
|
@ -266,52 +266,52 @@ find_session_by_id (GstRTPBin * rtpbin, gint id)
|
|||
}
|
||||
|
||||
static void
|
||||
on_new_ssrc (GstElement * session, guint32 ssrc, GstRTPBinSession * sess)
|
||||
on_new_ssrc (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
||||
{
|
||||
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_NEW_SSRC], 0,
|
||||
sess->id, ssrc);
|
||||
}
|
||||
|
||||
static void
|
||||
on_ssrc_collision (GstElement * session, guint32 ssrc, GstRTPBinSession * sess)
|
||||
on_ssrc_collision (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
||||
{
|
||||
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_SSRC_COLLISION], 0,
|
||||
sess->id, ssrc);
|
||||
}
|
||||
|
||||
static void
|
||||
on_ssrc_validated (GstElement * session, guint32 ssrc, GstRTPBinSession * sess)
|
||||
on_ssrc_validated (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
||||
{
|
||||
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_SSRC_VALIDATED], 0,
|
||||
sess->id, ssrc);
|
||||
}
|
||||
|
||||
static void
|
||||
on_bye_ssrc (GstElement * session, guint32 ssrc, GstRTPBinSession * sess)
|
||||
on_bye_ssrc (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
||||
{
|
||||
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_BYE_SSRC], 0,
|
||||
sess->id, ssrc);
|
||||
}
|
||||
|
||||
static void
|
||||
on_bye_timeout (GstElement * session, guint32 ssrc, GstRTPBinSession * sess)
|
||||
on_bye_timeout (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
||||
{
|
||||
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_BYE_TIMEOUT], 0,
|
||||
sess->id, ssrc);
|
||||
}
|
||||
|
||||
static void
|
||||
on_timeout (GstElement * session, guint32 ssrc, GstRTPBinSession * sess)
|
||||
on_timeout (GstElement * session, guint32 ssrc, GstRtpBinSession * sess)
|
||||
{
|
||||
g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_TIMEOUT], 0,
|
||||
sess->id, ssrc);
|
||||
}
|
||||
|
||||
/* create a session with the given id. Must be called with RTP_BIN_LOCK */
|
||||
static GstRTPBinSession *
|
||||
create_session (GstRTPBin * rtpbin, gint id)
|
||||
static GstRtpBinSession *
|
||||
create_session (GstRtpBin * rtpbin, gint id)
|
||||
{
|
||||
GstRTPBinSession *sess;
|
||||
GstRtpBinSession *sess;
|
||||
GstElement *session, *demux;
|
||||
|
||||
if (!(session = gst_element_factory_make ("gstrtpsession", NULL)))
|
||||
|
@ -320,7 +320,7 @@ create_session (GstRTPBin * rtpbin, gint id)
|
|||
if (!(demux = gst_element_factory_make ("gstrtpssrcdemux", NULL)))
|
||||
goto no_demux;
|
||||
|
||||
sess = g_new0 (GstRTPBinSession, 1);
|
||||
sess = g_new0 (GstRtpBinSession, 1);
|
||||
sess->lock = g_mutex_new ();
|
||||
sess->id = id;
|
||||
sess->bin = rtpbin;
|
||||
|
@ -367,13 +367,13 @@ no_demux:
|
|||
}
|
||||
|
||||
#if 0
|
||||
static GstRTPBinStream *
|
||||
find_stream_by_ssrc (GstRTPBinSession * session, guint32 ssrc)
|
||||
static GstRtpBinStream *
|
||||
find_stream_by_ssrc (GstRtpBinSession * session, guint32 ssrc)
|
||||
{
|
||||
GSList *walk;
|
||||
|
||||
for (walk = session->streams; walk; walk = g_slist_next (walk)) {
|
||||
GstRTPBinStream *stream = (GstRTPBinStream *) walk->data;
|
||||
GstRtpBinStream *stream = (GstRtpBinStream *) walk->data;
|
||||
|
||||
if (stream->ssrc == ssrc)
|
||||
return stream;
|
||||
|
@ -384,10 +384,10 @@ find_stream_by_ssrc (GstRTPBinSession * session, guint32 ssrc)
|
|||
|
||||
/* get the payload type caps for the specific payload @pt in @session */
|
||||
static GstCaps *
|
||||
get_pt_map (GstRTPBinSession * session, guint pt)
|
||||
get_pt_map (GstRtpBinSession * session, guint pt)
|
||||
{
|
||||
GstCaps *caps = NULL;
|
||||
GstRTPBin *bin;
|
||||
GstRtpBin *bin;
|
||||
GValue ret = { 0 };
|
||||
GValue args[3] = { {0}, {0}, {0} };
|
||||
|
||||
|
@ -447,13 +447,13 @@ return_true (gpointer key, gpointer value, gpointer user_data)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_bin_clear_pt_map (GstRTPBin * bin)
|
||||
gst_rtp_bin_clear_pt_map (GstRtpBin * bin)
|
||||
{
|
||||
GSList *walk;
|
||||
|
||||
GST_RTP_BIN_LOCK (bin);
|
||||
for (walk = bin->sessions; walk; walk = g_slist_next (walk)) {
|
||||
GstRTPBinSession *session = (GstRTPBinSession *) walk->data;
|
||||
GstRtpBinSession *session = (GstRtpBinSession *) walk->data;
|
||||
|
||||
GST_RTP_SESSION_LOCK (session);
|
||||
#if 0
|
||||
|
@ -469,11 +469,11 @@ gst_rtp_bin_clear_pt_map (GstRTPBin * bin)
|
|||
|
||||
/* create a new stream with @ssrc in @session. Must be called with
|
||||
* RTP_SESSION_LOCK. */
|
||||
static GstRTPBinStream *
|
||||
create_stream (GstRTPBinSession * session, guint32 ssrc)
|
||||
static GstRtpBinStream *
|
||||
create_stream (GstRtpBinSession * session, guint32 ssrc)
|
||||
{
|
||||
GstElement *buffer, *demux;
|
||||
GstRTPBinStream *stream;
|
||||
GstRtpBinStream *stream;
|
||||
|
||||
if (!(buffer = gst_element_factory_make ("gstrtpjitterbuffer", NULL)))
|
||||
goto no_jitterbuffer;
|
||||
|
@ -481,7 +481,7 @@ create_stream (GstRTPBinSession * session, guint32 ssrc)
|
|||
if (!(demux = gst_element_factory_make ("gstrtpptdemux", NULL)))
|
||||
goto no_demux;
|
||||
|
||||
stream = g_new0 (GstRTPBinStream, 1);
|
||||
stream = g_new0 (GstRtpBinStream, 1);
|
||||
stream->ssrc = ssrc;
|
||||
stream->bin = session->bin;
|
||||
stream->session = session;
|
||||
|
@ -523,7 +523,7 @@ no_demux:
|
|||
/* Manages the RTP streams that come from one client and should therefore be
|
||||
* synchronized.
|
||||
*/
|
||||
struct _GstRTPBinClient
|
||||
struct _GstRtpBinClient
|
||||
{
|
||||
/* the common CNAME for the streams */
|
||||
gchar *cname;
|
||||
|
@ -545,9 +545,9 @@ static GstStateChangeReturn gst_rtp_bin_change_state (GstElement * element,
|
|||
static GstPad *gst_rtp_bin_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name);
|
||||
static void gst_rtp_bin_release_pad (GstElement * element, GstPad * pad);
|
||||
static void gst_rtp_bin_clear_pt_map (GstRTPBin * bin);
|
||||
static void gst_rtp_bin_clear_pt_map (GstRtpBin * bin);
|
||||
|
||||
GST_BOILERPLATE (GstRTPBin, gst_rtp_bin, GstBin, GST_TYPE_BIN);
|
||||
GST_BOILERPLATE (GstRtpBin, gst_rtp_bin, GstBin, GST_TYPE_BIN);
|
||||
|
||||
static void
|
||||
gst_rtp_bin_base_init (gpointer klass)
|
||||
|
@ -574,7 +574,7 @@ gst_rtp_bin_base_init (gpointer klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_bin_class_init (GstRTPBinClass * klass)
|
||||
gst_rtp_bin_class_init (GstRtpBinClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GstElementClass *gstelement_class;
|
||||
|
@ -582,7 +582,7 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass)
|
|||
gobject_class = (GObjectClass *) klass;
|
||||
gstelement_class = (GstElementClass *) klass;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GstRTPBinPrivate));
|
||||
g_type_class_add_private (klass, sizeof (GstRtpBinPrivate));
|
||||
|
||||
gobject_class->finalize = gst_rtp_bin_finalize;
|
||||
gobject_class->set_property = gst_rtp_bin_set_property;
|
||||
|
@ -594,7 +594,7 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass)
|
|||
G_MAXUINT, DEFAULT_LATENCY_MS, G_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GstRTPBin::request-pt-map:
|
||||
* GstRtpBin::request-pt-map:
|
||||
* @rtpbin: the object which received the signal
|
||||
* @session: the session
|
||||
* @pt: the pt
|
||||
|
@ -603,23 +603,23 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass)
|
|||
*/
|
||||
gst_rtp_bin_signals[SIGNAL_REQUEST_PT_MAP] =
|
||||
g_signal_new ("request-pt-map", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPBinClass, request_pt_map),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, request_pt_map),
|
||||
NULL, NULL, gst_rtp_bin_marshal_BOXED__UINT_UINT, GST_TYPE_CAPS, 2,
|
||||
G_TYPE_UINT, G_TYPE_UINT);
|
||||
/**
|
||||
* GstRTPBin::clear-pt-map:
|
||||
* GstRtpBin::clear-pt-map:
|
||||
* @rtpbin: the object which received the signal
|
||||
*
|
||||
* Clear all previously cached pt-mapping obtained with
|
||||
* GstRTPBin::request-pt-map.
|
||||
* GstRtpBin::request-pt-map.
|
||||
*/
|
||||
gst_rtp_bin_signals[SIGNAL_CLEAR_PT_MAP] =
|
||||
g_signal_new ("clear-pt-map", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRTPBinClass, clear_pt_map),
|
||||
G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpBinClass, clear_pt_map),
|
||||
NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE);
|
||||
|
||||
/**
|
||||
* GstRTPBin::on-new-ssrc:
|
||||
* GstRtpBin::on-new-ssrc:
|
||||
* @rtpbin: the object which received the signal
|
||||
* @session: the session
|
||||
* @ssrc: the SSRC
|
||||
|
@ -628,11 +628,11 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass)
|
|||
*/
|
||||
gst_rtp_bin_signals[SIGNAL_ON_NEW_SSRC] =
|
||||
g_signal_new ("on-new-ssrc", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPBinClass, on_new_ssrc),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_new_ssrc),
|
||||
NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2,
|
||||
G_TYPE_UINT, G_TYPE_UINT);
|
||||
/**
|
||||
* GstRTPBin::on-ssrc_collision:
|
||||
* GstRtpBin::on-ssrc_collision:
|
||||
* @rtpbin: the object which received the signal
|
||||
* @session: the session
|
||||
* @ssrc: the SSRC
|
||||
|
@ -641,11 +641,11 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass)
|
|||
*/
|
||||
gst_rtp_bin_signals[SIGNAL_ON_SSRC_COLLISION] =
|
||||
g_signal_new ("on-ssrc-collision", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPBinClass, on_ssrc_collision),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_ssrc_collision),
|
||||
NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2,
|
||||
G_TYPE_UINT, G_TYPE_UINT);
|
||||
/**
|
||||
* GstRTPBin::on-ssrc_validated:
|
||||
* GstRtpBin::on-ssrc_validated:
|
||||
* @rtpbin: the object which received the signal
|
||||
* @session: the session
|
||||
* @ssrc: the SSRC
|
||||
|
@ -654,12 +654,12 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass)
|
|||
*/
|
||||
gst_rtp_bin_signals[SIGNAL_ON_SSRC_VALIDATED] =
|
||||
g_signal_new ("on-ssrc-validated", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPBinClass, on_ssrc_validated),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_ssrc_validated),
|
||||
NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2,
|
||||
G_TYPE_UINT, G_TYPE_UINT);
|
||||
|
||||
/**
|
||||
* GstRTPBin::on-bye-ssrc:
|
||||
* GstRtpBin::on-bye-ssrc:
|
||||
* @rtpbin: the object which received the signal
|
||||
* @session: the session
|
||||
* @ssrc: the SSRC
|
||||
|
@ -668,11 +668,11 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass)
|
|||
*/
|
||||
gst_rtp_bin_signals[SIGNAL_ON_BYE_SSRC] =
|
||||
g_signal_new ("on-bye-ssrc", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPBinClass, on_bye_ssrc),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_bye_ssrc),
|
||||
NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2,
|
||||
G_TYPE_UINT, G_TYPE_UINT);
|
||||
/**
|
||||
* GstRTPBin::on-bye-timeout:
|
||||
* GstRtpBin::on-bye-timeout:
|
||||
* @rtpbin: the object which received the signal
|
||||
* @session: the session
|
||||
* @ssrc: the SSRC
|
||||
|
@ -681,11 +681,11 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass)
|
|||
*/
|
||||
gst_rtp_bin_signals[SIGNAL_ON_BYE_TIMEOUT] =
|
||||
g_signal_new ("on-bye-timeout", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPBinClass, on_bye_timeout),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_bye_timeout),
|
||||
NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2,
|
||||
G_TYPE_UINT, G_TYPE_UINT);
|
||||
/**
|
||||
* GstRTPBin::on-timeout:
|
||||
* GstRtpBin::on-timeout:
|
||||
* @rtpbin: the object which received the signal
|
||||
* @session: the session
|
||||
* @ssrc: the SSRC
|
||||
|
@ -694,7 +694,7 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass)
|
|||
*/
|
||||
gst_rtp_bin_signals[SIGNAL_ON_TIMEOUT] =
|
||||
g_signal_new ("on-timeout", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPBinClass, on_timeout),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_timeout),
|
||||
NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2,
|
||||
G_TYPE_UINT, G_TYPE_UINT);
|
||||
|
||||
|
@ -711,7 +711,7 @@ gst_rtp_bin_class_init (GstRTPBinClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_bin_init (GstRTPBin * rtpbin, GstRTPBinClass * klass)
|
||||
gst_rtp_bin_init (GstRtpBin * rtpbin, GstRtpBinClass * klass)
|
||||
{
|
||||
rtpbin->priv = GST_RTP_BIN_GET_PRIVATE (rtpbin);
|
||||
rtpbin->priv->bin_lock = g_mutex_new ();
|
||||
|
@ -721,7 +721,7 @@ gst_rtp_bin_init (GstRTPBin * rtpbin, GstRTPBinClass * klass)
|
|||
static void
|
||||
gst_rtp_bin_finalize (GObject * object)
|
||||
{
|
||||
GstRTPBin *rtpbin;
|
||||
GstRtpBin *rtpbin;
|
||||
|
||||
rtpbin = GST_RTP_BIN (object);
|
||||
|
||||
|
@ -734,7 +734,7 @@ static void
|
|||
gst_rtp_bin_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstRTPBin *rtpbin;
|
||||
GstRtpBin *rtpbin;
|
||||
|
||||
rtpbin = GST_RTP_BIN (object);
|
||||
|
||||
|
@ -752,7 +752,7 @@ static void
|
|||
gst_rtp_bin_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstRTPBin *rtpbin;
|
||||
GstRtpBin *rtpbin;
|
||||
|
||||
rtpbin = GST_RTP_BIN (object);
|
||||
|
||||
|
@ -769,7 +769,7 @@ gst_rtp_bin_get_property (GObject * object, guint prop_id,
|
|||
static GstClock *
|
||||
gst_rtp_bin_provide_clock (GstElement * element)
|
||||
{
|
||||
GstRTPBin *rtpbin;
|
||||
GstRtpBin *rtpbin;
|
||||
|
||||
rtpbin = GST_RTP_BIN (element);
|
||||
|
||||
|
@ -780,7 +780,7 @@ static GstStateChangeReturn
|
|||
gst_rtp_bin_change_state (GstElement * element, GstStateChange transition)
|
||||
{
|
||||
GstStateChangeReturn res;
|
||||
GstRTPBin *rtpbin;
|
||||
GstRtpBin *rtpbin;
|
||||
|
||||
rtpbin = GST_RTP_BIN (element);
|
||||
|
||||
|
@ -813,9 +813,9 @@ gst_rtp_bin_change_state (GstElement * element, GstStateChange transition)
|
|||
/* a new pad (SSRC) was created in @session */
|
||||
static void
|
||||
new_payload_found (GstElement * element, guint pt, GstPad * pad,
|
||||
GstRTPBinStream * stream)
|
||||
GstRtpBinStream * stream)
|
||||
{
|
||||
GstRTPBin *rtpbin;
|
||||
GstRtpBin *rtpbin;
|
||||
GstElementClass *klass;
|
||||
GstPadTemplate *templ;
|
||||
gchar *padname;
|
||||
|
@ -838,9 +838,9 @@ new_payload_found (GstElement * element, guint pt, GstPad * pad,
|
|||
}
|
||||
|
||||
static GstCaps *
|
||||
pt_map_requested (GstElement * element, guint pt, GstRTPBinSession * session)
|
||||
pt_map_requested (GstElement * element, guint pt, GstRtpBinSession * session)
|
||||
{
|
||||
GstRTPBin *rtpbin;
|
||||
GstRtpBin *rtpbin;
|
||||
GstCaps *caps;
|
||||
|
||||
rtpbin = session->bin;
|
||||
|
@ -865,9 +865,9 @@ no_caps:
|
|||
/* a new pad (SSRC) was created in @session */
|
||||
static void
|
||||
new_ssrc_pad_found (GstElement * element, guint ssrc, GstPad * pad,
|
||||
GstRTPBinSession * session)
|
||||
GstRtpBinSession * session)
|
||||
{
|
||||
GstRTPBinStream *stream;
|
||||
GstRtpBinStream *stream;
|
||||
GstPad *sinkpad;
|
||||
|
||||
GST_DEBUG_OBJECT (session->bin, "new SSRC pad %08x", ssrc);
|
||||
|
@ -912,11 +912,11 @@ no_stream:
|
|||
* RTP_BIN_LOCK.
|
||||
*/
|
||||
static GstPad *
|
||||
create_recv_rtp (GstRTPBin * rtpbin, GstPadTemplate * templ, const gchar * name)
|
||||
create_recv_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
|
||||
{
|
||||
GstPad *result, *sinkdpad;
|
||||
guint sessid;
|
||||
GstRTPBinSession *session;
|
||||
GstRtpBinSession *session;
|
||||
GstPadLinkReturn lres;
|
||||
|
||||
/* first get the session number */
|
||||
|
@ -1005,12 +1005,12 @@ link_failed:
|
|||
* RTP_BIN_LOCK.
|
||||
*/
|
||||
static GstPad *
|
||||
create_recv_rtcp (GstRTPBin * rtpbin, GstPadTemplate * templ,
|
||||
create_recv_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ,
|
||||
const gchar * name)
|
||||
{
|
||||
GstPad *result;
|
||||
guint sessid;
|
||||
GstRTPBinSession *session;
|
||||
GstRtpBinSession *session;
|
||||
|
||||
#if 0
|
||||
GstPad *sinkdpad;
|
||||
|
@ -1103,12 +1103,12 @@ link_failed:
|
|||
* RTP_BIN_LOCK.
|
||||
*/
|
||||
static GstPad *
|
||||
create_send_rtp (GstRTPBin * rtpbin, GstPadTemplate * templ, const gchar * name)
|
||||
create_send_rtp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
|
||||
{
|
||||
GstPad *result, *srcghost;
|
||||
gchar *gname;
|
||||
guint sessid;
|
||||
GstRTPBinSession *session;
|
||||
GstRtpBinSession *session;
|
||||
GstElementClass *klass;
|
||||
|
||||
/* first get the session number */
|
||||
|
@ -1191,11 +1191,11 @@ no_srcpad:
|
|||
* RTP_BIN_LOCK.
|
||||
*/
|
||||
static GstPad *
|
||||
create_rtcp (GstRTPBin * rtpbin, GstPadTemplate * templ, const gchar * name)
|
||||
create_rtcp (GstRtpBin * rtpbin, GstPadTemplate * templ, const gchar * name)
|
||||
{
|
||||
GstPad *result;
|
||||
guint sessid;
|
||||
GstRTPBinSession *session;
|
||||
GstRtpBinSession *session;
|
||||
|
||||
/* first get the session number */
|
||||
if (name == NULL || sscanf (name, "send_rtcp_src_%d", &sessid) != 1)
|
||||
|
@ -1253,7 +1253,7 @@ static GstPad *
|
|||
gst_rtp_bin_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name)
|
||||
{
|
||||
GstRTPBin *rtpbin;
|
||||
GstRtpBin *rtpbin;
|
||||
GstElementClass *klass;
|
||||
GstPad *result;
|
||||
|
||||
|
|
|
@ -25,19 +25,19 @@
|
|||
#define GST_TYPE_RTP_BIN \
|
||||
(gst_rtp_bin_get_type())
|
||||
#define GST_RTP_BIN(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_BIN,GstRTPBin))
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_BIN,GstRtpBin))
|
||||
#define GST_RTP_BIN_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_BIN,GstRTPBinClass))
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_BIN,GstRtpBinClass))
|
||||
#define GST_IS_RTP_BIN(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_BIN))
|
||||
#define GST_IS_RTP_BIN_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_BIN))
|
||||
|
||||
typedef struct _GstRTPBin GstRTPBin;
|
||||
typedef struct _GstRTPBinClass GstRTPBinClass;
|
||||
typedef struct _GstRTPBinPrivate GstRTPBinPrivate;
|
||||
typedef struct _GstRtpBin GstRtpBin;
|
||||
typedef struct _GstRtpBinClass GstRtpBinClass;
|
||||
typedef struct _GstRtpBinPrivate GstRtpBinPrivate;
|
||||
|
||||
struct _GstRTPBin {
|
||||
struct _GstRtpBin {
|
||||
GstBin bin;
|
||||
|
||||
/*< private >*/
|
||||
|
@ -49,22 +49,22 @@ struct _GstRTPBin {
|
|||
GstClock *provided_clock;
|
||||
|
||||
/*< private >*/
|
||||
GstRTPBinPrivate *priv;
|
||||
GstRtpBinPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GstRTPBinClass {
|
||||
struct _GstRtpBinClass {
|
||||
GstBinClass parent_class;
|
||||
|
||||
/* get the caps for pt */
|
||||
GstCaps* (*request_pt_map) (GstRTPBin *rtpbin, guint session, guint pt);
|
||||
void (*clear_pt_map) (GstRTPBin *rtpbin);
|
||||
GstCaps* (*request_pt_map) (GstRtpBin *rtpbin, guint session, guint pt);
|
||||
void (*clear_pt_map) (GstRtpBin *rtpbin);
|
||||
|
||||
void (*on_new_ssrc) (GstRTPBin *rtpbin, guint session, guint32 ssrc);
|
||||
void (*on_ssrc_collision) (GstRTPBin *rtpbin, guint session, guint32 ssrc);
|
||||
void (*on_ssrc_validated) (GstRTPBin *rtpbin, guint session, guint32 ssrc);
|
||||
void (*on_bye_ssrc) (GstRTPBin *rtpbin, guint session, guint32 ssrc);
|
||||
void (*on_bye_timeout) (GstRTPBin *rtpbin, guint session, guint32 ssrc);
|
||||
void (*on_timeout) (GstRTPBin *rtpbin, guint session, guint32 ssrc);
|
||||
void (*on_new_ssrc) (GstRtpBin *rtpbin, guint session, guint32 ssrc);
|
||||
void (*on_ssrc_collision) (GstRtpBin *rtpbin, guint session, guint32 ssrc);
|
||||
void (*on_ssrc_validated) (GstRtpBin *rtpbin, guint session, guint32 ssrc);
|
||||
void (*on_bye_ssrc) (GstRtpBin *rtpbin, guint session, guint32 ssrc);
|
||||
void (*on_bye_timeout) (GstRtpBin *rtpbin, guint session, guint32 ssrc);
|
||||
void (*on_timeout) (GstRtpBin *rtpbin, guint session, guint32 ssrc);
|
||||
};
|
||||
|
||||
GType gst_rtp_bin_get_type (void);
|
||||
|
|
|
@ -81,9 +81,9 @@ GST_STATIC_PAD_TEMPLATE ("rtp_src_%d_%d",
|
|||
);
|
||||
|
||||
#define GST_RTP_CLIENT_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_RTP_CLIENT, GstRTPClientPrivate))
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_RTP_CLIENT, GstRtpClientPrivate))
|
||||
|
||||
struct _GstRTPClientPrivate
|
||||
struct _GstRtpClientPrivate
|
||||
{
|
||||
gint foo;
|
||||
};
|
||||
|
@ -91,7 +91,7 @@ struct _GstRTPClientPrivate
|
|||
/* all the info needed to handle the stream with SSRC */
|
||||
typedef struct
|
||||
{
|
||||
GstRTPClient *client;
|
||||
GstRtpClient *client;
|
||||
|
||||
/* the SSRC of this stream */
|
||||
guint32 ssrc;
|
||||
|
@ -106,11 +106,11 @@ typedef struct
|
|||
GstElement *ptdemux;
|
||||
/* the new-pad signal */
|
||||
gulong new_pad_sig;
|
||||
} GstRTPClientStream;
|
||||
} GstRtpClientStream;
|
||||
|
||||
/* the PT demuxer found a new payload type */
|
||||
static void
|
||||
new_pad (GstElement * element, GstPad * pad, GstRTPClientStream * stream)
|
||||
new_pad (GstElement * element, GstPad * pad, GstRtpClientStream * stream)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -126,15 +126,15 @@ new_pad (GstElement * element, GstPad * pad, GstRTPClientStream * stream)
|
|||
* / +-----------------+ +---------------+
|
||||
*
|
||||
*/
|
||||
static GstRTPClientStream *
|
||||
create_stream (GstRTPClient * rtpclient, guint32 ssrc)
|
||||
static GstRtpClientStream *
|
||||
create_stream (GstRtpClient * rtpclient, guint32 ssrc)
|
||||
{
|
||||
GstRTPClientStream *stream;
|
||||
GstRtpClientStream *stream;
|
||||
gchar *name;
|
||||
GstPad *srcpad, *sinkpad;
|
||||
GstPadLinkReturn res;
|
||||
|
||||
stream = g_new0 (GstRTPClientStream, 1);
|
||||
stream = g_new0 (GstRtpClientStream, 1);
|
||||
stream->ssrc = ssrc;
|
||||
stream->client = rtpclient;
|
||||
|
||||
|
@ -204,7 +204,7 @@ could_not_link:
|
|||
|
||||
#if 0
|
||||
static void
|
||||
free_stream (GstRTPClientStream * stream)
|
||||
free_stream (GstRtpClientStream * stream)
|
||||
{
|
||||
gst_object_unref (stream->jitterbuffer);
|
||||
g_free (stream);
|
||||
|
@ -213,14 +213,14 @@ free_stream (GstRTPClientStream * stream)
|
|||
|
||||
/* find the stream for the given SSRC, return NULL if the stream did not exist
|
||||
*/
|
||||
static GstRTPClientStream *
|
||||
find_stream_by_ssrc (GstRTPClient * client, guint32 ssrc)
|
||||
static GstRtpClientStream *
|
||||
find_stream_by_ssrc (GstRtpClient * client, guint32 ssrc)
|
||||
{
|
||||
GstRTPClientStream *stream;
|
||||
GstRtpClientStream *stream;
|
||||
GList *walk;
|
||||
|
||||
for (walk = client->streams; walk; walk = g_list_next (walk)) {
|
||||
stream = (GstRTPClientStream *) walk->data;
|
||||
stream = (GstRtpClientStream *) walk->data;
|
||||
if (stream->ssrc == ssrc)
|
||||
return stream;
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ static void gst_rtp_client_release_pad (GstElement * element, GstPad * pad);
|
|||
|
||||
/*static guint gst_rtp_client_signals[LAST_SIGNAL] = { 0 }; */
|
||||
|
||||
GST_BOILERPLATE (GstRTPClient, gst_rtp_client, GstBin, GST_TYPE_BIN);
|
||||
GST_BOILERPLATE (GstRtpClient, gst_rtp_client, GstBin, GST_TYPE_BIN);
|
||||
|
||||
static void
|
||||
gst_rtp_client_base_init (gpointer klass)
|
||||
|
@ -276,7 +276,7 @@ gst_rtp_client_base_init (gpointer klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_client_class_init (GstRTPClientClass * klass)
|
||||
gst_rtp_client_class_init (GstRtpClientClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GstElementClass *gstelement_class;
|
||||
|
@ -284,7 +284,7 @@ gst_rtp_client_class_init (GstRTPClientClass * klass)
|
|||
gobject_class = (GObjectClass *) klass;
|
||||
gstelement_class = (GstElementClass *) klass;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GstRTPClientPrivate));
|
||||
g_type_class_add_private (klass, sizeof (GstRtpClientPrivate));
|
||||
|
||||
gobject_class->finalize = gst_rtp_client_finalize;
|
||||
gobject_class->set_property = gst_rtp_client_set_property;
|
||||
|
@ -299,7 +299,7 @@ gst_rtp_client_class_init (GstRTPClientClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_client_init (GstRTPClient * rtpclient, GstRTPClientClass * klass)
|
||||
gst_rtp_client_init (GstRtpClient * rtpclient, GstRtpClientClass * klass)
|
||||
{
|
||||
rtpclient->priv = GST_RTP_CLIENT_GET_PRIVATE (rtpclient);
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ gst_rtp_client_init (GstRTPClient * rtpclient, GstRTPClientClass * klass)
|
|||
static void
|
||||
gst_rtp_client_finalize (GObject * object)
|
||||
{
|
||||
GstRTPClient *rtpclient;
|
||||
GstRtpClient *rtpclient;
|
||||
|
||||
rtpclient = GST_RTP_CLIENT (object);
|
||||
|
||||
|
@ -318,7 +318,7 @@ static void
|
|||
gst_rtp_client_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstRTPClient *rtpclient;
|
||||
GstRtpClient *rtpclient;
|
||||
|
||||
rtpclient = GST_RTP_CLIENT (object);
|
||||
|
||||
|
@ -333,7 +333,7 @@ static void
|
|||
gst_rtp_client_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstRTPClient *rtpclient;
|
||||
GstRtpClient *rtpclient;
|
||||
|
||||
rtpclient = GST_RTP_CLIENT (object);
|
||||
|
||||
|
@ -348,7 +348,7 @@ static GstStateChangeReturn
|
|||
gst_rtp_client_change_state (GstElement * element, GstStateChange transition)
|
||||
{
|
||||
GstStateChangeReturn res;
|
||||
GstRTPClient *rtpclient;
|
||||
GstRtpClient *rtpclient;
|
||||
|
||||
rtpclient = GST_RTP_CLIENT (element);
|
||||
|
||||
|
@ -389,11 +389,11 @@ static GstPad *
|
|||
gst_rtp_client_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name)
|
||||
{
|
||||
GstRTPClient *rtpclient;
|
||||
GstRtpClient *rtpclient;
|
||||
GstElementClass *klass;
|
||||
GstPadTemplate *rtp_sink_templ, *sync_sink_templ;
|
||||
guint32 ssrc;
|
||||
GstRTPClientStream *stream;
|
||||
GstRtpClientStream *stream;
|
||||
GstPad *result;
|
||||
|
||||
g_return_val_if_fail (templ != NULL, NULL);
|
||||
|
|
|
@ -25,29 +25,29 @@
|
|||
#define GST_TYPE_RTP_CLIENT \
|
||||
(gst_rtp_client_get_type())
|
||||
#define GST_RTP_CLIENT(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_CLIENT,GstRTPClient))
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_CLIENT,GstRtpClient))
|
||||
#define GST_RTP_CLIENT_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_CLIENT,GstRTPClientClass))
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_CLIENT,GstRtpClientClass))
|
||||
#define GST_IS_RTP_CLIENT(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_CLIENT))
|
||||
#define GST_IS_RTP_CLIENT_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_CLIENT))
|
||||
|
||||
typedef struct _GstRTPClient GstRTPClient;
|
||||
typedef struct _GstRTPClientClass GstRTPClientClass;
|
||||
typedef struct _GstRTPClientPrivate GstRTPClientPrivate;
|
||||
typedef struct _GstRtpClient GstRtpClient;
|
||||
typedef struct _GstRtpClientClass GstRtpClientClass;
|
||||
typedef struct _GstRtpClientPrivate GstRtpClientPrivate;
|
||||
|
||||
struct _GstRTPClient {
|
||||
struct _GstRtpClient {
|
||||
GstBin parent_bin;
|
||||
|
||||
/* a list of streams from a client */
|
||||
GList *streams;
|
||||
|
||||
/*< private >*/
|
||||
GstRTPClientPrivate *priv;
|
||||
GstRtpClientPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GstRTPClientClass {
|
||||
struct _GstRtpClientClass {
|
||||
GstBinClass parent_class;
|
||||
};
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ enum
|
|||
|
||||
#define JBUF_SIGNAL(priv) (g_cond_signal ((priv)->jbuf_cond))
|
||||
|
||||
struct _GstRTPJitterBufferPrivate
|
||||
struct _GstRtpJitterBufferPrivate
|
||||
{
|
||||
GstPad *sinkpad, *srcpad;
|
||||
|
||||
|
@ -166,7 +166,7 @@ struct _GstRTPJitterBufferPrivate
|
|||
|
||||
#define GST_RTP_JITTER_BUFFER_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GST_TYPE_RTP_JITTER_BUFFER, \
|
||||
GstRTPJitterBufferPrivate))
|
||||
GstRtpJitterBufferPrivate))
|
||||
|
||||
static GstStaticPadTemplate gst_rtp_jitter_buffer_sink_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
|
@ -192,7 +192,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||
|
||||
static guint gst_rtp_jitter_buffer_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
GST_BOILERPLATE (GstRTPJitterBuffer, gst_rtp_jitter_buffer, GstElement,
|
||||
GST_BOILERPLATE (GstRtpJitterBuffer, gst_rtp_jitter_buffer, GstElement,
|
||||
GST_TYPE_ELEMENT);
|
||||
|
||||
/* object overrides */
|
||||
|
@ -219,11 +219,11 @@ static GstFlowReturn gst_rtp_jitter_buffer_chain (GstPad * pad,
|
|||
/* srcpad overrides */
|
||||
static gboolean
|
||||
gst_rtp_jitter_buffer_src_activate_push (GstPad * pad, gboolean active);
|
||||
static void gst_rtp_jitter_buffer_loop (GstRTPJitterBuffer * jitterbuffer);
|
||||
static void gst_rtp_jitter_buffer_loop (GstRtpJitterBuffer * jitterbuffer);
|
||||
static gboolean gst_rtp_jitter_buffer_query (GstPad * pad, GstQuery * query);
|
||||
|
||||
static void
|
||||
gst_rtp_jitter_buffer_clear_pt_map (GstRTPJitterBuffer * jitterbuffer);
|
||||
gst_rtp_jitter_buffer_clear_pt_map (GstRtpJitterBuffer * jitterbuffer);
|
||||
|
||||
static void
|
||||
gst_rtp_jitter_buffer_base_init (gpointer klass)
|
||||
|
@ -238,7 +238,7 @@ gst_rtp_jitter_buffer_base_init (gpointer klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_jitter_buffer_class_init (GstRTPJitterBufferClass * klass)
|
||||
gst_rtp_jitter_buffer_class_init (GstRtpJitterBufferClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GstElementClass *gstelement_class;
|
||||
|
@ -246,7 +246,7 @@ gst_rtp_jitter_buffer_class_init (GstRTPJitterBufferClass * klass)
|
|||
gobject_class = (GObjectClass *) klass;
|
||||
gstelement_class = (GstElementClass *) klass;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GstRTPJitterBufferPrivate));
|
||||
g_type_class_add_private (klass, sizeof (GstRtpJitterBufferPrivate));
|
||||
|
||||
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_rtp_jitter_buffer_dispose);
|
||||
|
||||
|
@ -254,7 +254,7 @@ gst_rtp_jitter_buffer_class_init (GstRTPJitterBufferClass * klass)
|
|||
gobject_class->get_property = gst_rtp_jitter_buffer_get_property;
|
||||
|
||||
/**
|
||||
* GstRTPJitterBuffer::latency:
|
||||
* GstRtpJitterBuffer::latency:
|
||||
*
|
||||
* The maximum latency of the jitterbuffer. Packets will be kept in the buffer
|
||||
* for at most this time.
|
||||
|
@ -264,7 +264,7 @@ gst_rtp_jitter_buffer_class_init (GstRTPJitterBufferClass * klass)
|
|||
"Amount of ms to buffer", 0, G_MAXUINT, DEFAULT_LATENCY_MS,
|
||||
G_PARAM_READWRITE));
|
||||
/**
|
||||
* GstRTPJitterBuffer::drop-on-latency:
|
||||
* GstRtpJitterBuffer::drop-on-latency:
|
||||
*
|
||||
* Drop oldest buffers when the queue is completely filled.
|
||||
*/
|
||||
|
@ -274,7 +274,7 @@ gst_rtp_jitter_buffer_class_init (GstRTPJitterBufferClass * klass)
|
|||
"Tells the jitterbuffer to never exceed the given latency in size",
|
||||
DEFAULT_DROP_ON_LATENCY, G_PARAM_READWRITE));
|
||||
/**
|
||||
* GstRTPJitterBuffer::request-pt-map:
|
||||
* GstRtpJitterBuffer::request-pt-map:
|
||||
* @buffer: the object which received the signal
|
||||
* @pt: the pt
|
||||
*
|
||||
|
@ -282,18 +282,18 @@ gst_rtp_jitter_buffer_class_init (GstRTPJitterBufferClass * klass)
|
|||
*/
|
||||
gst_rtp_jitter_buffer_signals[SIGNAL_REQUEST_PT_MAP] =
|
||||
g_signal_new ("request-pt-map", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPJitterBufferClass,
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpJitterBufferClass,
|
||||
request_pt_map), NULL, NULL, gst_rtp_bin_marshal_BOXED__UINT,
|
||||
GST_TYPE_CAPS, 1, G_TYPE_UINT);
|
||||
/**
|
||||
* GstRTPJitterBuffer::clear-pt-map:
|
||||
* GstRtpJitterBuffer::clear-pt-map:
|
||||
* @buffer: the object which received the signal
|
||||
*
|
||||
* Invalidate the clock-rate as obtained with the ::request-pt-map signal.
|
||||
*/
|
||||
gst_rtp_jitter_buffer_signals[SIGNAL_CLEAR_PT_MAP] =
|
||||
g_signal_new ("clear-pt-map", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPJitterBufferClass,
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpJitterBufferClass,
|
||||
clear_pt_map), NULL, NULL, g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0, G_TYPE_NONE);
|
||||
|
||||
|
@ -306,10 +306,10 @@ gst_rtp_jitter_buffer_class_init (GstRTPJitterBufferClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_jitter_buffer_init (GstRTPJitterBuffer * jitterbuffer,
|
||||
GstRTPJitterBufferClass * klass)
|
||||
gst_rtp_jitter_buffer_init (GstRtpJitterBuffer * jitterbuffer,
|
||||
GstRtpJitterBufferClass * klass)
|
||||
{
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
|
||||
priv = GST_RTP_JITTER_BUFFER_GET_PRIVATE (jitterbuffer);
|
||||
jitterbuffer->priv = priv;
|
||||
|
@ -354,7 +354,7 @@ gst_rtp_jitter_buffer_init (GstRTPJitterBuffer * jitterbuffer,
|
|||
static void
|
||||
gst_rtp_jitter_buffer_dispose (GObject * object)
|
||||
{
|
||||
GstRTPJitterBuffer *jitterbuffer;
|
||||
GstRtpJitterBuffer *jitterbuffer;
|
||||
|
||||
jitterbuffer = GST_RTP_JITTER_BUFFER (object);
|
||||
if (jitterbuffer->priv->jbuf) {
|
||||
|
@ -366,9 +366,9 @@ gst_rtp_jitter_buffer_dispose (GObject * object)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_jitter_buffer_clear_pt_map (GstRTPJitterBuffer * jitterbuffer)
|
||||
gst_rtp_jitter_buffer_clear_pt_map (GstRtpJitterBuffer * jitterbuffer)
|
||||
{
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
|
||||
priv = jitterbuffer->priv;
|
||||
|
||||
|
@ -379,8 +379,8 @@ gst_rtp_jitter_buffer_clear_pt_map (GstRTPJitterBuffer * jitterbuffer)
|
|||
static GstCaps *
|
||||
gst_rtp_jitter_buffer_getcaps (GstPad * pad)
|
||||
{
|
||||
GstRTPJitterBuffer *jitterbuffer;
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBuffer *jitterbuffer;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
GstPad *other;
|
||||
GstCaps *caps;
|
||||
const GstCaps *templ;
|
||||
|
@ -412,10 +412,10 @@ gst_rtp_jitter_buffer_getcaps (GstPad * pad)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_jitter_buffer_sink_parse_caps (GstRTPJitterBuffer * jitterbuffer,
|
||||
gst_jitter_buffer_sink_parse_caps (GstRtpJitterBuffer * jitterbuffer,
|
||||
GstCaps * caps)
|
||||
{
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
GstStructure *caps_struct;
|
||||
const GValue *value;
|
||||
|
||||
|
@ -473,8 +473,8 @@ wrong_rate:
|
|||
static gboolean
|
||||
gst_jitter_buffer_sink_setcaps (GstPad * pad, GstCaps * caps)
|
||||
{
|
||||
GstRTPJitterBuffer *jitterbuffer;
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBuffer *jitterbuffer;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
gboolean res;
|
||||
|
||||
jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
|
||||
|
@ -492,9 +492,9 @@ gst_jitter_buffer_sink_setcaps (GstPad * pad, GstCaps * caps)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_jitter_buffer_flush_start (GstRTPJitterBuffer * jitterbuffer)
|
||||
gst_rtp_jitter_buffer_flush_start (GstRtpJitterBuffer * jitterbuffer)
|
||||
{
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
|
||||
priv = jitterbuffer->priv;
|
||||
|
||||
|
@ -513,9 +513,9 @@ gst_rtp_jitter_buffer_flush_start (GstRTPJitterBuffer * jitterbuffer)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_jitter_buffer_flush_stop (GstRTPJitterBuffer * jitterbuffer)
|
||||
gst_rtp_jitter_buffer_flush_stop (GstRtpJitterBuffer * jitterbuffer)
|
||||
{
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
|
||||
priv = jitterbuffer->priv;
|
||||
|
||||
|
@ -535,7 +535,7 @@ static gboolean
|
|||
gst_rtp_jitter_buffer_src_activate_push (GstPad * pad, gboolean active)
|
||||
{
|
||||
gboolean result = TRUE;
|
||||
GstRTPJitterBuffer *jitterbuffer = NULL;
|
||||
GstRtpJitterBuffer *jitterbuffer = NULL;
|
||||
|
||||
jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
|
||||
|
||||
|
@ -566,8 +566,8 @@ static GstStateChangeReturn
|
|||
gst_rtp_jitter_buffer_change_state (GstElement * element,
|
||||
GstStateChange transition)
|
||||
{
|
||||
GstRTPJitterBuffer *jitterbuffer;
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBuffer *jitterbuffer;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
|
||||
|
||||
jitterbuffer = GST_RTP_JITTER_BUFFER (element);
|
||||
|
@ -643,8 +643,8 @@ static gboolean
|
|||
gst_rtp_jitter_buffer_sink_event (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
gboolean ret = TRUE;
|
||||
GstRTPJitterBuffer *jitterbuffer;
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBuffer *jitterbuffer;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
|
||||
jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
|
||||
priv = jitterbuffer->priv;
|
||||
|
@ -730,7 +730,7 @@ newseg_wrong_format:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_rtp_jitter_buffer_get_clock_rate (GstRTPJitterBuffer * jitterbuffer,
|
||||
gst_rtp_jitter_buffer_get_clock_rate (GstRtpJitterBuffer * jitterbuffer,
|
||||
guint8 pt)
|
||||
{
|
||||
GValue ret = { 0 };
|
||||
|
@ -768,8 +768,8 @@ no_caps:
|
|||
static GstFlowReturn
|
||||
gst_rtp_jitter_buffer_chain (GstPad * pad, GstBuffer * buffer)
|
||||
{
|
||||
GstRTPJitterBuffer *jitterbuffer;
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBuffer *jitterbuffer;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
guint16 seqnum;
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
|
||||
|
@ -912,9 +912,9 @@ duplicate:
|
|||
* missing packet to arrive up to the rtp timestamp of buffer B.
|
||||
*/
|
||||
static void
|
||||
gst_rtp_jitter_buffer_loop (GstRTPJitterBuffer * jitterbuffer)
|
||||
gst_rtp_jitter_buffer_loop (GstRtpJitterBuffer * jitterbuffer)
|
||||
{
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
GstBuffer *outbuf = NULL;
|
||||
GstFlowReturn result;
|
||||
guint16 seqnum;
|
||||
|
@ -1128,8 +1128,8 @@ pause:
|
|||
static gboolean
|
||||
gst_rtp_jitter_buffer_query (GstPad * pad, GstQuery * query)
|
||||
{
|
||||
GstRTPJitterBuffer *jitterbuffer;
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBuffer *jitterbuffer;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
gboolean res = FALSE;
|
||||
|
||||
jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
|
||||
|
@ -1176,7 +1176,7 @@ static void
|
|||
gst_rtp_jitter_buffer_set_property (GObject * object,
|
||||
guint prop_id, const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstRTPJitterBuffer *jitterbuffer = GST_RTP_JITTER_BUFFER (object);
|
||||
GstRtpJitterBuffer *jitterbuffer = GST_RTP_JITTER_BUFFER (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_LATENCY:
|
||||
|
@ -1212,7 +1212,7 @@ static void
|
|||
gst_rtp_jitter_buffer_get_property (GObject * object,
|
||||
guint prop_id, GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstRTPJitterBuffer *jitterbuffer = GST_RTP_JITTER_BUFFER (object);
|
||||
GstRtpJitterBuffer *jitterbuffer = GST_RTP_JITTER_BUFFER (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_LATENCY:
|
||||
|
|
|
@ -36,42 +36,42 @@ G_BEGIN_DECLS
|
|||
(gst_rtp_jitter_buffer_get_type())
|
||||
#define GST_RTP_JITTER_BUFFER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
GST_TYPE_RTP_JITTER_BUFFER,GstRTPJitterBuffer))
|
||||
GST_TYPE_RTP_JITTER_BUFFER,GstRtpJitterBuffer))
|
||||
#define GST_RTP_JITTER_BUFFER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
GST_TYPE_RTP_JITTER_BUFFER,GstRTPJitterBufferClass))
|
||||
GST_TYPE_RTP_JITTER_BUFFER,GstRtpJitterBufferClass))
|
||||
#define GST_IS_RTP_JITTER_BUFFER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_JITTER_BUFFER))
|
||||
#define GST_IS_RTP_JITTER_BUFFER_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_JITTER_BUFFER))
|
||||
|
||||
typedef struct _GstRTPJitterBuffer GstRTPJitterBuffer;
|
||||
typedef struct _GstRTPJitterBufferClass GstRTPJitterBufferClass;
|
||||
typedef struct _GstRTPJitterBufferPrivate GstRTPJitterBufferPrivate;
|
||||
typedef struct _GstRtpJitterBuffer GstRtpJitterBuffer;
|
||||
typedef struct _GstRtpJitterBufferClass GstRtpJitterBufferClass;
|
||||
typedef struct _GstRtpJitterBufferPrivate GstRtpJitterBufferPrivate;
|
||||
|
||||
/**
|
||||
* GstRTPJitterBuffer:
|
||||
* GstRtpJitterBuffer:
|
||||
*
|
||||
* Opaque jitterbuffer structure.
|
||||
*/
|
||||
struct _GstRTPJitterBuffer
|
||||
struct _GstRtpJitterBuffer
|
||||
{
|
||||
GstElement parent;
|
||||
|
||||
/*< private >*/
|
||||
GstRTPJitterBufferPrivate *priv;
|
||||
GstRtpJitterBufferPrivate *priv;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
struct _GstRTPJitterBufferClass
|
||||
struct _GstRtpJitterBufferClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
|
||||
/* signals */
|
||||
GstCaps* (*request_pt_map) (GstRTPJitterBuffer *buffer, guint pt);
|
||||
GstCaps* (*request_pt_map) (GstRtpJitterBuffer *buffer, guint pt);
|
||||
|
||||
void (*clear_pt_map) (GstRTPJitterBuffer *buffer);
|
||||
void (*clear_pt_map) (GstRtpJitterBuffer *buffer);
|
||||
|
||||
/*< private > */
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
|
|
|
@ -105,7 +105,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_rtp_pt_demux_debug);
|
|||
/**
|
||||
* Item for storing GstPad<->pt pairs.
|
||||
*/
|
||||
struct _GstRTPPtDemuxPad
|
||||
struct _GstRtpPtDemuxPad
|
||||
{
|
||||
GstPad *pad; /**< pointer to the actual pad */
|
||||
gint pt; /**< RTP payload-type attached to pad */
|
||||
|
@ -121,7 +121,7 @@ enum
|
|||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
GST_BOILERPLATE (GstRTPPtDemux, gst_rtp_pt_demux, GstElement, GST_TYPE_ELEMENT);
|
||||
GST_BOILERPLATE (GstRtpPtDemux, gst_rtp_pt_demux, GstElement, GST_TYPE_ELEMENT);
|
||||
|
||||
static void gst_rtp_pt_demux_finalize (GObject * object);
|
||||
|
||||
|
@ -131,9 +131,9 @@ static gboolean gst_rtp_pt_demux_setup (GstElement * element);
|
|||
static GstFlowReturn gst_rtp_pt_demux_chain (GstPad * pad, GstBuffer * buf);
|
||||
static GstStateChangeReturn gst_rtp_pt_demux_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static void gst_rtp_pt_demux_clear_pt_map (GstRTPPtDemux * rtpdemux);
|
||||
static void gst_rtp_pt_demux_clear_pt_map (GstRtpPtDemux * rtpdemux);
|
||||
|
||||
static GstPad *find_pad_for_pt (GstRTPPtDemux * rtpdemux, guint8 pt);
|
||||
static GstPad *find_pad_for_pt (GstRtpPtDemux * rtpdemux, guint8 pt);
|
||||
|
||||
static guint gst_rtp_pt_demux_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
|
@ -158,7 +158,7 @@ gst_rtp_pt_demux_base_init (gpointer g_class)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_pt_demux_class_init (GstRTPPtDemuxClass * klass)
|
||||
gst_rtp_pt_demux_class_init (GstRtpPtDemuxClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_klass;
|
||||
GstElementClass *gstelement_klass;
|
||||
|
@ -167,7 +167,7 @@ gst_rtp_pt_demux_class_init (GstRTPPtDemuxClass * klass)
|
|||
gstelement_klass = (GstElementClass *) klass;
|
||||
|
||||
/**
|
||||
* GstRTPPtDemux::request-pt-map:
|
||||
* GstRtpPtDemux::request-pt-map:
|
||||
* @demux: the object which received the signal
|
||||
* @pt: the payload type
|
||||
*
|
||||
|
@ -175,12 +175,12 @@ gst_rtp_pt_demux_class_init (GstRTPPtDemuxClass * klass)
|
|||
*/
|
||||
gst_rtp_pt_demux_signals[SIGNAL_REQUEST_PT_MAP] =
|
||||
g_signal_new ("request-pt-map", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPPtDemuxClass, request_pt_map),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpPtDemuxClass, request_pt_map),
|
||||
NULL, NULL, gst_rtp_bin_marshal_BOXED__UINT, GST_TYPE_CAPS, 1,
|
||||
G_TYPE_UINT);
|
||||
|
||||
/**
|
||||
* GstRTPPtDemux::new-payload-type:
|
||||
* GstRtpPtDemux::new-payload-type:
|
||||
* @demux: the object which received the signal
|
||||
* @pt: the payload type
|
||||
* @pad: the pad with the new payload
|
||||
|
@ -189,12 +189,12 @@ gst_rtp_pt_demux_class_init (GstRTPPtDemuxClass * klass)
|
|||
*/
|
||||
gst_rtp_pt_demux_signals[SIGNAL_NEW_PAYLOAD_TYPE] =
|
||||
g_signal_new ("new-payload-type", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPPtDemuxClass, new_payload_type),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpPtDemuxClass, new_payload_type),
|
||||
NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_OBJECT, G_TYPE_NONE, 2,
|
||||
G_TYPE_UINT, GST_TYPE_PAD);
|
||||
|
||||
/**
|
||||
* GstRTPPtDemux::payload-type-change:
|
||||
* GstRtpPtDemux::payload-type-change:
|
||||
* @demux: the object which received the signal
|
||||
* @pt: the new payload type
|
||||
*
|
||||
|
@ -202,12 +202,12 @@ gst_rtp_pt_demux_class_init (GstRTPPtDemuxClass * klass)
|
|||
*/
|
||||
gst_rtp_pt_demux_signals[SIGNAL_PAYLOAD_TYPE_CHANGE] =
|
||||
g_signal_new ("payload-type-change", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPPtDemuxClass,
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpPtDemuxClass,
|
||||
payload_type_change), NULL, NULL, g_cclosure_marshal_VOID__UINT,
|
||||
G_TYPE_NONE, 1, G_TYPE_UINT);
|
||||
|
||||
/**
|
||||
* GstRTPPtDemux::clear-pt-map:
|
||||
* GstRtpPtDemux::clear-pt-map:
|
||||
* @demux: the object which received the signal
|
||||
*
|
||||
* The application can call this signal to instruct the element to discard the
|
||||
|
@ -215,7 +215,7 @@ gst_rtp_pt_demux_class_init (GstRTPPtDemuxClass * klass)
|
|||
*/
|
||||
gst_rtp_pt_demux_signals[SIGNAL_CLEAR_PT_MAP] =
|
||||
g_signal_new ("clear-pt-map", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_ACTION | G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPPtDemuxClass,
|
||||
G_SIGNAL_ACTION | G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpPtDemuxClass,
|
||||
clear_pt_map), NULL, NULL, g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0, G_TYPE_NONE);
|
||||
|
||||
|
@ -231,7 +231,7 @@ gst_rtp_pt_demux_class_init (GstRTPPtDemuxClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_pt_demux_init (GstRTPPtDemux * ptdemux, GstRTPPtDemuxClass * g_class)
|
||||
gst_rtp_pt_demux_init (GstRtpPtDemux * ptdemux, GstRtpPtDemuxClass * g_class)
|
||||
{
|
||||
GstElementClass *klass = GST_ELEMENT_GET_CLASS (ptdemux);
|
||||
|
||||
|
@ -254,7 +254,7 @@ gst_rtp_pt_demux_finalize (GObject * object)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_pt_demux_clear_pt_map (GstRTPPtDemux * rtpdemux)
|
||||
gst_rtp_pt_demux_clear_pt_map (GstRtpPtDemux * rtpdemux)
|
||||
{
|
||||
/* FIXME, do something */
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ static GstFlowReturn
|
|||
gst_rtp_pt_demux_chain (GstPad * pad, GstBuffer * buf)
|
||||
{
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
GstRTPPtDemux *rtpdemux;
|
||||
GstRtpPtDemux *rtpdemux;
|
||||
GstElement *element = GST_ELEMENT (GST_OBJECT_PARENT (pad));
|
||||
guint8 pt;
|
||||
GstPad *srcpad;
|
||||
|
@ -284,7 +284,7 @@ gst_rtp_pt_demux_chain (GstPad * pad, GstBuffer * buf)
|
|||
GstPadTemplate *templ;
|
||||
gchar *padname;
|
||||
GstCaps *caps;
|
||||
GstRTPPtDemuxPad *rtpdemuxpad;
|
||||
GstRtpPtDemuxPad *rtpdemuxpad;
|
||||
GValue ret = { 0 };
|
||||
GValue args[2] = { {0}
|
||||
, {0}
|
||||
|
@ -321,7 +321,7 @@ gst_rtp_pt_demux_chain (GstPad * pad, GstBuffer * buf)
|
|||
gst_pad_set_caps (srcpad, caps);
|
||||
|
||||
GST_DEBUG ("Adding pt=%d to the list.", pt);
|
||||
rtpdemuxpad = g_new0 (GstRTPPtDemuxPad, 1);
|
||||
rtpdemuxpad = g_new0 (GstRtpPtDemuxPad, 1);
|
||||
rtpdemuxpad->pt = pt;
|
||||
rtpdemuxpad->pad = srcpad;
|
||||
rtpdemux->srcpads = g_slist_append (rtpdemux->srcpads, rtpdemuxpad);
|
||||
|
@ -371,13 +371,13 @@ no_caps:
|
|||
}
|
||||
|
||||
static GstPad *
|
||||
find_pad_for_pt (GstRTPPtDemux * rtpdemux, guint8 pt)
|
||||
find_pad_for_pt (GstRtpPtDemux * rtpdemux, guint8 pt)
|
||||
{
|
||||
GstPad *respad = NULL;
|
||||
GSList *item = rtpdemux->srcpads;
|
||||
|
||||
for (; item; item = g_slist_next (item)) {
|
||||
GstRTPPtDemuxPad *pad = item->data;
|
||||
GstRtpPtDemuxPad *pad = item->data;
|
||||
|
||||
if (pad->pt == pt) {
|
||||
respad = pad->pad;
|
||||
|
@ -394,7 +394,7 @@ find_pad_for_pt (GstRTPPtDemux * rtpdemux, guint8 pt)
|
|||
static gboolean
|
||||
gst_rtp_pt_demux_setup (GstElement * element)
|
||||
{
|
||||
GstRTPPtDemux *ptdemux = GST_RTP_PT_DEMUX (element);
|
||||
GstRtpPtDemux *ptdemux = GST_RTP_PT_DEMUX (element);
|
||||
gboolean res = TRUE;
|
||||
|
||||
if (ptdemux) {
|
||||
|
@ -411,7 +411,7 @@ gst_rtp_pt_demux_setup (GstElement * element)
|
|||
static void
|
||||
gst_rtp_pt_demux_release (GstElement * element)
|
||||
{
|
||||
GstRTPPtDemux *ptdemux = GST_RTP_PT_DEMUX (element);
|
||||
GstRtpPtDemux *ptdemux = GST_RTP_PT_DEMUX (element);
|
||||
|
||||
if (ptdemux) {
|
||||
/* note: GstElement's dispose() will handle the pads */
|
||||
|
@ -424,7 +424,7 @@ static GstStateChangeReturn
|
|||
gst_rtp_pt_demux_change_state (GstElement * element, GstStateChange transition)
|
||||
{
|
||||
GstStateChangeReturn ret;
|
||||
GstRTPPtDemux *ptdemux;
|
||||
GstRtpPtDemux *ptdemux;
|
||||
|
||||
ptdemux = GST_RTP_PT_DEMUX (element);
|
||||
|
||||
|
|
|
@ -23,38 +23,38 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
#define GST_TYPE_RTP_PT_DEMUX (gst_rtp_pt_demux_get_type())
|
||||
#define GST_RTP_PT_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_PT_DEMUX,GstRTPPtDemux))
|
||||
#define GST_RTP_PT_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_PT_DEMUX,GstRTPPtDemuxClass))
|
||||
#define GST_RTP_PT_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_PT_DEMUX,GstRtpPtDemux))
|
||||
#define GST_RTP_PT_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_PT_DEMUX,GstRtpPtDemuxClass))
|
||||
#define GST_IS_RTP_PT_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_PT_DEMUX))
|
||||
#define GST_IS_RTP_PT_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_PT_DEMUX))
|
||||
|
||||
typedef struct _GstRTPPtDemux GstRTPPtDemux;
|
||||
typedef struct _GstRTPPtDemuxClass GstRTPPtDemuxClass;
|
||||
typedef struct _GstRTPPtDemuxPad GstRTPPtDemuxPad;
|
||||
typedef struct _GstRtpPtDemux GstRtpPtDemux;
|
||||
typedef struct _GstRtpPtDemuxClass GstRtpPtDemuxClass;
|
||||
typedef struct _GstRtpPtDemuxPad GstRtpPtDemuxPad;
|
||||
|
||||
struct _GstRTPPtDemux
|
||||
struct _GstRtpPtDemux
|
||||
{
|
||||
GstElement parent; /**< parent class */
|
||||
|
||||
GstPad *sink; /**< the sink pad */
|
||||
guint16 last_pt; /**< pt of the last packet 0xFFFF if none */
|
||||
GSList *srcpads; /**< a linked list of GstRTPPtDemuxPad objects */
|
||||
GSList *srcpads; /**< a linked list of GstRtpPtDemuxPad objects */
|
||||
};
|
||||
|
||||
struct _GstRTPPtDemuxClass
|
||||
struct _GstRtpPtDemuxClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
|
||||
/* get the caps for pt */
|
||||
GstCaps* (*request_pt_map) (GstRTPPtDemux *demux, guint pt);
|
||||
GstCaps* (*request_pt_map) (GstRtpPtDemux *demux, guint pt);
|
||||
|
||||
/* signal emmited when a new PT is found from the incoming stream */
|
||||
void (*new_payload_type) (GstRTPPtDemux *demux, guint pt, GstPad * pad);
|
||||
void (*new_payload_type) (GstRtpPtDemux *demux, guint pt, GstPad * pad);
|
||||
|
||||
/* signal emitted when the payload type changes */
|
||||
void (*payload_type_change) (GstRTPPtDemux *demux, guint pt);
|
||||
void (*payload_type_change) (GstRtpPtDemux *demux, guint pt);
|
||||
|
||||
void (*clear_pt_map) (GstRTPPtDemux *demux);
|
||||
void (*clear_pt_map) (GstRtpPtDemux *demux);
|
||||
};
|
||||
|
||||
GType gst_rtp_pt_demux_get_type (void);
|
||||
|
|
|
@ -79,8 +79,8 @@
|
|||
* </para>
|
||||
* <para>
|
||||
* The session manager needs the clock-rate of the payload types it is handling
|
||||
* and will signal the GstRTPSession::request-pt-map signal when it needs such a
|
||||
* mapping. One can clear the cached values with the GstRTPSession::clear-pt-map
|
||||
* and will signal the GstRtpSession::request-pt-map signal when it needs such a
|
||||
* mapping. One can clear the cached values with the GstRtpSession::clear-pt-map
|
||||
* signal.
|
||||
* </para>
|
||||
* <title>Example pipelines</title>
|
||||
|
@ -218,12 +218,12 @@ enum
|
|||
};
|
||||
|
||||
#define GST_RTP_SESSION_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_RTP_SESSION, GstRTPSessionPrivate))
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_RTP_SESSION, GstRtpSessionPrivate))
|
||||
|
||||
#define GST_RTP_SESSION_LOCK(sess) g_mutex_lock ((sess)->priv->lock)
|
||||
#define GST_RTP_SESSION_UNLOCK(sess) g_mutex_unlock ((sess)->priv->lock)
|
||||
|
||||
struct _GstRTPSessionPrivate
|
||||
struct _GstRtpSessionPrivate
|
||||
{
|
||||
GMutex *lock;
|
||||
RTPSession *session;
|
||||
|
@ -269,53 +269,53 @@ static GstPad *gst_rtp_session_request_new_pad (GstElement * element,
|
|||
GstPadTemplate * templ, const gchar * name);
|
||||
static void gst_rtp_session_release_pad (GstElement * element, GstPad * pad);
|
||||
|
||||
static void gst_rtp_session_clear_pt_map (GstRTPSession * rtpsession);
|
||||
static void gst_rtp_session_clear_pt_map (GstRtpSession * rtpsession);
|
||||
|
||||
static guint gst_rtp_session_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static void
|
||||
on_new_ssrc (RTPSession * session, RTPSource * src, GstRTPSession * sess)
|
||||
on_new_ssrc (RTPSession * session, RTPSource * src, GstRtpSession * sess)
|
||||
{
|
||||
g_signal_emit (sess, gst_rtp_session_signals[SIGNAL_ON_NEW_SSRC], 0,
|
||||
src->ssrc);
|
||||
}
|
||||
|
||||
static void
|
||||
on_ssrc_collision (RTPSession * session, RTPSource * src, GstRTPSession * sess)
|
||||
on_ssrc_collision (RTPSession * session, RTPSource * src, GstRtpSession * sess)
|
||||
{
|
||||
g_signal_emit (sess, gst_rtp_session_signals[SIGNAL_ON_SSRC_COLLISION], 0,
|
||||
src->ssrc);
|
||||
}
|
||||
|
||||
static void
|
||||
on_ssrc_validated (RTPSession * session, RTPSource * src, GstRTPSession * sess)
|
||||
on_ssrc_validated (RTPSession * session, RTPSource * src, GstRtpSession * sess)
|
||||
{
|
||||
g_signal_emit (sess, gst_rtp_session_signals[SIGNAL_ON_SSRC_VALIDATED], 0,
|
||||
src->ssrc);
|
||||
}
|
||||
|
||||
static void
|
||||
on_bye_ssrc (RTPSession * session, RTPSource * src, GstRTPSession * sess)
|
||||
on_bye_ssrc (RTPSession * session, RTPSource * src, GstRtpSession * sess)
|
||||
{
|
||||
g_signal_emit (sess, gst_rtp_session_signals[SIGNAL_ON_BYE_SSRC], 0,
|
||||
src->ssrc);
|
||||
}
|
||||
|
||||
static void
|
||||
on_bye_timeout (RTPSession * session, RTPSource * src, GstRTPSession * sess)
|
||||
on_bye_timeout (RTPSession * session, RTPSource * src, GstRtpSession * sess)
|
||||
{
|
||||
g_signal_emit (sess, gst_rtp_session_signals[SIGNAL_ON_BYE_TIMEOUT], 0,
|
||||
src->ssrc);
|
||||
}
|
||||
|
||||
static void
|
||||
on_timeout (RTPSession * session, RTPSource * src, GstRTPSession * sess)
|
||||
on_timeout (RTPSession * session, RTPSource * src, GstRtpSession * sess)
|
||||
{
|
||||
g_signal_emit (sess, gst_rtp_session_signals[SIGNAL_ON_TIMEOUT], 0,
|
||||
src->ssrc);
|
||||
}
|
||||
|
||||
GST_BOILERPLATE (GstRTPSession, gst_rtp_session, GstElement, GST_TYPE_ELEMENT);
|
||||
GST_BOILERPLATE (GstRtpSession, gst_rtp_session, GstElement, GST_TYPE_ELEMENT);
|
||||
|
||||
static void
|
||||
gst_rtp_session_base_init (gpointer klass)
|
||||
|
@ -344,7 +344,7 @@ gst_rtp_session_base_init (gpointer klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_session_class_init (GstRTPSessionClass * klass)
|
||||
gst_rtp_session_class_init (GstRtpSessionClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GstElementClass *gstelement_class;
|
||||
|
@ -352,14 +352,14 @@ gst_rtp_session_class_init (GstRTPSessionClass * klass)
|
|||
gobject_class = (GObjectClass *) klass;
|
||||
gstelement_class = (GstElementClass *) klass;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GstRTPSessionPrivate));
|
||||
g_type_class_add_private (klass, sizeof (GstRtpSessionPrivate));
|
||||
|
||||
gobject_class->finalize = gst_rtp_session_finalize;
|
||||
gobject_class->set_property = gst_rtp_session_set_property;
|
||||
gobject_class->get_property = gst_rtp_session_get_property;
|
||||
|
||||
/**
|
||||
* GstRTPSession::request-pt-map:
|
||||
* GstRtpSession::request-pt-map:
|
||||
* @sess: the object which received the signal
|
||||
* @pt: the pt
|
||||
*
|
||||
|
@ -367,22 +367,22 @@ gst_rtp_session_class_init (GstRTPSessionClass * klass)
|
|||
*/
|
||||
gst_rtp_session_signals[SIGNAL_REQUEST_PT_MAP] =
|
||||
g_signal_new ("request-pt-map", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPSessionClass, request_pt_map),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSessionClass, request_pt_map),
|
||||
NULL, NULL, gst_rtp_bin_marshal_BOXED__UINT, GST_TYPE_CAPS, 1,
|
||||
G_TYPE_UINT);
|
||||
/**
|
||||
* GstRTPSession::clear-pt-map:
|
||||
* GstRtpSession::clear-pt-map:
|
||||
* @sess: the object which received the signal
|
||||
*
|
||||
* Clear the cached pt-maps requested with GstRTPSession::request-pt-map.
|
||||
* Clear the cached pt-maps requested with GstRtpSession::request-pt-map.
|
||||
*/
|
||||
gst_rtp_session_signals[SIGNAL_CLEAR_PT_MAP] =
|
||||
g_signal_new ("clear-pt-map", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRTPSessionClass, clear_pt_map),
|
||||
G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstRtpSessionClass, clear_pt_map),
|
||||
NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE);
|
||||
|
||||
/**
|
||||
* GstRTPSession::on-new-ssrc:
|
||||
* GstRtpSession::on-new-ssrc:
|
||||
* @sess: the object which received the signal
|
||||
* @ssrc: the SSRC
|
||||
*
|
||||
|
@ -390,10 +390,10 @@ gst_rtp_session_class_init (GstRTPSessionClass * klass)
|
|||
*/
|
||||
gst_rtp_session_signals[SIGNAL_ON_NEW_SSRC] =
|
||||
g_signal_new ("on-new-ssrc", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPSessionClass, on_new_ssrc),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSessionClass, on_new_ssrc),
|
||||
NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT);
|
||||
/**
|
||||
* GstRTPSession::on-ssrc_collision:
|
||||
* GstRtpSession::on-ssrc_collision:
|
||||
* @sess: the object which received the signal
|
||||
* @ssrc: the SSRC
|
||||
*
|
||||
|
@ -401,11 +401,11 @@ gst_rtp_session_class_init (GstRTPSessionClass * klass)
|
|||
*/
|
||||
gst_rtp_session_signals[SIGNAL_ON_SSRC_COLLISION] =
|
||||
g_signal_new ("on-ssrc-collision", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPSessionClass,
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSessionClass,
|
||||
on_ssrc_collision), NULL, NULL, g_cclosure_marshal_VOID__UINT,
|
||||
G_TYPE_NONE, 1, G_TYPE_UINT);
|
||||
/**
|
||||
* GstRTPSession::on-ssrc_validated:
|
||||
* GstRtpSession::on-ssrc_validated:
|
||||
* @sess: the object which received the signal
|
||||
* @ssrc: the SSRC
|
||||
*
|
||||
|
@ -413,12 +413,12 @@ gst_rtp_session_class_init (GstRTPSessionClass * klass)
|
|||
*/
|
||||
gst_rtp_session_signals[SIGNAL_ON_SSRC_VALIDATED] =
|
||||
g_signal_new ("on-ssrc-validated", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPSessionClass,
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSessionClass,
|
||||
on_ssrc_validated), NULL, NULL, g_cclosure_marshal_VOID__UINT,
|
||||
G_TYPE_NONE, 1, G_TYPE_UINT);
|
||||
|
||||
/**
|
||||
* GstRTPSession::on-bye-ssrc:
|
||||
* GstRtpSession::on-bye-ssrc:
|
||||
* @sess: the object which received the signal
|
||||
* @ssrc: the SSRC
|
||||
*
|
||||
|
@ -426,10 +426,10 @@ gst_rtp_session_class_init (GstRTPSessionClass * klass)
|
|||
*/
|
||||
gst_rtp_session_signals[SIGNAL_ON_BYE_SSRC] =
|
||||
g_signal_new ("on-bye-ssrc", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPSessionClass, on_bye_ssrc),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSessionClass, on_bye_ssrc),
|
||||
NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT);
|
||||
/**
|
||||
* GstRTPSession::on-bye-timeout:
|
||||
* GstRtpSession::on-bye-timeout:
|
||||
* @sess: the object which received the signal
|
||||
* @ssrc: the SSRC
|
||||
*
|
||||
|
@ -437,10 +437,10 @@ gst_rtp_session_class_init (GstRTPSessionClass * klass)
|
|||
*/
|
||||
gst_rtp_session_signals[SIGNAL_ON_BYE_TIMEOUT] =
|
||||
g_signal_new ("on-bye-timeout", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPSessionClass, on_bye_timeout),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSessionClass, on_bye_timeout),
|
||||
NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT);
|
||||
/**
|
||||
* GstRTPSession::on-timeout:
|
||||
* GstRtpSession::on-timeout:
|
||||
* @sess: the object which received the signal
|
||||
* @ssrc: the SSRC
|
||||
*
|
||||
|
@ -448,7 +448,7 @@ gst_rtp_session_class_init (GstRTPSessionClass * klass)
|
|||
*/
|
||||
gst_rtp_session_signals[SIGNAL_ON_TIMEOUT] =
|
||||
g_signal_new ("on-timeout", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTPSessionClass, on_timeout),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSessionClass, on_timeout),
|
||||
NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT);
|
||||
|
||||
gstelement_class->change_state =
|
||||
|
@ -465,7 +465,7 @@ gst_rtp_session_class_init (GstRTPSessionClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_session_init (GstRTPSession * rtpsession, GstRTPSessionClass * klass)
|
||||
gst_rtp_session_init (GstRtpSession * rtpsession, GstRtpSessionClass * klass)
|
||||
{
|
||||
rtpsession->priv = GST_RTP_SESSION_GET_PRIVATE (rtpsession);
|
||||
rtpsession->priv->lock = g_mutex_new ();
|
||||
|
@ -490,7 +490,7 @@ gst_rtp_session_init (GstRTPSession * rtpsession, GstRTPSessionClass * klass)
|
|||
static void
|
||||
gst_rtp_session_finalize (GObject * object)
|
||||
{
|
||||
GstRTPSession *rtpsession;
|
||||
GstRtpSession *rtpsession;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (object);
|
||||
g_mutex_free (rtpsession->priv->lock);
|
||||
|
@ -503,7 +503,7 @@ static void
|
|||
gst_rtp_session_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstRTPSession *rtpsession;
|
||||
GstRtpSession *rtpsession;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (object);
|
||||
|
||||
|
@ -518,7 +518,7 @@ static void
|
|||
gst_rtp_session_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstRTPSession *rtpsession;
|
||||
GstRtpSession *rtpsession;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (object);
|
||||
|
||||
|
@ -530,7 +530,7 @@ gst_rtp_session_get_property (GObject * object, guint prop_id,
|
|||
}
|
||||
|
||||
static void
|
||||
rtcp_thread (GstRTPSession * rtpsession)
|
||||
rtcp_thread (GstRtpSession * rtpsession)
|
||||
{
|
||||
GstClock *clock;
|
||||
GstClockID id;
|
||||
|
@ -603,7 +603,7 @@ no_clock:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
start_rtcp_thread (GstRTPSession * rtpsession)
|
||||
start_rtcp_thread (GstRtpSession * rtpsession)
|
||||
{
|
||||
GError *error = NULL;
|
||||
gboolean res;
|
||||
|
@ -627,7 +627,7 @@ start_rtcp_thread (GstRTPSession * rtpsession)
|
|||
}
|
||||
|
||||
static void
|
||||
stop_rtcp_thread (GstRTPSession * rtpsession)
|
||||
stop_rtcp_thread (GstRtpSession * rtpsession)
|
||||
{
|
||||
GST_DEBUG_OBJECT (rtpsession, "stopping RTCP thread");
|
||||
|
||||
|
@ -644,7 +644,7 @@ static GstStateChangeReturn
|
|||
gst_rtp_session_change_state (GstElement * element, GstStateChange transition)
|
||||
{
|
||||
GstStateChangeReturn res;
|
||||
GstRTPSession *rtpsession;
|
||||
GstRtpSession *rtpsession;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (element);
|
||||
|
||||
|
@ -687,7 +687,7 @@ failed_thread:
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_session_clear_pt_map (GstRTPSession * rtpsession)
|
||||
gst_rtp_session_clear_pt_map (GstRtpSession * rtpsession)
|
||||
{
|
||||
/* FIXME, do something */
|
||||
}
|
||||
|
@ -699,8 +699,8 @@ gst_rtp_session_process_rtp (RTPSession * sess, RTPSource * src,
|
|||
GstBuffer * buffer, gpointer user_data)
|
||||
{
|
||||
GstFlowReturn result;
|
||||
GstRTPSession *rtpsession;
|
||||
GstRTPSessionPrivate *priv;
|
||||
GstRtpSession *rtpsession;
|
||||
GstRtpSessionPrivate *priv;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (user_data);
|
||||
priv = rtpsession->priv;
|
||||
|
@ -723,8 +723,8 @@ gst_rtp_session_send_rtp (RTPSession * sess, RTPSource * src,
|
|||
GstBuffer * buffer, gpointer user_data)
|
||||
{
|
||||
GstFlowReturn result;
|
||||
GstRTPSession *rtpsession;
|
||||
GstRTPSessionPrivate *priv;
|
||||
GstRtpSession *rtpsession;
|
||||
GstRtpSessionPrivate *priv;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (user_data);
|
||||
priv = rtpsession->priv;
|
||||
|
@ -747,8 +747,8 @@ gst_rtp_session_send_rtcp (RTPSession * sess, RTPSource * src,
|
|||
GstBuffer * buffer, gpointer user_data)
|
||||
{
|
||||
GstFlowReturn result;
|
||||
GstRTPSession *rtpsession;
|
||||
GstRTPSessionPrivate *priv;
|
||||
GstRtpSession *rtpsession;
|
||||
GstRtpSessionPrivate *priv;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (user_data);
|
||||
priv = rtpsession->priv;
|
||||
|
@ -771,7 +771,7 @@ gst_rtp_session_clock_rate (RTPSession * sess, guint8 payload,
|
|||
gpointer user_data)
|
||||
{
|
||||
gint result = -1;
|
||||
GstRTPSession *rtpsession;
|
||||
GstRtpSession *rtpsession;
|
||||
GValue ret = { 0 };
|
||||
GValue args[2] = { {0}, {0} };
|
||||
GstCaps *caps;
|
||||
|
@ -820,7 +820,7 @@ static GstClockTime
|
|||
gst_rtp_session_get_time (RTPSession * sess, gpointer user_data)
|
||||
{
|
||||
GstClockTime result;
|
||||
GstRTPSession *rtpsession;
|
||||
GstRtpSession *rtpsession;
|
||||
GstClock *clock;
|
||||
|
||||
rtpsession = GST_RTP_SESSION_CAST (user_data);
|
||||
|
@ -839,7 +839,7 @@ gst_rtp_session_get_time (RTPSession * sess, gpointer user_data)
|
|||
static void
|
||||
gst_rtp_session_reconsider (RTPSession * sess, gpointer user_data)
|
||||
{
|
||||
GstRTPSession *rtpsession;
|
||||
GstRtpSession *rtpsession;
|
||||
|
||||
rtpsession = GST_RTP_SESSION_CAST (user_data);
|
||||
|
||||
|
@ -853,8 +853,8 @@ gst_rtp_session_reconsider (RTPSession * sess, gpointer user_data)
|
|||
static GstFlowReturn
|
||||
gst_rtp_session_event_recv_rtp_sink (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
GstRTPSession *rtpsession;
|
||||
GstRTPSessionPrivate *priv;
|
||||
GstRtpSession *rtpsession;
|
||||
GstRtpSessionPrivate *priv;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
||||
|
@ -879,8 +879,8 @@ gst_rtp_session_event_recv_rtp_sink (GstPad * pad, GstEvent * event)
|
|||
static GstFlowReturn
|
||||
gst_rtp_session_chain_recv_rtp (GstPad * pad, GstBuffer * buffer)
|
||||
{
|
||||
GstRTPSession *rtpsession;
|
||||
GstRTPSessionPrivate *priv;
|
||||
GstRtpSession *rtpsession;
|
||||
GstRtpSessionPrivate *priv;
|
||||
GstFlowReturn ret;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
||||
|
@ -898,8 +898,8 @@ gst_rtp_session_chain_recv_rtp (GstPad * pad, GstBuffer * buffer)
|
|||
static GstFlowReturn
|
||||
gst_rtp_session_event_recv_rtcp_sink (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
GstRTPSession *rtpsession;
|
||||
GstRTPSessionPrivate *priv;
|
||||
GstRtpSession *rtpsession;
|
||||
GstRtpSessionPrivate *priv;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
||||
|
@ -928,8 +928,8 @@ gst_rtp_session_event_recv_rtcp_sink (GstPad * pad, GstEvent * event)
|
|||
static GstFlowReturn
|
||||
gst_rtp_session_chain_recv_rtcp (GstPad * pad, GstBuffer * buffer)
|
||||
{
|
||||
GstRTPSession *rtpsession;
|
||||
GstRTPSessionPrivate *priv;
|
||||
GstRtpSession *rtpsession;
|
||||
GstRtpSessionPrivate *priv;
|
||||
GstFlowReturn ret;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
||||
|
@ -947,8 +947,8 @@ gst_rtp_session_chain_recv_rtcp (GstPad * pad, GstBuffer * buffer)
|
|||
static GstFlowReturn
|
||||
gst_rtp_session_event_send_rtp_sink (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
GstRTPSession *rtpsession;
|
||||
GstRTPSessionPrivate *priv;
|
||||
GstRtpSession *rtpsession;
|
||||
GstRtpSessionPrivate *priv;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
||||
|
@ -972,8 +972,8 @@ gst_rtp_session_event_send_rtp_sink (GstPad * pad, GstEvent * event)
|
|||
static GstFlowReturn
|
||||
gst_rtp_session_chain_send_rtp (GstPad * pad, GstBuffer * buffer)
|
||||
{
|
||||
GstRTPSession *rtpsession;
|
||||
GstRTPSessionPrivate *priv;
|
||||
GstRtpSession *rtpsession;
|
||||
GstRtpSessionPrivate *priv;
|
||||
GstFlowReturn ret;
|
||||
|
||||
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
||||
|
@ -993,7 +993,7 @@ gst_rtp_session_chain_send_rtp (GstPad * pad, GstBuffer * buffer)
|
|||
* srcpad for the RTP packets.
|
||||
*/
|
||||
static GstPad *
|
||||
create_recv_rtp_sink (GstRTPSession * rtpsession)
|
||||
create_recv_rtp_sink (GstRtpSession * rtpsession)
|
||||
{
|
||||
GST_DEBUG_OBJECT (rtpsession, "creating RTP sink pad");
|
||||
|
||||
|
@ -1022,7 +1022,7 @@ create_recv_rtp_sink (GstRTPSession * rtpsession)
|
|||
* sync_src pad for the SR packets.
|
||||
*/
|
||||
static GstPad *
|
||||
create_recv_rtcp_sink (GstRTPSession * rtpsession)
|
||||
create_recv_rtcp_sink (GstRtpSession * rtpsession)
|
||||
{
|
||||
GST_DEBUG_OBJECT (rtpsession, "creating RTCP sink pad");
|
||||
|
||||
|
@ -1051,7 +1051,7 @@ create_recv_rtcp_sink (GstRTPSession * rtpsession)
|
|||
* send_rtp_src pad.
|
||||
*/
|
||||
static GstPad *
|
||||
create_send_rtp_sink (GstRTPSession * rtpsession)
|
||||
create_send_rtp_sink (GstRtpSession * rtpsession)
|
||||
{
|
||||
GST_DEBUG_OBJECT (rtpsession, "creating pad");
|
||||
|
||||
|
@ -1080,7 +1080,7 @@ create_send_rtp_sink (GstRTPSession * rtpsession)
|
|||
* RTCP packets.
|
||||
*/
|
||||
static GstPad *
|
||||
create_send_rtcp_src (GstRTPSession * rtpsession)
|
||||
create_send_rtcp_src (GstRtpSession * rtpsession)
|
||||
{
|
||||
GST_DEBUG_OBJECT (rtpsession, "creating pad");
|
||||
|
||||
|
@ -1098,7 +1098,7 @@ static GstPad *
|
|||
gst_rtp_session_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name)
|
||||
{
|
||||
GstRTPSession *rtpsession;
|
||||
GstRtpSession *rtpsession;
|
||||
GstElementClass *klass;
|
||||
GstPad *result;
|
||||
|
||||
|
|
|
@ -25,20 +25,20 @@
|
|||
#define GST_TYPE_RTP_SESSION \
|
||||
(gst_rtp_session_get_type())
|
||||
#define GST_RTP_SESSION(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_SESSION,GstRTPSession))
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_SESSION,GstRtpSession))
|
||||
#define GST_RTP_SESSION_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_SESSION,GstRTPSessionClass))
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_SESSION,GstRtpSessionClass))
|
||||
#define GST_IS_RTP_SESSION(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_SESSION))
|
||||
#define GST_IS_RTP_SESSION_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_SESSION))
|
||||
#define GST_RTP_SESSION_CAST(obj) ((GstRTPSession *)(obj))
|
||||
#define GST_RTP_SESSION_CAST(obj) ((GstRtpSession *)(obj))
|
||||
|
||||
typedef struct _GstRTPSession GstRTPSession;
|
||||
typedef struct _GstRTPSessionClass GstRTPSessionClass;
|
||||
typedef struct _GstRTPSessionPrivate GstRTPSessionPrivate;
|
||||
typedef struct _GstRtpSession GstRtpSession;
|
||||
typedef struct _GstRtpSessionClass GstRtpSessionClass;
|
||||
typedef struct _GstRtpSessionPrivate GstRtpSessionPrivate;
|
||||
|
||||
struct _GstRTPSession {
|
||||
struct _GstRtpSession {
|
||||
GstElement element;
|
||||
|
||||
/*< private >*/
|
||||
|
@ -51,22 +51,22 @@ struct _GstRTPSession {
|
|||
GstPad *send_rtp_src;
|
||||
GstPad *send_rtcp_src;
|
||||
|
||||
GstRTPSessionPrivate *priv;
|
||||
GstRtpSessionPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GstRTPSessionClass {
|
||||
struct _GstRtpSessionClass {
|
||||
GstElementClass parent_class;
|
||||
|
||||
/* signals */
|
||||
GstCaps* (*request_pt_map) (GstRTPSession *sess, guint pt);
|
||||
void (*clear_pt_map) (GstRTPSession *sess);
|
||||
GstCaps* (*request_pt_map) (GstRtpSession *sess, guint pt);
|
||||
void (*clear_pt_map) (GstRtpSession *sess);
|
||||
|
||||
void (*on_new_ssrc) (GstRTPSession *sess, guint32 ssrc);
|
||||
void (*on_ssrc_collision) (GstRTPSession *sess, guint32 ssrc);
|
||||
void (*on_ssrc_validated) (GstRTPSession *sess, guint32 ssrc);
|
||||
void (*on_bye_ssrc) (GstRTPSession *sess, guint32 ssrc);
|
||||
void (*on_bye_timeout) (GstRTPSession *sess, guint32 ssrc);
|
||||
void (*on_timeout) (GstRTPSession *sess, guint32 ssrc);
|
||||
void (*on_new_ssrc) (GstRtpSession *sess, guint32 ssrc);
|
||||
void (*on_ssrc_collision) (GstRtpSession *sess, guint32 ssrc);
|
||||
void (*on_ssrc_validated) (GstRtpSession *sess, guint32 ssrc);
|
||||
void (*on_bye_ssrc) (GstRtpSession *sess, guint32 ssrc);
|
||||
void (*on_bye_timeout) (GstRtpSession *sess, guint32 ssrc);
|
||||
void (*on_timeout) (GstRtpSession *sess, guint32 ssrc);
|
||||
};
|
||||
|
||||
GType gst_rtp_session_get_type (void);
|
||||
|
|
|
@ -88,7 +88,7 @@ enum
|
|||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
GST_BOILERPLATE (GstRTPSsrcDemux, gst_rtp_ssrc_demux, GstElement,
|
||||
GST_BOILERPLATE (GstRtpSsrcDemux, gst_rtp_ssrc_demux, GstElement,
|
||||
GST_TYPE_ELEMENT);
|
||||
|
||||
|
||||
|
@ -111,7 +111,7 @@ static guint gst_rtp_ssrc_demux_signals[LAST_SIGNAL] = { 0 };
|
|||
/**
|
||||
* Item for storing GstPad <-> SSRC pairs.
|
||||
*/
|
||||
struct _GstRTPSsrcDemuxPad
|
||||
struct _GstRtpSsrcDemuxPad
|
||||
{
|
||||
GstPad *pad;
|
||||
guint32 ssrc;
|
||||
|
@ -121,12 +121,12 @@ struct _GstRTPSsrcDemuxPad
|
|||
/* find a src pad for a given SSRC, returns NULL if the SSRC was not found
|
||||
*/
|
||||
static GstPad *
|
||||
find_rtp_pad_for_ssrc (GstRTPSsrcDemux * demux, guint32 ssrc)
|
||||
find_rtp_pad_for_ssrc (GstRtpSsrcDemux * demux, guint32 ssrc)
|
||||
{
|
||||
GSList *walk;
|
||||
|
||||
for (walk = demux->rtp_srcpads; walk; walk = g_slist_next (walk)) {
|
||||
GstRTPSsrcDemuxPad *pad = (GstRTPSsrcDemuxPad *) walk->data;
|
||||
GstRtpSsrcDemuxPad *pad = (GstRtpSsrcDemuxPad *) walk->data;
|
||||
|
||||
if (pad->ssrc == ssrc)
|
||||
return pad->pad;
|
||||
|
@ -135,13 +135,13 @@ find_rtp_pad_for_ssrc (GstRTPSsrcDemux * demux, guint32 ssrc)
|
|||
}
|
||||
|
||||
static GstPad *
|
||||
create_rtp_pad_for_ssrc (GstRTPSsrcDemux * demux, guint32 ssrc)
|
||||
create_rtp_pad_for_ssrc (GstRtpSsrcDemux * demux, guint32 ssrc)
|
||||
{
|
||||
GstPad *result;
|
||||
GstElementClass *klass;
|
||||
GstPadTemplate *templ;
|
||||
gchar *padname;
|
||||
GstRTPSsrcDemuxPad *demuxpad;
|
||||
GstRtpSsrcDemuxPad *demuxpad;
|
||||
|
||||
klass = GST_ELEMENT_GET_CLASS (demux);
|
||||
templ = gst_element_class_get_pad_template (klass, "src_%d");
|
||||
|
@ -150,7 +150,7 @@ create_rtp_pad_for_ssrc (GstRTPSsrcDemux * demux, guint32 ssrc)
|
|||
g_free (padname);
|
||||
|
||||
/* wrap in structure and add to list */
|
||||
demuxpad = g_new0 (GstRTPSsrcDemuxPad, 1);
|
||||
demuxpad = g_new0 (GstRtpSsrcDemuxPad, 1);
|
||||
demuxpad->ssrc = ssrc;
|
||||
demuxpad->pad = result;
|
||||
demux->rtp_srcpads = g_slist_prepend (demux->rtp_srcpads, demuxpad);
|
||||
|
@ -182,7 +182,7 @@ gst_rtp_ssrc_demux_base_init (gpointer g_class)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_ssrc_demux_class_init (GstRTPSsrcDemuxClass * klass)
|
||||
gst_rtp_ssrc_demux_class_init (GstRtpSsrcDemuxClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_klass;
|
||||
GstElementClass *gstelement_klass;
|
||||
|
@ -193,7 +193,7 @@ gst_rtp_ssrc_demux_class_init (GstRTPSsrcDemuxClass * klass)
|
|||
gobject_klass->finalize = GST_DEBUG_FUNCPTR (gst_rtp_ssrc_demux_finalize);
|
||||
|
||||
/**
|
||||
* GstRTPSsrcDemux::new-ssrc-pad:
|
||||
* GstRtpSsrcDemux::new-ssrc-pad:
|
||||
* @demux: the object which received the signal
|
||||
* @ssrc: the SSRC of the pad
|
||||
* @pad: the new pad.
|
||||
|
@ -203,7 +203,7 @@ gst_rtp_ssrc_demux_class_init (GstRTPSsrcDemuxClass * klass)
|
|||
gst_rtp_ssrc_demux_signals[SIGNAL_NEW_SSRC_PAD] =
|
||||
g_signal_new ("new-ssrc-pad",
|
||||
G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstRTPSsrcDemuxClass, new_ssrc_pad),
|
||||
G_STRUCT_OFFSET (GstRtpSsrcDemuxClass, new_ssrc_pad),
|
||||
NULL, NULL, gst_rtp_bin_marshal_VOID__UINT_OBJECT,
|
||||
G_TYPE_NONE, 2, G_TYPE_UINT, GST_TYPE_PAD);
|
||||
|
||||
|
@ -215,8 +215,8 @@ gst_rtp_ssrc_demux_class_init (GstRTPSsrcDemuxClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_rtp_ssrc_demux_init (GstRTPSsrcDemux * demux,
|
||||
GstRTPSsrcDemuxClass * g_class)
|
||||
gst_rtp_ssrc_demux_init (GstRtpSsrcDemux * demux,
|
||||
GstRtpSsrcDemuxClass * g_class)
|
||||
{
|
||||
GstElementClass *klass = GST_ELEMENT_GET_CLASS (demux);
|
||||
|
||||
|
@ -231,7 +231,7 @@ gst_rtp_ssrc_demux_init (GstRTPSsrcDemux * demux,
|
|||
static void
|
||||
gst_rtp_ssrc_demux_finalize (GObject * object)
|
||||
{
|
||||
GstRTPSsrcDemux *demux;
|
||||
GstRtpSsrcDemux *demux;
|
||||
|
||||
demux = GST_RTP_SSRC_DEMUX (object);
|
||||
|
||||
|
@ -241,7 +241,7 @@ gst_rtp_ssrc_demux_finalize (GObject * object)
|
|||
static gboolean
|
||||
gst_rtp_ssrc_demux_sink_event (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
GstRTPSsrcDemux *demux;
|
||||
GstRtpSsrcDemux *demux;
|
||||
gboolean res = FALSE;
|
||||
|
||||
demux = GST_RTP_SSRC_DEMUX (gst_pad_get_parent (pad));
|
||||
|
@ -261,7 +261,7 @@ static GstFlowReturn
|
|||
gst_rtp_ssrc_demux_chain (GstPad * pad, GstBuffer * buf)
|
||||
{
|
||||
GstFlowReturn ret;
|
||||
GstRTPSsrcDemux *demux;
|
||||
GstRtpSsrcDemux *demux;
|
||||
guint32 ssrc;
|
||||
GstPad *srcpad;
|
||||
|
||||
|
@ -309,7 +309,7 @@ create_failed:
|
|||
static gboolean
|
||||
gst_rtp_ssrc_demux_src_event (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
GstRTPSsrcDemux *demux;
|
||||
GstRtpSsrcDemux *demux;
|
||||
gboolean res = FALSE;
|
||||
|
||||
demux = GST_RTP_SSRC_DEMUX (gst_pad_get_parent (pad));
|
||||
|
@ -329,7 +329,7 @@ gst_rtp_ssrc_demux_change_state (GstElement * element,
|
|||
GstStateChange transition)
|
||||
{
|
||||
GstStateChangeReturn ret;
|
||||
GstRTPSsrcDemux *demux;
|
||||
GstRtpSsrcDemux *demux;
|
||||
|
||||
demux = GST_RTP_SSRC_DEMUX (element);
|
||||
|
||||
|
|
|
@ -23,16 +23,16 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
#define GST_TYPE_RTP_SSRC_DEMUX (gst_rtp_ssrc_demux_get_type())
|
||||
#define GST_RTP_SSRC_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_SSRC_DEMUX,GstRTPSsrcDemux))
|
||||
#define GST_RTP_SSRC_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_SSRC_DEMUX,GstRTPSsrcDemuxClass))
|
||||
#define GST_RTP_SSRC_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_SSRC_DEMUX,GstRtpSsrcDemux))
|
||||
#define GST_RTP_SSRC_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_SSRC_DEMUX,GstRtpSsrcDemuxClass))
|
||||
#define GST_IS_RTP_SSRC_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_SSRC_DEMUX))
|
||||
#define GST_IS_RTP_SSRC_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_SSRC_DEMUX))
|
||||
|
||||
typedef struct _GstRTPSsrcDemux GstRTPSsrcDemux;
|
||||
typedef struct _GstRTPSsrcDemuxClass GstRTPSsrcDemuxClass;
|
||||
typedef struct _GstRTPSsrcDemuxPad GstRTPSsrcDemuxPad;
|
||||
typedef struct _GstRtpSsrcDemux GstRtpSsrcDemux;
|
||||
typedef struct _GstRtpSsrcDemuxClass GstRtpSsrcDemuxClass;
|
||||
typedef struct _GstRtpSsrcDemuxPad GstRtpSsrcDemuxPad;
|
||||
|
||||
struct _GstRTPSsrcDemux
|
||||
struct _GstRtpSsrcDemux
|
||||
{
|
||||
GstElement parent;
|
||||
|
||||
|
@ -40,7 +40,7 @@ struct _GstRTPSsrcDemux
|
|||
GSList *rtp_srcpads;
|
||||
};
|
||||
|
||||
struct _GstRTPSsrcDemuxClass
|
||||
struct _GstRtpSsrcDemuxClass
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
|
||||
|
|
Loading…
Reference in a new issue