diff options
-rw-r--r-- | gst/rtsp-server/rtsp-session-media.c | 24 | ||||
-rw-r--r-- | gst/rtsp-server/rtsp-session-media.h | 3 |
2 files changed, 27 insertions, 0 deletions
diff --git a/gst/rtsp-server/rtsp-session-media.c b/gst/rtsp-server/rtsp-session-media.c index 0fffbca..96ad1b6 100644 --- a/gst/rtsp-server/rtsp-session-media.c +++ b/gst/rtsp-server/rtsp-session-media.c @@ -408,6 +408,30 @@ gst_rtsp_session_media_get_transport (GstRTSPSessionMedia * media, guint idx) } /** + * 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 * @range: (out): a #GstRTSPRange diff --git a/gst/rtsp-server/rtsp-session-media.h b/gst/rtsp-server/rtsp-session-media.h index 612173b..2a6fe2a 100644 --- a/gst/rtsp-server/rtsp-session-media.h +++ b/gst/rtsp-server/rtsp-session-media.h @@ -103,6 +103,9 @@ GstRTSPStreamTransport * gst_rtsp_session_media_get_transport (GstRTSPSessionMe 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); |