mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtsp-session-media: add function to get a list of transports
Change-Id: I817e10624da0f3200f24d1b232cff481099278e3 https://bugzilla.gnome.org/show_bug.cgi?id=788340
This commit is contained in:
parent
51d670f73b
commit
5ec1b80989
2 changed files with 27 additions and 0 deletions
|
@ -407,6 +407,30 @@ gst_rtsp_session_media_get_transport (GstRTSPSessionMedia * media, guint idx)
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_rtsp_session_media_get_transports:
|
||||
* @media: a #GstRTSPSessionMedia
|
||||
*
|
||||
* Get a list of all available #GstRTSPStreamTransport in this session.
|
||||
*
|
||||
* Returns: (transfer full): a list of #GstRTSPStreamTransport,
|
||||
* g_ptr_array_unref () after usage.
|
||||
*/
|
||||
GPtrArray *
|
||||
gst_rtsp_session_media_get_transports (GstRTSPSessionMedia * media)
|
||||
{
|
||||
GstRTSPSessionMediaPrivate *priv;
|
||||
GPtrArray *result;
|
||||
|
||||
g_return_val_if_fail (GST_IS_RTSP_SESSION_MEDIA (media), NULL);
|
||||
priv = media->priv;
|
||||
|
||||
g_mutex_lock (&priv->lock);
|
||||
result = g_ptr_array_ref (priv->transports);
|
||||
g_mutex_unlock (&priv->lock);
|
||||
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* gst_rtsp_session_media_alloc_channels:
|
||||
* @media: a #GstRTSPSessionMedia
|
||||
|
|
|
@ -102,6 +102,9 @@ GST_EXPORT
|
|||
GstRTSPStreamTransport * gst_rtsp_session_media_get_transport (GstRTSPSessionMedia *media,
|
||||
guint idx);
|
||||
|
||||
GST_EXPORT
|
||||
GPtrArray * gst_rtsp_session_media_get_transports (GstRTSPSessionMedia *media);
|
||||
|
||||
GST_EXPORT
|
||||
gboolean gst_rtsp_session_media_alloc_channels (GstRTSPSessionMedia *media,
|
||||
GstRTSPRange *range);
|
||||
|
|
Loading…
Reference in a new issue