summaryrefslogtreecommitdiff
path: root/gst/rtsp-server/rtsp-stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/rtsp-server/rtsp-stream.c')
-rw-r--r--gst/rtsp-server/rtsp-stream.c44
1 files changed, 25 insertions, 19 deletions
diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c
index b62c437..4b2cca8 100644
--- a/gst/rtsp-server/rtsp-stream.c
+++ b/gst/rtsp-server/rtsp-stream.c
@@ -424,7 +424,7 @@ gst_rtsp_stream_get_pt (GstRTSPStream * stream)
*
* Get the srcpad associated with @stream.
*
- * Returns: (transfer full): the srcpad. Unref after usage.
+ * Returns: (transfer full) (nullable): the srcpad. Unref after usage.
*/
GstPad *
gst_rtsp_stream_get_srcpad (GstRTSPStream * stream)
@@ -443,7 +443,7 @@ gst_rtsp_stream_get_srcpad (GstRTSPStream * stream)
*
* Get the sinkpad associated with @stream.
*
- * Returns: (transfer full): the sinkpad. Unref after usage.
+ * Returns: (transfer full) (nullable): the sinkpad. Unref after usage.
*/
GstPad *
gst_rtsp_stream_get_sinkpad (GstRTSPStream * stream)
@@ -462,7 +462,7 @@ gst_rtsp_stream_get_sinkpad (GstRTSPStream * stream)
*
* Get the control string to identify this stream.
*
- * Returns: (transfer full): the control string. g_free() after usage.
+ * Returns: (transfer full) (nullable): the control string. g_free() after usage.
*/
gchar *
gst_rtsp_stream_get_control (GstRTSPStream * stream)
@@ -485,7 +485,7 @@ gst_rtsp_stream_get_control (GstRTSPStream * stream)
/**
* gst_rtsp_stream_set_control:
* @stream: a #GstRTSPStream
- * @control: a control string
+ * @control: (nullable): a control string
*
* Set the control string in @stream.
*/
@@ -507,7 +507,7 @@ gst_rtsp_stream_set_control (GstRTSPStream * stream, const gchar * control)
/**
* gst_rtsp_stream_has_control:
* @stream: a #GstRTSPStream
- * @control: a control string
+ * @control: (nullable): a control string
*
* Check if @stream has the control string @control.
*
@@ -664,6 +664,7 @@ gst_rtsp_stream_is_transport_supported (GstRTSPStream * stream,
GstRTSPStreamPrivate *priv;
g_return_val_if_fail (GST_IS_RTSP_STREAM (stream), FALSE);
+ g_return_val_if_fail (transport != NULL, FALSE);
priv = stream->priv;
@@ -799,7 +800,7 @@ gst_rtsp_stream_get_protocols (GstRTSPStream * stream)
/**
* gst_rtsp_stream_set_address_pool:
* @stream: a #GstRTSPStream
- * @pool: (transfer none): a #GstRTSPAddressPool
+ * @pool: (transfer none) (nullable): a #GstRTSPAddressPool
*
* configure @pool to be used as the address pool of @stream.
*/
@@ -833,8 +834,8 @@ gst_rtsp_stream_set_address_pool (GstRTSPStream * stream,
*
* Get the #GstRTSPAddressPool used as the address pool of @stream.
*
- * Returns: (transfer full): the #GstRTSPAddressPool of @stream. g_object_unref() after
- * usage.
+ * Returns: (transfer full) (nullable): the #GstRTSPAddressPool of @stream.
+ * g_object_unref() after usage.
*/
GstRTSPAddressPool *
gst_rtsp_stream_get_address_pool (GstRTSPStream * stream)
@@ -857,7 +858,7 @@ gst_rtsp_stream_get_address_pool (GstRTSPStream * stream)
/**
* gst_rtsp_stream_set_multicast_iface:
* @stream: a #GstRTSPStream
- * @multicast_iface: (transfer none): a multicast interface name
+ * @multicast_iface: (transfer none) (nullable): a multicast interface name
*
* configure @multicast_iface to be used for @stream.
*/
@@ -892,8 +893,8 @@ gst_rtsp_stream_set_multicast_iface (GstRTSPStream * stream,
*
* Get the multicast interface used for @stream.
*
- * Returns: (transfer full): the multicast interface for @stream. g_free() after
- * usage.
+ * Returns: (transfer full) (nullable): the multicast interface for @stream.
+ * g_free() after usage.
*/
gchar *
gst_rtsp_stream_get_multicast_iface (GstRTSPStream * stream)
@@ -2181,7 +2182,7 @@ request_rtp_rtcp_decoder (GstElement * rtpbin, guint session,
*
* Creating a rtxsend bin
*
- * Returns: (transfer full): a #GstElement.
+ * Returns: (transfer full) (nullable): a #GstElement.
*
* Since: 1.6
*/
@@ -2241,6 +2242,9 @@ gst_rtsp_stream_set_pt_map (GstRTSPStream * stream, guint pt, GstCaps * caps)
{
GstRTSPStreamPrivate *priv = stream->priv;
+ if (!GST_IS_CAPS (caps))
+ return;
+
g_mutex_lock (&priv->lock);
g_hash_table_insert (priv->ptmap, GINT_TO_POINTER (pt), gst_caps_ref (caps));
g_mutex_unlock (&priv->lock);
@@ -2959,7 +2963,7 @@ wrong_bin:
*
* Get the previous joined bin with gst_rtsp_stream_join_bin() or NULL.
*
- * Return: (transfer full): the joined bin or NULL.
+ * Return: (transfer full) (nullable): the joined bin or NULL.
*/
GstBin *
gst_rtsp_stream_get_joined_bin (GstRTSPStream * stream)
@@ -2981,10 +2985,10 @@ gst_rtsp_stream_get_joined_bin (GstRTSPStream * stream)
/**
* gst_rtsp_stream_get_rtpinfo:
* @stream: a #GstRTSPStream
- * @rtptime: (allow-none): result RTP timestamp
- * @seq: (allow-none): result RTP seqnum
- * @clock_rate: (allow-none): the clock rate
- * @running_time: result running-time
+ * @rtptime: (allow-none) (out caller-allocates): result RTP timestamp
+ * @seq: (allow-none) (out caller-allocates): result RTP seqnum
+ * @clock_rate: (allow-none) (out caller-allocates): the clock rate
+ * @running_time: (out caller-allocates): result running-time
*
* Retrieve the current rtptime, seq and running-time. This is used to
* construct a RTPInfo reply header.
@@ -3134,8 +3138,8 @@ no_stats:
*
* Retrieve the current caps of @stream.
*
- * Returns: (transfer full): the #GstCaps of @stream. use gst_caps_unref()
- * after usage.
+ * Returns: (transfer full) (nullable): the #GstCaps of @stream.
+ * use gst_caps_unref() after usage.
*/
GstCaps *
gst_rtsp_stream_get_caps (GstRTSPStream * stream)
@@ -3776,6 +3780,7 @@ gst_rtsp_stream_is_blocking (GstRTSPStream * stream)
/**
* gst_rtsp_stream_query_position:
* @stream: a #GstRTSPStream
+ * @position: (out): current position of a #GstRTSPStream
*
* Query the position of the stream in %GST_FORMAT_TIME. This only considers
* the RTP parts of the pipeline and not the RTCP parts.
@@ -3817,6 +3822,7 @@ gst_rtsp_stream_query_position (GstRTSPStream * stream, gint64 * position)
/**
* gst_rtsp_stream_query_stop:
* @stream: a #GstRTSPStream
+ * @stop: (out): current stop of a #GstRTSPStream
*
* Query the stop of the stream in %GST_FORMAT_TIME. This only considers
* the RTP parts of the pipeline and not the RTCP parts.