summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2018-02-10 00:07:25 +0100
committerMathieu Duponchelle <mathieu@centricular.com>2018-02-12 19:20:23 +0100
commitc3ed1e697f6fd582b1779ccff18c65fbdf894faa (patch)
tree32df5080d5dd5fc15103441dd001420583320f31
parentac97ba7f3e187a916f69904a2fa821f466d444a3 (diff)
All around: add annotations and API guards
-rw-r--r--gst/rtsp-server/rtsp-auth.c6
-rw-r--r--gst/rtsp-server/rtsp-client.c20
-rw-r--r--gst/rtsp-server/rtsp-media-factory.c14
-rw-r--r--gst/rtsp-server/rtsp-media.c20
-rw-r--r--gst/rtsp-server/rtsp-mount-points.c2
-rw-r--r--gst/rtsp-server/rtsp-server.c22
-rw-r--r--gst/rtsp-server/rtsp-session-media.c8
-rw-r--r--gst/rtsp-server/rtsp-session-pool.c4
-rw-r--r--gst/rtsp-server/rtsp-session.c9
-rw-r--r--gst/rtsp-server/rtsp-stream-transport.c16
-rw-r--r--gst/rtsp-server/rtsp-stream.c44
-rw-r--r--gst/rtsp-server/rtsp-thread-pool.c3
12 files changed, 91 insertions, 77 deletions
diff --git a/gst/rtsp-server/rtsp-auth.c b/gst/rtsp-server/rtsp-auth.c
index 85758c4..cfad966 100644
--- a/gst/rtsp-server/rtsp-auth.c
+++ b/gst/rtsp-server/rtsp-auth.c
@@ -290,7 +290,7 @@ gst_rtsp_auth_set_tls_certificate (GstRTSPAuth * auth, GTlsCertificate * cert)
*
* Get the #GTlsCertificate used for negotiating TLS @auth.
*
- * Returns: (transfer full): the #GTlsCertificate of @auth. g_object_unref() after
+ * Returns: (transfer full) (nullable): the #GTlsCertificate of @auth. g_object_unref() after
* usage.
*/
GTlsCertificate *
@@ -350,7 +350,7 @@ gst_rtsp_auth_set_tls_database (GstRTSPAuth * auth, GTlsDatabase * database)
*
* Get the #GTlsDatabase used for verifying client certificate.
*
- * Returns: (transfer full): the #GTlsDatabase of @auth. g_object_unref() after
+ * Returns: (transfer full) (nullable): the #GTlsDatabase of @auth. g_object_unref() after
* usage.
* Since: 1.6
*/
@@ -460,7 +460,7 @@ gst_rtsp_auth_set_default_token (GstRTSPAuth * auth, GstRTSPToken * token)
* Get the default token for @auth. This token will be used for unauthenticated
* users.
*
- * Returns: (transfer full): the #GstRTSPToken of @auth. gst_rtsp_token_unref() after
+ * Returns: (transfer full) (nullable): the #GstRTSPToken of @auth. gst_rtsp_token_unref() after
* usage.
*/
GstRTSPToken *
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
index 52c543c..631add6 100644
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -3611,7 +3611,7 @@ invalid_length:
/**
* gst_rtsp_client_set_session_pool:
* @client: a #GstRTSPClient
- * @pool: (transfer none): a #GstRTSPSessionPool
+ * @pool: (transfer none) (nullable): a #GstRTSPSessionPool
*
* Set @pool as the sessionpool for @client which it will use to find
* or allocate sessions. the sessionpool is usually inherited from the server
@@ -3652,7 +3652,7 @@ gst_rtsp_client_set_session_pool (GstRTSPClient * client,
*
* Get the #GstRTSPSessionPool object that @client uses to manage its sessions.
*
- * Returns: (transfer full): a #GstRTSPSessionPool, unref after usage.
+ * Returns: (transfer full) (nullable): a #GstRTSPSessionPool, unref after usage.
*/
GstRTSPSessionPool *
gst_rtsp_client_get_session_pool (GstRTSPClient * client)
@@ -3675,7 +3675,7 @@ gst_rtsp_client_get_session_pool (GstRTSPClient * client)
/**
* gst_rtsp_client_set_mount_points:
* @client: a #GstRTSPClient
- * @mounts: (transfer none): a #GstRTSPMountPoints
+ * @mounts: (transfer none) (nullable): a #GstRTSPMountPoints
*
* Set @mounts as the mount points for @client which it will use to map urls
* to media streams. These mount points are usually inherited from the server that
@@ -3710,7 +3710,7 @@ gst_rtsp_client_set_mount_points (GstRTSPClient * client,
*
* Get the #GstRTSPMountPoints object that @client uses to manage its sessions.
*
- * Returns: (transfer full): a #GstRTSPMountPoints, unref after usage.
+ * Returns: (transfer full) (nullable): a #GstRTSPMountPoints, unref after usage.
*/
GstRTSPMountPoints *
gst_rtsp_client_get_mount_points (GstRTSPClient * client)
@@ -3733,7 +3733,7 @@ gst_rtsp_client_get_mount_points (GstRTSPClient * client)
/**
* gst_rtsp_client_set_auth:
* @client: a #GstRTSPClient
- * @auth: (transfer none): a #GstRTSPAuth
+ * @auth: (transfer none) (nullable): a #GstRTSPAuth
*
* configure @auth to be used as the authentication manager of @client.
*/
@@ -3766,8 +3766,8 @@ gst_rtsp_client_set_auth (GstRTSPClient * client, GstRTSPAuth * auth)
*
* Get the #GstRTSPAuth used as the authentication manager of @client.
*
- * Returns: (transfer full): the #GstRTSPAuth of @client. g_object_unref() after
- * usage.
+ * Returns: (transfer full) (nullable): the #GstRTSPAuth of @client.
+ * g_object_unref() after usage.
*/
GstRTSPAuth *
gst_rtsp_client_get_auth (GstRTSPClient * client)
@@ -3790,7 +3790,7 @@ gst_rtsp_client_get_auth (GstRTSPClient * client)
/**
* gst_rtsp_client_set_thread_pool:
* @client: a #GstRTSPClient
- * @pool: (transfer none): a #GstRTSPThreadPool
+ * @pool: (transfer none) (nullable): a #GstRTSPThreadPool
*
* configure @pool to be used as the thread pool of @client.
*/
@@ -3823,7 +3823,7 @@ gst_rtsp_client_set_thread_pool (GstRTSPClient * client,
*
* Get the #GstRTSPThreadPool used as the thread pool of @client.
*
- * Returns: (transfer full): the #GstRTSPThreadPool of @client. g_object_unref() after
+ * Returns: (transfer full) (nullable): the #GstRTSPThreadPool of @client. g_object_unref() after
* usage.
*/
GstRTSPThreadPool *
@@ -3915,7 +3915,7 @@ no_address:
*
* Get the #GstRTSPConnection of @client.
*
- * Returns: (transfer none): the #GstRTSPConnection of @client.
+ * Returns: (transfer none) (nullable): the #GstRTSPConnection of @client.
* The connection object returned remains valid until the client is freed.
*/
GstRTSPConnection *
diff --git a/gst/rtsp-server/rtsp-media-factory.c b/gst/rtsp-server/rtsp-media-factory.c
index fd99298..0c003db 100644
--- a/gst/rtsp-server/rtsp-media-factory.c
+++ b/gst/rtsp-server/rtsp-media-factory.c
@@ -411,7 +411,7 @@ gst_rtsp_media_factory_new (void)
/**
* gst_rtsp_media_factory_set_permissions:
* @factory: a #GstRTSPMediaFactory
- * @permissions: (transfer none): a #GstRTSPPermissions
+ * @permissions: (transfer none) (nullable): a #GstRTSPPermissions
*
* Set @permissions on @factory.
*/
@@ -439,7 +439,7 @@ gst_rtsp_media_factory_set_permissions (GstRTSPMediaFactory * factory,
*
* Get the permissions object from @factory.
*
- * Returns: (transfer full): a #GstRTSPPermissions object, unref after usage.
+ * Returns: (transfer full) (nullable): a #GstRTSPPermissions object, unref after usage.
*/
GstRTSPPermissions *
gst_rtsp_media_factory_get_permissions (GstRTSPMediaFactory * factory)
@@ -534,7 +534,7 @@ gst_rtsp_media_factory_set_launch (GstRTSPMediaFactory * factory,
* Get the gst_parse_launch() pipeline description that will be used in the
* default prepare vmethod.
*
- * Returns: (transfer full): the configured launch description. g_free() after
+ * Returns: (transfer full) (nullable): the configured launch description. g_free() after
* usage.
*/
gchar *
@@ -748,7 +748,7 @@ gst_rtsp_media_factory_get_buffer_size (GstRTSPMediaFactory * factory)
/**
* gst_rtsp_media_factory_set_address_pool:
* @factory: a #GstRTSPMediaFactory
- * @pool: (transfer none): a #GstRTSPAddressPool
+ * @pool: (transfer none) (nullable): a #GstRTSPAddressPool
*
* configure @pool to be used as the address pool of @factory.
*/
@@ -780,7 +780,7 @@ gst_rtsp_media_factory_set_address_pool (GstRTSPMediaFactory * factory,
*
* Get the #GstRTSPAddressPool used as the address pool of @factory.
*
- * Returns: (transfer full): the #GstRTSPAddressPool of @factory. g_object_unref() after
+ * Returns: (transfer full) (nullable): the #GstRTSPAddressPool of @factory. g_object_unref() after
* usage.
*/
GstRTSPAddressPool *
@@ -804,7 +804,7 @@ gst_rtsp_media_factory_get_address_pool (GstRTSPMediaFactory * factory)
/**
* gst_rtsp_media_factory_set_multicast_iface:
* @factory: a #GstRTSPMediaFactory
- * @multicast_iface: (transfer none): a multicast interface name
+ * @multicast_iface: (transfer none) (nullable): a multicast interface name
*
* configure @multicast_iface to be used for @factory.
*/
@@ -838,7 +838,7 @@ gst_rtsp_media_factory_set_multicast_iface (GstRTSPMediaFactory * media_factory,
*
* Get the multicast interface used for @factory.
*
- * Returns: (transfer full): the multicast interface for @factory. g_free() after
+ * Returns: (transfer full) (nullable): the multicast interface for @factory. g_free() after
* usage.
*/
gchar *
diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c
index a95598f..3f6a693 100644
--- a/gst/rtsp-server/rtsp-media.c
+++ b/gst/rtsp-server/rtsp-media.c
@@ -817,7 +817,7 @@ gst_rtsp_media_take_pipeline (GstRTSPMedia * media, GstPipeline * pipeline)
/**
* gst_rtsp_media_set_permissions:
* @media: a #GstRTSPMedia
- * @permissions: (transfer none): a #GstRTSPPermissions
+ * @permissions: (transfer none) (nullable): a #GstRTSPPermissions
*
* Set @permissions on @media.
*/
@@ -845,7 +845,7 @@ gst_rtsp_media_set_permissions (GstRTSPMedia * media,
*
* Get the permissions object from @media.
*
- * Returns: (transfer full): a #GstRTSPPermissions object, unref after usage.
+ * Returns: (transfer full) (nullable): a #GstRTSPPermissions object, unref after usage.
*/
GstRTSPPermissions *
gst_rtsp_media_get_permissions (GstRTSPMedia * media)
@@ -1523,7 +1523,7 @@ gst_rtsp_media_get_publish_clock_mode (GstRTSPMedia * media)
/**
* gst_rtsp_media_set_address_pool:
* @media: a #GstRTSPMedia
- * @pool: (transfer none): a #GstRTSPAddressPool
+ * @pool: (transfer none) (nullable): a #GstRTSPAddressPool
*
* configure @pool to be used as the address pool of @media.
*/
@@ -1559,8 +1559,8 @@ gst_rtsp_media_set_address_pool (GstRTSPMedia * media,
*
* Get the #GstRTSPAddressPool used as the address pool of @media.
*
- * Returns: (transfer full): the #GstRTSPAddressPool of @media. g_object_unref() after
- * usage.
+ * Returns: (transfer full) (nullable): the #GstRTSPAddressPool of @media.
+ * g_object_unref() after usage.
*/
GstRTSPAddressPool *
gst_rtsp_media_get_address_pool (GstRTSPMedia * media)
@@ -1583,7 +1583,7 @@ gst_rtsp_media_get_address_pool (GstRTSPMedia * media)
/**
* gst_rtsp_media_set_multicast_iface:
* @media: a #GstRTSPMedia
- * @multicast_iface: (transfer none): a multicast interface name
+ * @multicast_iface: (transfer none) (nullable): a multicast interface name
*
* configure @multicast_iface to be used for @media.
*/
@@ -1619,8 +1619,8 @@ gst_rtsp_media_set_multicast_iface (GstRTSPMedia * media,
*
* Get the multicast interface used for @media.
*
- * Returns: (transfer full): the multicast interface for @media. g_free() after
- * usage.
+ * Returns: (transfer full) (nullable): the multicast interface for @media.
+ * g_free() after usage.
*/
gchar *
gst_rtsp_media_get_multicast_iface (GstRTSPMedia * media)
@@ -1999,7 +1999,7 @@ default_convert_range (GstRTSPMedia * media, GstRTSPTimeRange * range,
* Get the current range as a string. @media must be prepared with
* gst_rtsp_media_prepare ().
*
- * Returns: (transfer full): The range as a string, g_free() after usage.
+ * Returns: (transfer full) (nullable): The range as a string, g_free() after usage.
*/
gchar *
gst_rtsp_media_get_range_string (GstRTSPMedia * media, gboolean play,
@@ -3225,7 +3225,7 @@ get_clock_unlocked (GstRTSPMedia * media)
*
* @media must be prepared before this method returns a valid clock object.
*
- * Returns: (transfer full): the #GstClock used by @media. unref after usage.
+ * Returns: (transfer full) (nullable): the #GstClock used by @media. unref after usage.
*/
GstClock *
gst_rtsp_media_get_clock (GstRTSPMedia * media)
diff --git a/gst/rtsp-server/rtsp-mount-points.c b/gst/rtsp-server/rtsp-mount-points.c
index c6a8c06..be1cce2 100644
--- a/gst/rtsp-server/rtsp-mount-points.c
+++ b/gst/rtsp-server/rtsp-mount-points.c
@@ -181,7 +181,7 @@ default_make_path (GstRTSPMountPoints * mounts, const GstRTSPUrl * url)
*
* Make a path string from @url.
*
- * Returns: (transfer full): a path string for @url, g_free() after usage.
+ * Returns: (transfer full) (nullable): a path string for @url, g_free() after usage.
*/
gchar *
gst_rtsp_mount_points_make_path (GstRTSPMountPoints * mounts,
diff --git a/gst/rtsp-server/rtsp-server.c b/gst/rtsp-server/rtsp-server.c
index 37a3b0f..91f4dfb 100644
--- a/gst/rtsp-server/rtsp-server.c
+++ b/gst/rtsp-server/rtsp-server.c
@@ -328,7 +328,7 @@ gst_rtsp_server_set_address (GstRTSPServer * server, const gchar * address)
*
* Get the address on which the server will accept connections.
*
- * Returns: (transfer full): the server address. g_free() after usage.
+ * Returns: (transfer full) (nullable): the server address. g_free() after usage.
*/
gchar *
gst_rtsp_server_get_address (GstRTSPServer * server)
@@ -417,7 +417,7 @@ gst_rtsp_server_set_service (GstRTSPServer * server, const gchar * service)
*
* Get the service on which the server will accept connections.
*
- * Returns: (transfer full): the service. use g_free() after usage.
+ * Returns: (transfer full) (nullable): the service. use g_free() after usage.
*/
gchar *
gst_rtsp_server_get_service (GstRTSPServer * server)
@@ -488,7 +488,7 @@ gst_rtsp_server_get_backlog (GstRTSPServer * server)
/**
* gst_rtsp_server_set_session_pool:
* @server: a #GstRTSPServer
- * @pool: (transfer none): a #GstRTSPSessionPool
+ * @pool: (transfer none) (nullable): a #GstRTSPSessionPool
*
* configure @pool to be used as the session pool of @server.
*/
@@ -521,7 +521,7 @@ gst_rtsp_server_set_session_pool (GstRTSPServer * server,
*
* Get the #GstRTSPSessionPool used as the session pool of @server.
*
- * Returns: (transfer full): the #GstRTSPSessionPool used for sessions. g_object_unref() after
+ * Returns: (transfer full) (nullable): the #GstRTSPSessionPool used for sessions. g_object_unref() after
* usage.
*/
GstRTSPSessionPool *
@@ -545,7 +545,7 @@ gst_rtsp_server_get_session_pool (GstRTSPServer * server)
/**
* gst_rtsp_server_set_mount_points:
* @server: a #GstRTSPServer
- * @mounts: (transfer none): a #GstRTSPMountPoints
+ * @mounts: (transfer none) (nullable): a #GstRTSPMountPoints
*
* configure @mounts to be used as the mount points of @server.
*/
@@ -579,7 +579,7 @@ gst_rtsp_server_set_mount_points (GstRTSPServer * server,
*
* Get the #GstRTSPMountPoints used as the mount points of @server.
*
- * Returns: (transfer full): the #GstRTSPMountPoints of @server. g_object_unref() after
+ * Returns: (transfer full) (nullable): the #GstRTSPMountPoints of @server. g_object_unref() after
* usage.
*/
GstRTSPMountPoints *
@@ -603,7 +603,7 @@ gst_rtsp_server_get_mount_points (GstRTSPServer * server)
/**
* gst_rtsp_server_set_auth:
* @server: a #GstRTSPServer
- * @auth: (transfer none): a #GstRTSPAuth
+ * @auth: (transfer none) (nullable): a #GstRTSPAuth
*
* configure @auth to be used as the authentication manager of @server.
*/
@@ -636,7 +636,7 @@ gst_rtsp_server_set_auth (GstRTSPServer * server, GstRTSPAuth * auth)
*
* Get the #GstRTSPAuth used as the authentication manager of @server.
*
- * Returns: (transfer full): the #GstRTSPAuth of @server. g_object_unref() after
+ * Returns: (transfer full) (nullable): the #GstRTSPAuth of @server. g_object_unref() after
* usage.
*/
GstRTSPAuth *
@@ -660,7 +660,7 @@ gst_rtsp_server_get_auth (GstRTSPServer * server)
/**
* gst_rtsp_server_set_thread_pool:
* @server: a #GstRTSPServer
- * @pool: (transfer none): a #GstRTSPThreadPool
+ * @pool: (transfer none) (nullable): a #GstRTSPThreadPool
*
* configure @pool to be used as the thread pool of @server.
*/
@@ -693,7 +693,7 @@ gst_rtsp_server_set_thread_pool (GstRTSPServer * server,
*
* Get the #GstRTSPThreadPool used as the thread pool of @server.
*
- * Returns: (transfer full): the #GstRTSPThreadPool of @server. g_object_unref() after
+ * Returns: (transfer full) (nullable): the #GstRTSPThreadPool of @server. g_object_unref() after
* usage.
*/
GstRTSPThreadPool *
@@ -1088,7 +1088,7 @@ default_create_client (GstRTSPServer * server)
* @socket: (transfer full): a network socket
* @ip: the IP address of the remote client
* @port: the port used by the other end
- * @initial_buffer: any initial data that was already read from the socket
+ * @initial_buffer: (nullable): any initial data that was already read from the socket
*
* Take an existing network socket and use it for an RTSP connection. This
* is used when transferring a socket from an HTTP server which should be used
diff --git a/gst/rtsp-server/rtsp-session-media.c b/gst/rtsp-server/rtsp-session-media.c
index 0fffbca..2f3840d 100644
--- a/gst/rtsp-server/rtsp-session-media.c
+++ b/gst/rtsp-server/rtsp-session-media.c
@@ -210,8 +210,8 @@ gst_rtsp_session_media_matches (GstRTSPSessionMedia * media,
*
* Get the #GstRTSPMedia that was used when constructing @media
*
- * Returns: (transfer none): the #GstRTSPMedia of @media. Remains valid as long
- * as @media is valid.
+ * Returns: (transfer none) (nullable): the #GstRTSPMedia of @media.
+ * Remains valid as long as @media is valid.
*/
GstRTSPMedia *
gst_rtsp_session_media_get_media (GstRTSPSessionMedia * media)
@@ -387,8 +387,8 @@ gst_rtsp_session_media_set_transport (GstRTSPSessionMedia * media,
*
* Get a previously created #GstRTSPStreamTransport for the stream at @idx.
*
- * Returns: (transfer none): a #GstRTSPStreamTransport that is valid until the
- * session of @media is unreffed.
+ * Returns: (transfer none) (nullable): a #GstRTSPStreamTransport that is
+ * valid until the session of @media is unreffed.
*/
GstRTSPStreamTransport *
gst_rtsp_session_media_get_transport (GstRTSPSessionMedia * media, guint idx)
diff --git a/gst/rtsp-server/rtsp-session-pool.c b/gst/rtsp-server/rtsp-session-pool.c
index 60aa30c..9ab2d27 100644
--- a/gst/rtsp-server/rtsp-session-pool.c
+++ b/gst/rtsp-server/rtsp-session-pool.c
@@ -341,7 +341,7 @@ create_session (GstRTSPSessionPool * pool, const gchar * id)
*
* Create a new #GstRTSPSession object in @pool.
*
- * Returns: (transfer full): a new #GstRTSPSession.
+ * Returns: (transfer full) (nullable): a new #GstRTSPSession.
*/
GstRTSPSession *
gst_rtsp_session_pool_create (GstRTSPSessionPool * pool)
@@ -751,7 +751,7 @@ static GSourceFuncs gst_pool_source_funcs = {
* Create a #GSource that will be dispatched when the session should be cleaned
* up.
*
- * Returns: (transfer full): a #GSource
+ * Returns: (transfer full) (nullable): a #GSource
*/
GSource *
gst_rtsp_session_pool_create_watch (GstRTSPSessionPool * pool)
diff --git a/gst/rtsp-server/rtsp-session.c b/gst/rtsp-server/rtsp-session.c
index e6faaf5..66fd666 100644
--- a/gst/rtsp-server/rtsp-session.c
+++ b/gst/rtsp-server/rtsp-session.c
@@ -319,7 +319,7 @@ gst_rtsp_session_release_media (GstRTSPSession * sess,
* Get the session media for @path. @matched will contain the number of matched
* characters of @path.
*
- * Returns: (transfer none): the configuration for @path in @sess.
+ * Returns: (transfer none) (nullable): the configuration for @path in @sess.
*/
GstRTSPSessionMedia *
gst_rtsp_session_get_media (GstRTSPSession * sess, const gchar * path,
@@ -479,8 +479,8 @@ gst_rtsp_session_new (const gchar * sessionid)
*
* Get the sessionid of @session.
*
- * Returns: (transfer none): the sessionid of @session. The value remains valid
- * as long as @session is alive.
+ * Returns: (transfer none) (nullable): the sessionid of @session.
+ * The value remains valid as long as @session is alive.
*/
const gchar *
gst_rtsp_session_get_sessionid (GstRTSPSession * session)
@@ -496,7 +496,8 @@ gst_rtsp_session_get_sessionid (GstRTSPSession * session)
*
* Get the string that can be placed in the Session header field.
*
- * Returns: (transfer full): the Session header of @session. g_free() after usage.
+ * Returns: (transfer full) (nullable): the Session header of @session.
+ * g_free() after usage.
*/
gchar *
gst_rtsp_session_get_header (GstRTSPSession * session)
diff --git a/gst/rtsp-server/rtsp-stream-transport.c b/gst/rtsp-server/rtsp-stream-transport.c
index 0498830..a9aa897 100644
--- a/gst/rtsp-server/rtsp-stream-transport.c
+++ b/gst/rtsp-server/rtsp-stream-transport.c
@@ -164,7 +164,7 @@ gst_rtsp_stream_transport_new (GstRTSPStream * stream, GstRTSPTransport * tr)
*
* Get the #GstRTSPStream used when constructing @trans.
*
- * Returns: (transfer none): the stream used when constructing @trans.
+ * Returns: (transfer none) (nullable): the stream used when constructing @trans.
*/
GstRTSPStream *
gst_rtsp_stream_transport_get_stream (GstRTSPStreamTransport * trans)
@@ -263,7 +263,7 @@ gst_rtsp_stream_transport_set_transport (GstRTSPStreamTransport * trans,
*
* Get the transport configured in @trans.
*
- * Returns: (transfer none): the transport configured in @trans. It remains
+ * Returns: (transfer none) (nullable): the transport configured in @trans. It remains
* valid for as long as @trans is valid.
*/
const GstRTSPTransport *
@@ -277,7 +277,7 @@ gst_rtsp_stream_transport_get_transport (GstRTSPStreamTransport * trans)
/**
* gst_rtsp_stream_transport_set_url:
* @trans: a #GstRTSPStreamTransport
- * @url: (transfer none): a client #GstRTSPUrl
+ * @url: (transfer none) (nullable): a client #GstRTSPUrl
*
* Set @url as the client url.
*/
@@ -303,8 +303,8 @@ gst_rtsp_stream_transport_set_url (GstRTSPStreamTransport * trans,
*
* Get the url configured in @trans.
*
- * Returns: (transfer none): the url configured in @trans. It remains
- * valid for as long as @trans is valid.
+ * Returns: (transfer none) (nullable): the url configured in @trans.
+ * It remains valid for as long as @trans is valid.
*/
const GstRTSPUrl *
gst_rtsp_stream_transport_get_url (GstRTSPStreamTransport * trans)
@@ -453,6 +453,8 @@ gst_rtsp_stream_transport_send_rtp (GstRTSPStreamTransport * trans,
GstRTSPStreamTransportPrivate *priv;
gboolean res = FALSE;
+ g_return_val_if_fail (GST_IS_BUFFER (buffer), FALSE);
+
priv = trans->priv;
if (priv->send_rtp)
@@ -482,6 +484,8 @@ gst_rtsp_stream_transport_send_rtcp (GstRTSPStreamTransport * trans,
GstRTSPStreamTransportPrivate *priv;
gboolean res = FALSE;
+ g_return_val_if_fail (GST_IS_BUFFER (buffer), FALSE);
+
priv = trans->priv;
if (priv->send_rtcp)
@@ -531,6 +535,8 @@ gst_rtsp_stream_transport_recv_data (GstRTSPStreamTransport * trans,
const GstRTSPTransport *tr;
GstFlowReturn res;
+ g_return_val_if_fail (GST_IS_BUFFER (buffer), GST_FLOW_ERROR);
+
priv = trans->priv;
tr = priv->transport;
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.
diff --git a/gst/rtsp-server/rtsp-thread-pool.c b/gst/rtsp-server/rtsp-thread-pool.c
index 6c12ac8..a3cb850 100644
--- a/gst/rtsp-server/rtsp-thread-pool.c
+++ b/gst/rtsp-server/rtsp-thread-pool.c
@@ -512,7 +512,8 @@ thread_error:
*
* Get a new #GstRTSPThread for @type and @ctx.
*
- * Returns: (transfer full): a new #GstRTSPThread, gst_rtsp_thread_stop() after usage
+ * Returns: (transfer full) (nullable): a new #GstRTSPThread,
+ * gst_rtsp_thread_stop() after usage
*/
GstRTSPThread *
gst_rtsp_thread_pool_get_thread (GstRTSPThreadPool * pool,