stream: add method to get the srcpad

This commit is contained in:
Ognyan Tonchev 2013-04-22 17:32:31 +02:00 committed by Wim Taymans
parent f15288259e
commit 00291e5285
2 changed files with 17 additions and 0 deletions

View file

@ -194,6 +194,22 @@ gst_rtsp_stream_get_index (GstRTSPStream * stream)
return stream->priv->idx; return stream->priv->idx;
} }
/**
* gst_rtsp_stream_get_srcpad:
* @stream: a #GstRTSPStream
*
* Get the srcpad associated with @stream.
*
* Return: the srcpad. Unref after usage.
*/
GstPad *
gst_rtsp_stream_get_srcpad (GstRTSPStream * stream)
{
g_return_val_if_fail (GST_IS_RTSP_STREAM (stream), NULL);
return gst_object_ref (stream->priv->srcpad);
}
/** /**
* gst_rtsp_stream_set_mtu: * gst_rtsp_stream_set_mtu:
* @stream: a #GstRTSPStream * @stream: a #GstRTSPStream

View file

@ -64,6 +64,7 @@ GType gst_rtsp_stream_get_type (void);
GstRTSPStream * gst_rtsp_stream_new (guint idx, GstElement *payloader, GstRTSPStream * gst_rtsp_stream_new (guint idx, GstElement *payloader,
GstPad *srcpad); GstPad *srcpad);
guint gst_rtsp_stream_get_index (GstRTSPStream *stream); guint gst_rtsp_stream_get_index (GstRTSPStream *stream);
GstPad * gst_rtsp_stream_get_srcpad (GstRTSPStream *stream);
void gst_rtsp_stream_set_mtu (GstRTSPStream *stream, guint mtu); void gst_rtsp_stream_set_mtu (GstRTSPStream *stream, guint mtu);
guint gst_rtsp_stream_get_mtu (GstRTSPStream *stream); guint gst_rtsp_stream_get_mtu (GstRTSPStream *stream);