introspection: add (nullable) annotations to return values
authorEvan Nemerson <evan@nemerson.com>
Wed, 11 Jun 2014 23:38:36 +0000 (16:38 -0700)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 26 Jun 2014 17:08:16 +0000 (19:08 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=730952

gst/rtsp-server/rtsp-address-pool.c
gst/rtsp-server/rtsp-media.c
gst/rtsp-server/rtsp-session-media.c
gst/rtsp-server/rtsp-session-pool.c
gst/rtsp-server/rtsp-stream-transport.c
gst/rtsp-server/rtsp-stream.c
gst/rtsp-server/rtsp-token.c

index 92f4c42..1343839 100644 (file)
@@ -423,8 +423,9 @@ split_range (GstRTSPAddressPool * pool, AddrRange * range, guint skip_addr,
  * allocation. @n_ports consecutive ports will be allocated of which the first
  * one can be found in @port.
  *
- * Returns: a #GstRTSPAddress that should be freed with gst_rtsp_address_free
- * after use or %NULL when no address could be acquired.
+ * Returns: (nullable): a #GstRTSPAddress that should be freed with
+ * gst_rtsp_address_free after use or %NULL when no address could be
+ * acquired.
  */
 GstRTSPAddress *
 gst_rtsp_address_pool_acquire_address (GstRTSPAddressPool * pool,
index 1d01b4e..c76fece 100644 (file)
@@ -1323,8 +1323,8 @@ gst_rtsp_media_n_streams (GstRTSPMedia * media)
  *
  * Retrieve the stream with index @idx from @media.
  *
- * Returns: (transfer none): the #GstRTSPStream at index @idx or %NULL when a stream with
- * that index did not exist.
+ * Returns: (nullable) (transfer none): the #GstRTSPStream at index
+ * @idx or %NULL when a stream with that index did not exist.
  */
 GstRTSPStream *
 gst_rtsp_media_get_stream (GstRTSPMedia * media, guint idx)
@@ -1353,8 +1353,9 @@ gst_rtsp_media_get_stream (GstRTSPMedia * media, guint idx)
  *
  * Find a stream in @media with @control as the control uri.
  *
- * Returns: (transfer none): the #GstRTSPStream with control uri @control
- * or %NULL when a stream with that control did not exist.
+ * Returns: (nullable) (transfer none): the #GstRTSPStream with
+ * control uri @control or %NULL when a stream with that control did
+ * not exist.
  */
 GstRTSPStream *
 gst_rtsp_media_find_stream (GstRTSPMedia * media, const gchar * control)
index 79004f0..8eb1f28 100644 (file)
@@ -239,8 +239,8 @@ gst_rtsp_session_media_get_base_time (GstRTSPSessionMedia * media)
  * Retrieve the RTP-Info header string for all streams in @media
  * with configured transports.
  *
- * Returns: (transfer full): The RTP-Info as a string or %NULL when
- * no RTP-Info could be generated, g_free() after usage.
+ * Returns: (transfer full) (nullable): 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)
index 5111eaa..62e7a56 100644 (file)
@@ -266,8 +266,8 @@ gst_rtsp_session_pool_get_n_sessions (GstRTSPSessionPool * pool)
  * Find the session with @sessionid in @pool. The access time of the session
  * will be updated with gst_rtsp_session_touch().
  *
- * Returns: (transfer full): the #GstRTSPSession with @sessionid or %NULL when the session did
- * not exist. g_object_unref() after usage.
+ * Returns: (transfer full) (nullable): the #GstRTSPSession with @sessionid
+ * or %NULL when the session did not exist. g_object_unref() after usage.
  */
 GstRTSPSession *
 gst_rtsp_session_pool_find (GstRTSPSessionPool * pool, const gchar * sessionid)
index cd16626..a99295b 100644 (file)
@@ -317,8 +317,9 @@ gst_rtsp_stream_transport_get_url (GstRTSPStreamTransport * trans)
  *
  * Get the RTP-Info string for @trans and @start_time.
  *
- * Returns: (transfer full): the RTPInfo string for @trans and @start_time or
- * %NULL when the RTP-Info could not be determined. g_free() after usage.
+ * Returns: (transfer full) (nullable): 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,
index 074f226..7f12e13 100644 (file)
@@ -804,8 +804,9 @@ gst_rtsp_stream_get_address_pool (GstRTSPStream * stream)
  *
  * Get the multicast address of @stream for @family.
  *
- * Returns: (transfer full): the #GstRTSPAddress of @stream or %NULL when no
- * address could be allocated. gst_rtsp_address_free() after usage.
+ * Returns: (transfer full) (nullable): the #GstRTSPAddress of @stream
+ * or %NULL when no address could be allocated. gst_rtsp_address_free()
+ * after usage.
  */
 GstRTSPAddress *
 gst_rtsp_stream_get_multicast_address (GstRTSPStream * stream,
@@ -869,8 +870,8 @@ no_address:
  *
  * Reserve @address and @port as the address and port of @stream.
  *
- * Returns: the #GstRTSPAddress of @stream or %NULL when the address could be
- * reserved. gst_rtsp_address_free() after usage.
+ * Returns: (nullable): the #GstRTSPAddress of @stream or %NULL when
+ * the address could be reserved. gst_rtsp_address_free() after usage.
  */
 GstRTSPAddress *
 gst_rtsp_stream_reserve_address (GstRTSPStream * stream,
@@ -2406,8 +2407,8 @@ gst_rtsp_stream_update_crypto (GstRTSPStream * stream,
  *
  * @stream must be joined to a bin.
  *
- * Returns: (transfer full): the RTP socket or %NULL if no socket could be
- * allocated for @family. Unref after usage
+ * Returns: (transfer full) (nullable): the RTP socket or %NULL if no
+ * socket could be allocated for @family. Unref after usage
  */
 GSocket *
 gst_rtsp_stream_get_rtp_socket (GstRTSPStream * stream, GSocketFamily family)
@@ -2440,8 +2441,8 @@ gst_rtsp_stream_get_rtp_socket (GstRTSPStream * stream, GSocketFamily family)
  *
  * @stream must be joined to a bin.
  *
- * Returns: (transfer full): the RTCP socket or %NULL if no socket could be
- * allocated for @family. Unref after usage
+ * Returns: (transfer full) (nullable): the RTCP socket or %NULL if no
+ * socket could be allocated for @family. Unref after usage
  */
 GSocket *
 gst_rtsp_stream_get_rtcp_socket (GstRTSPStream * stream, GSocketFamily family)
index da9e8d9..69250f9 100644 (file)
@@ -216,9 +216,9 @@ gst_rtsp_token_writable_structure (GstRTSPToken * token)
  *
  * Get the string value of @field in @token.
  *
- * Returns: (transfer none): the string value of @field in @token or %NULL when
- * @field is not defined in @token. The string becomes invalid when you free
- * @token.
+ * Returns: (transfer none) (nullable): the string value of @field in
+ * @token or %NULL when @field is not defined in @token. The string
+ * becomes invalid when you free @token.
  */
 const gchar *
 gst_rtsp_token_get_string (GstRTSPToken * token, const gchar * field)