*
* 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 *
*
* 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
*/
* 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 *
/**
* 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
*
* 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)
/**
* 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
*
* 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)
/**
* 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.
*/
*
* 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)
/**
* 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.
*/
*
* 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 *
*
* 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 *
/**
* gst_rtsp_media_factory_set_permissions:
* @factory: a #GstRTSPMediaFactory
- * @permissions: (transfer none): a #GstRTSPPermissions
+ * @permissions: (transfer none) (nullable): a #GstRTSPPermissions
*
* Set @permissions on @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)
* 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 *
/**
* 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.
*/
*
* 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 *
/**
* 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.
*/
*
* 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 *
/**
* gst_rtsp_media_set_permissions:
* @media: a #GstRTSPMedia
- * @permissions: (transfer none): a #GstRTSPPermissions
+ * @permissions: (transfer none) (nullable): a #GstRTSPPermissions
*
* Set @permissions on @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)
/**
* 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.
*/
*
* 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)
/**
* 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.
*/
*
* 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)
* 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,
*
* @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)
*
* 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,
*
* 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)
*
* 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)
/**
* 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.
*/
*
* 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 *
/**
* 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.
*/
*
* 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 *
/**
* 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.
*/
*
* 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 *
/**
* 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.
*/
*
* 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 *
* @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
*
* 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)
*
* 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)
*
* 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)
* 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)
* 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,
*
* 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)
*
* 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)
*
* 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)
*
* 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 *
/**
* 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.
*/
*
* 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)
GstRTSPStreamTransportPrivate *priv;
gboolean res = FALSE;
+ g_return_val_if_fail (GST_IS_BUFFER (buffer), FALSE);
+
priv = trans->priv;
if (priv->send_rtp)
GstRTSPStreamTransportPrivate *priv;
gboolean res = FALSE;
+ g_return_val_if_fail (GST_IS_BUFFER (buffer), FALSE);
+
priv = trans->priv;
if (priv->send_rtcp)
const GstRTSPTransport *tr;
GstFlowReturn res;
+ g_return_val_if_fail (GST_IS_BUFFER (buffer), GST_FLOW_ERROR);
+
priv = trans->priv;
tr = priv->transport;
*
* 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)
*
* 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)
*
* 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)
/**
* gst_rtsp_stream_set_control:
* @stream: a #GstRTSPStream
- * @control: a control string
+ * @control: (nullable): a control string
*
* Set the control string in @stream.
*/
/**
* 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.
*
GstRTSPStreamPrivate *priv;
g_return_val_if_fail (GST_IS_RTSP_STREAM (stream), FALSE);
+ g_return_val_if_fail (transport != NULL, FALSE);
priv = stream->priv;
/**
* 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.
*/
*
* 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)
/**
* 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.
*/
*
* 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)
*
* Creating a rtxsend bin
*
- * Returns: (transfer full): a #GstElement.
+ * Returns: (transfer full) (nullable): a #GstElement.
*
* Since: 1.6
*/
{
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);
*
* 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)
/**
* 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.
*
* 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)
/**
* gst_rtsp_stream_query_position:
* @stream: a #GstRTSPStream
- * @position: current position of 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.
/**
* gst_rtsp_stream_query_stop:
* @stream: a #GstRTSPStream
- * @stop: current stop of 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.
*
* 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,