* Retrieve the RTP-Info header string for all streams in @media
* with configured transports.
*
- * Returns: (transfer full): The RTP-Info as a string, g_free()
- * after usage.
+ * Returns: (transfer full): The RTP-Info as a string or %NULL when
+ * no RTP-Info could be generated, g_free() after usage.
*/
gchar *
gst_rtsp_session_media_get_rtpinfo (GstRTSPSessionMedia * media)
stream_rtpinfo =
gst_rtsp_stream_transport_get_rtpinfo (transport, earliest);
- if (stream_rtpinfo == NULL)
- goto stream_rtpinfo_missing;
+ if (stream_rtpinfo == NULL) {
+ GST_DEBUG_OBJECT (media, "ignoring unknown RTPInfo %d", i);
+ continue;
+ }
if (rtpinfo == NULL)
rtpinfo = g_string_new ("");
g_string_append (rtpinfo, stream_rtpinfo);
g_free (stream_rtpinfo);
}
+ g_mutex_unlock (&priv->lock);
if (rtpinfo == NULL) {
- GST_INFO_OBJECT (media, "no transports configured, RTP info is empty");
- rtpinfo = g_string_new ("");
+ GST_WARNING_OBJECT (media, "RTP info is empty");
+ return NULL;
}
-
- g_mutex_unlock (&priv->lock);
-
return g_string_free (rtpinfo, FALSE);
/* ERRORS */
GST_ERROR_OBJECT (media, "media was not prepared");
return NULL;
}
-stream_rtpinfo_missing:
- {
- g_mutex_unlock (&priv->lock);
- if (rtpinfo)
- g_string_free (rtpinfo, TRUE);
- GST_ERROR_OBJECT (media, "could not get stream %d rtpinfo", i);
- return NULL;
- }
}
/**
* @trans: a #GstRTSPStreamTransport
* @start_time: a star time
*
- * Get the RTPInfo string for @trans and @start_time.
+ * Get the RTP-Info string for @trans and @start_time.
*
- * Returns: the RTPInfo string for @trans and @start_time. g_free() after
- * usage.
+ * Returns: the RTPInfo string for @trans and @start_time or %NULL when
+ * the RTP-Info could not be determined. g_free() after usage.
*/
gchar *
gst_rtsp_stream_transport_get_rtpinfo (GstRTSPStreamTransport * trans,