introspection: add (nullable) annotations to return values

https://bugzilla.gnome.org/show_bug.cgi?id=730952
This commit is contained in:
Evan Nemerson 2014-06-11 16:38:36 -07:00 committed by Sebastian Dröge
parent d08b46f4b7
commit 34e6ac3b9f
7 changed files with 27 additions and 23 deletions

View 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 * allocation. @n_ports consecutive ports will be allocated of which the first
* one can be found in @port. * one can be found in @port.
* *
* Returns: a #GstRTSPAddress that should be freed with gst_rtsp_address_free * Returns: (nullable): a #GstRTSPAddress that should be freed with
* after use or %NULL when no address could be acquired. * gst_rtsp_address_free after use or %NULL when no address could be
* acquired.
*/ */
GstRTSPAddress * GstRTSPAddress *
gst_rtsp_address_pool_acquire_address (GstRTSPAddressPool * pool, gst_rtsp_address_pool_acquire_address (GstRTSPAddressPool * pool,

View file

@ -1323,8 +1323,8 @@ gst_rtsp_media_n_streams (GstRTSPMedia * media)
* *
* Retrieve the stream with index @idx from @media. * Retrieve the stream with index @idx from @media.
* *
* Returns: (transfer none): the #GstRTSPStream at index @idx or %NULL when a stream with * Returns: (nullable) (transfer none): the #GstRTSPStream at index
* that index did not exist. * @idx or %NULL when a stream with that index did not exist.
*/ */
GstRTSPStream * GstRTSPStream *
gst_rtsp_media_get_stream (GstRTSPMedia * media, guint idx) 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. * Find a stream in @media with @control as the control uri.
* *
* Returns: (transfer none): the #GstRTSPStream with control uri @control * Returns: (nullable) (transfer none): the #GstRTSPStream with
* or %NULL when a stream with that control did not exist. * control uri @control or %NULL when a stream with that control did
* not exist.
*/ */
GstRTSPStream * GstRTSPStream *
gst_rtsp_media_find_stream (GstRTSPMedia * media, const gchar * control) gst_rtsp_media_find_stream (GstRTSPMedia * media, const gchar * control)

View 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 * Retrieve the RTP-Info header string for all streams in @media
* with configured transports. * with configured transports.
* *
* Returns: (transfer full): The RTP-Info as a string or %NULL when * Returns: (transfer full) (nullable): The RTP-Info as a string or
* no RTP-Info could be generated, g_free() after usage. * %NULL when no RTP-Info could be generated, g_free() after usage.
*/ */
gchar * gchar *
gst_rtsp_session_media_get_rtpinfo (GstRTSPSessionMedia * media) gst_rtsp_session_media_get_rtpinfo (GstRTSPSessionMedia * media)

View 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 * Find the session with @sessionid in @pool. The access time of the session
* will be updated with gst_rtsp_session_touch(). * will be updated with gst_rtsp_session_touch().
* *
* Returns: (transfer full): the #GstRTSPSession with @sessionid or %NULL when the session did * Returns: (transfer full) (nullable): the #GstRTSPSession with @sessionid
* not exist. g_object_unref() after usage. * or %NULL when the session did not exist. g_object_unref() after usage.
*/ */
GstRTSPSession * GstRTSPSession *
gst_rtsp_session_pool_find (GstRTSPSessionPool * pool, const gchar * sessionid) gst_rtsp_session_pool_find (GstRTSPSessionPool * pool, const gchar * sessionid)

View file

@ -317,8 +317,9 @@ gst_rtsp_stream_transport_get_url (GstRTSPStreamTransport * trans)
* *
* Get the RTP-Info string for @trans and @start_time. * Get the RTP-Info string for @trans and @start_time.
* *
* Returns: (transfer full): the RTPInfo string for @trans and @start_time or * Returns: (transfer full) (nullable): the RTPInfo string for @trans
* %NULL when the RTP-Info could not be determined. g_free() after usage. * and @start_time or %NULL when the RTP-Info could not be
* determined. g_free() after usage.
*/ */
gchar * gchar *
gst_rtsp_stream_transport_get_rtpinfo (GstRTSPStreamTransport * trans, gst_rtsp_stream_transport_get_rtpinfo (GstRTSPStreamTransport * trans,

View file

@ -804,8 +804,9 @@ gst_rtsp_stream_get_address_pool (GstRTSPStream * stream)
* *
* Get the multicast address of @stream for @family. * Get the multicast address of @stream for @family.
* *
* Returns: (transfer full): the #GstRTSPAddress of @stream or %NULL when no * Returns: (transfer full) (nullable): the #GstRTSPAddress of @stream
* address could be allocated. gst_rtsp_address_free() after usage. * or %NULL when no address could be allocated. gst_rtsp_address_free()
* after usage.
*/ */
GstRTSPAddress * GstRTSPAddress *
gst_rtsp_stream_get_multicast_address (GstRTSPStream * stream, 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. * Reserve @address and @port as the address and port of @stream.
* *
* Returns: the #GstRTSPAddress of @stream or %NULL when the address could be * Returns: (nullable): the #GstRTSPAddress of @stream or %NULL when
* reserved. gst_rtsp_address_free() after usage. * the address could be reserved. gst_rtsp_address_free() after usage.
*/ */
GstRTSPAddress * GstRTSPAddress *
gst_rtsp_stream_reserve_address (GstRTSPStream * stream, 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. * @stream must be joined to a bin.
* *
* Returns: (transfer full): the RTP socket or %NULL if no socket could be * Returns: (transfer full) (nullable): the RTP socket or %NULL if no
* allocated for @family. Unref after usage * socket could be allocated for @family. Unref after usage
*/ */
GSocket * GSocket *
gst_rtsp_stream_get_rtp_socket (GstRTSPStream * stream, GSocketFamily family) 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. * @stream must be joined to a bin.
* *
* Returns: (transfer full): the RTCP socket or %NULL if no socket could be * Returns: (transfer full) (nullable): the RTCP socket or %NULL if no
* allocated for @family. Unref after usage * socket could be allocated for @family. Unref after usage
*/ */
GSocket * GSocket *
gst_rtsp_stream_get_rtcp_socket (GstRTSPStream * stream, GSocketFamily family) gst_rtsp_stream_get_rtcp_socket (GstRTSPStream * stream, GSocketFamily family)

View file

@ -216,9 +216,9 @@ gst_rtsp_token_writable_structure (GstRTSPToken * token)
* *
* Get the string value of @field in @token. * Get the string value of @field in @token.
* *
* Returns: (transfer none): the string value of @field in @token or %NULL when * Returns: (transfer none) (nullable): the string value of @field in
* @field is not defined in @token. The string becomes invalid when you free * @token or %NULL when @field is not defined in @token. The string
* @token. * becomes invalid when you free @token.
*/ */
const gchar * const gchar *
gst_rtsp_token_get_string (GstRTSPToken * token, const gchar * field) gst_rtsp_token_get_string (GstRTSPToken * token, const gchar * field)