Adds a #GstRTSPWatch to a context so that it will be executed within that context.
a GMainContext (if NULL, the default context will be used)
Get the maximum amount of bytes and messages that will be queued in watch
.
See gst_rtsp_watch_set_send_backlog().
Reset watch,
this is usually called after gst_rtsp_connection_do_tunnel()
when the file descriptors of the connection might have changed.
Send a message
using the connection of the watch
. If it cannot be sent
immediately, it will be queued for transmission in watch
. The contents of
message
will then be serialized and transmitted when the connection of the
watch
becomes writable. In case the message
is queued, the ID returned in
id
will be non-zero and used as the ID argument in the message_sent
callback.
a #GstRTSPMessage
Sends messages
using the connection of the watch
. If they cannot be sent
immediately, they will be queued for transmission in watch
. The contents of
messages
will then be serialized and transmitted when the connection of the
watch
becomes writable. In case the messages
are queued, the ID returned in
id
will be non-zero and used as the ID argument in the message_sent
callback once the last message is sent. The callback will only be called
once for the last message.
the messages to send
When flushing
is %TRUE, abort a call to gst_rtsp_watch_wait_backlog()
and make sure gst_rtsp_watch_write_data() returns immediately with
#GST_RTSP_EINTR. And empty the queue.
new flushing state
Set the maximum amount of bytes and messages that will be queued in watch
.
When the maximum amounts are exceeded, gst_rtsp_watch_write_data() and
gst_rtsp_watch_send_message() will return #GST_RTSP_ENOMEM.
A value of 0 for bytes
or messages
means no limits.
maximum bytes
maximum messages
Decreases the reference count of watch
by one. If the resulting reference
count is zero the watch and associated memory will be destroyed.
Wait until there is place in the backlog queue, timeout
is reached
or watch
is set to flushing.
If timeout
is %NULL this function can block forever. If timeout
contains a valid timeout, this function will return %GST_RTSP_ETIMEOUT
after the timeout expired.
The typically use of this function is when gst_rtsp_watch_write_data returns %GST_RTSP_ENOMEM. The caller then calls this function to wait for free space in the backlog queue and try again.
a GTimeVal timeout
Wait until there is place in the backlog queue, timeout
is reached
or watch
is set to flushing.
If timeout
is 0 this function can block forever. If timeout
contains a valid timeout, this function will return %GST_RTSP_ETIMEOUT
after the timeout expired.
The typically use of this function is when gst_rtsp_watch_write_data returns %GST_RTSP_ENOMEM. The caller then calls this function to wait for free space in the backlog queue and try again.
a timeout in microseconds
Write data
using the connection of the watch
. If it cannot be sent
immediately, it will be queued for transmission in watch
. The contents of
message
will then be serialized and transmitted when the connection of the
watch
becomes writable. In case the message
is queued, the ID returned in
id
will be non-zero and used as the ID argument in the message_sent
callback.
This function will take ownership of data
and g_free() it after use.
If the amount of queued data exceeds the limits set with gst_rtsp_watch_set_send_backlog(), this function will return #GST_RTSP_ENOMEM.
the data to queue
Opaque RTSP watch object that can be used for asynchronous RTSP operations.