Authentication methods, ordered by strength
no authentication
basic authentication
digest authentication
This object manages the RTSP connection to the server. It provides function
to receive and send bytes and messages.
Last reviewed on 2007-07-24 (0.10.14)
Clear the list of authentication directives stored in @conn.
a #GstRTSPConnection
Close the connected @conn. After this call, the connection is in the same
state as when it was first created.
#GST_RTSP_OK on success.
a #GstRTSPConnection
Attempt to connect to the url of @conn made with
gst_rtsp_connection_create(). 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.
This function can be cancelled with gst_rtsp_connection_flush().
#GST_RTSP_OK when a connection could be made.
a #GstRTSPConnection
a #GTimeVal timeout
If @conn received the first tunnel connection and @conn2 received
the second tunnel connection, link the two connections together so that
@conn manages the tunneled connection.
After this call, @conn2 cannot be used anymore and must be freed with
gst_rtsp_connection_free().
If @conn2 is %NULL then only the base64 decoding context will be setup for
@conn.
return GST_RTSP_OK on success.
a #GstRTSPConnection
a #GstRTSPConnection or %NULL
Start or stop the flushing action on @conn. When flushing, all current
and future actions on @conn will return #GST_RTSP_EINTR until the connection
is set to non-flushing mode again.
#GST_RTSP_OK.
a #GstRTSPConnection
start or stop the flush
Close and free @conn.
#GST_RTSP_OK on success.
a #GstRTSPConnection
Retrieve the IP address of the other end of @conn.
The IP address as a string. this value remains valid until the connection is closed.
a #GstRTSPConnection
Get the tunnel session id the connection.
returns a non-empty string if @conn is being tunneled over HTTP.
a #GstRTSPConnection
Retrieve the URL of the other end of @conn.
The URL. This value remains valid until the connection is freed.
a #GstRTSPConnection
Get the file descriptor for writing.
the file descriptor used for writing or NULL on error. The file descriptor remains valid until the connection is closed.
a #GstRTSPConnection
Get the tunneling state of the connection.
if @conn is using HTTP tunneling.
a #GstRTSPConnection
Calculate the next timeout for @conn, storing the result in @timeout.
#GST_RTSP_OK.
a #GstRTSPConnection
a timeout
Wait up to the specified @timeout for the connection to become available for
at least one of the operations specified in @events. When the function returns
with #GST_RTSP_OK, @revents will contain a bitmask of available operations on
@conn.
@timeout can be #NULL, in which case this function might block forever.
This function can be cancelled with gst_rtsp_connection_flush().
#GST_RTSP_OK on success.
a #GstRTSPConnection
a bitmask of #GstRTSPEvent flags to check
location for result flags
a timeout
Attempt to read @size bytes into @data from the connected @conn, blocking up to
the specified @timeout. @timeout can be #NULL, in which case this function
might block forever.
This function can be cancelled with gst_rtsp_connection_flush().
#GST_RTSP_OK on success.
a #GstRTSPConnection
the data to read
the size of @data
a timeout value or #NULL
Attempt to read into @message from the connected @conn, blocking up to
the specified @timeout. @timeout can be #NULL, in which case this function
might block forever.
This function can be cancelled with gst_rtsp_connection_flush().
#GST_RTSP_OK on success.
a #GstRTSPConnection
the message to read
a timeout value or #NULL
Reset the timeout of @conn.
#GST_RTSP_OK.
a #GstRTSPConnection
Attempt to send @message to the connected @conn, blocking up to
the specified @timeout. @timeout can be #NULL, in which case this function
might block forever.
This function can be cancelled with gst_rtsp_connection_flush().
#GST_RTSP_OK on success.
a #GstRTSPConnection
the message to send
a timeout value or #NULL
Configure @conn for authentication mode @method with @user and @pass as the
user and password respectively.
#GST_RTSP_OK.
a #GstRTSPConnection
authentication method
the user
the password
Setup @conn with authentication directives. This is not necesary for
methods #GST_RTSP_AUTH_NONE and #GST_RTSP_AUTH_BASIC. For
#GST_RTSP_AUTH_DIGEST, directives should be taken from the digest challenge
in the WWW-Authenticate response header and can include realm, domain,
nonce, opaque, stale, algorithm, qop as per RFC2617.
a #GstRTSPConnection
authentication directive
value
By setting the HTTP mode to %TRUE the message parsing will support HTTP
messages in addition to the RTSP messages. It will also disable the
automatic handling of setting up an HTTP tunnel.
a #GstRTSPConnection
%TRUE to enable manual HTTP mode
Set the IP address of the server.
a #GstRTSPConnection
an ip address
Set the proxy host and port.
#GST_RTSP_OK.
a #GstRTSPConnection
the proxy host
the proxy port
Configure @conn to use the specified DSCP value.
#GST_RTSP_OK on success.
a #GstRTSPConnection
DSCP value
Set the HTTP tunneling state of the connection. This must be configured before
the @conn is connected.
a #GstRTSPConnection
the new state
Attempt to write @size bytes of @data to the connected @conn, blocking up to
the specified @timeout. @timeout can be #NULL, in which case this function
might block forever.
This function can be cancelled with gst_rtsp_connection_flush().
#GST_RTSP_OK on success.
a #GstRTSPConnection
the data to write
the size of @data
a timeout value or #NULL
Accept a new connection on @socket and create a new #GstRTSPConnection for
handling communication on new socket.
#GST_RTSP_OK when @conn contains a valid connection.
a socket
storage for a #GstRTSPConnection
a #GCancellable to cancel the operation
Create a newly allocated #GstRTSPConnection from @url and store it in @conn.
The connection will not yet attempt to connect to @url, use
gst_rtsp_connection_connect().
A copy of @url will be made.
#GST_RTSP_OK when @conn contains a valid connection.
a #GstRTSPUrl
storage for a #GstRTSPConnection
Create a new #GstRTSPConnection for handling communication on the existing
socket @socket. The @initial_buffer contains zero terminated data already
read from @socket which should be used before starting to read new data.
#GST_RTSP_OK when @conn contains a valid connection.
a #GSocket
the IP address of the other end
the port used by the other end
data already read from @fd
storage for a #GstRTSPConnection
The possible events for the connection.
connection is readable
connection is writable
<refsect2>
<para>
This interface is implemented e.g. by the Windows Media Streaming RTSP
exentension (rtspwms) and the RealMedia RTSP extension (rtspreal).
</para>
</refsect2>
Last reviewed on 2007-07-25 (0.10.14)
The possible network families.
unknown network family
internet
internet V6
Enumeration of rtsp header fields
The different transport methods.
stream data over UDP
stream data over UDP multicast
stream data over TCP
stream data tunneled over HTTP.
Provides methods for creating and parsing request, response and data messages.
Last reviewed on 2007-07-25 (0.10.14)
Add a header with key @field and @value to @msg. This function takes a copy
of @value.
a #GstRTSPResult.
a #GstRTSPMessage
a #GstRTSPHeaderField
the value of the header
Append the currently configured headers in @msg to the #GString @str suitable
for transmission.
#GST_RTSP_OK.
a #GstRTSPMessage
a string
Dump the contents of @msg to stdout.
#GST_RTSP_OK.
a #GstRTSPMessage
Free the memory used by @msg.
a #GstRTSPResult.
a #GstRTSPMessage
Get the body of @msg. @data remains valid for as long as @msg is valid and
unchanged.
#GST_RTSP_OK.
a #GstRTSPMessage
location for the data
location for the size of @data
Get the @indx header value with key @field from @msg. The result in @value
stays valid as long as it remains present in @msg.
#GST_RTSP_OK when @field was found, #GST_RTSP_ENOTIMPL if the key was not found.
a #GstRTSPMessage
a #GstRTSPHeaderField
pointer to hold the result
the index of the header
Get the message type of @msg.
the message type.
a #GstRTSPMessage
Initialize @msg. This function is mostly used when @msg is allocated on the
stack. The reverse operation of this is gst_rtsp_message_unset().
a #GstRTSPResult.
a #GstRTSPMessage
Initialize a new data #GstRTSPMessage for @channel.
a #GstRTSPResult.
a #GstRTSPMessage
a channel
Initialize @msg as a request message with @method and @uri. To clear @msg
again, use gst_rtsp_message_unset().
a #GstRTSPResult.
a #GstRTSPMessage
the request method to use
the uri of the request
Initialize @msg with @code and @reason.
When @reason is #NULL, the default reason for @code will be used.
When @request is not #NULL, the relevant headers will be copied to the new
response message.
a #GstRTSPResult.
a #GstRTSPMessage
the status code
the status reason or %NULL
the request that triggered the response or %NULL
Parse the data message @msg and store the channel in @channel.
a #GstRTSPResult.
a #GstRTSPMessage
location to hold the channel
Parse the request message @msg and store the values @method, @uri and
@version. The result locations can be #NULL if one is not interested in its
value.
@uri remains valid for as long as @msg is valid and unchanged.
a #GstRTSPResult.
a #GstRTSPMessage
location to hold the method
location to hold the uri
location to hold the version
Parse the response message @msg and store the values @code, @reason and
@version. The result locations can be #NULL if one is not interested in its
value.
@reason remains valid for as long as @msg is valid and unchanged.
a #GstRTSPResult.
a #GstRTSPMessage
location to hold the status code
location to hold the status reason
location to hold the version
Remove the @indx header with key @field from @msg. If @indx equals -1, all
headers will be removed.
a #GstRTSPResult.
a #GstRTSPMessage
a #GstRTSPHeaderField
the index of the header
Set the body of @msg to a copy of @data.
#GST_RTSP_OK.
a #GstRTSPMessage
the data
the size of @data
Take the body of @msg and store it in @data and @size. After this method,
the body and size of @msg will be set to #NULL and 0 respectively.
#GST_RTSP_OK.
a #GstRTSPMessage
location for the data
location for the size of @data
Set the body of @msg to @data and @size. This method takes ownership of
@data.
#GST_RTSP_OK.
a #GstRTSPMessage
the data
the size of @data
Add a header with key @field and @value to @msg. This function takes
ownership of @value.
a #GstRTSPResult.
a #GstRTSPMessage
a #GstRTSPHeaderField
the value of the header
Unset the contents of @msg so that it becomes an uninitialized
#GstRTSPMessage again. This function is mostly used in combination with
gst_rtsp_message_init_request(), gst_rtsp_message_init_response() and
gst_rtsp_message_init_data() on stack allocated #GstRTSPMessage structures.
#GST_RTSP_OK.
a #GstRTSPMessage
Create a new initialized #GstRTSPMessage. Free with gst_rtsp_message_free().
a #GstRTSPResult.
a location for the new #GstRTSPMessage
Create a new data #GstRTSPMessage with @channel and store the
result message in @msg. Free with gst_rtsp_message_free().
a #GstRTSPResult.
a location for the new #GstRTSPMessage
the channel
Create a new #GstRTSPMessage with @method and @uri and store the result
request message in @msg. Free with gst_rtsp_message_free().
a #GstRTSPResult.
a location for the new #GstRTSPMessage
the request method to use
the uri of the request
Create a new response #GstRTSPMessage with @code and @reason and store the
result message in @msg. Free with gst_rtsp_message_free().
When @reason is #NULL, the default reason for @code will be used.
When @request is not #NULL, the relevant headers will be copied to the new
response message.
a #GstRTSPResult.
a location for the new #GstRTSPMessage
the status code
the status reason or %NULL
the request that triggered the response or %NULL
The different supported RTSP methods.
invalid method
the DESCRIBE method
the ANNOUNCE method
the GET_PARAMETER method
the OPTIONS method
the PAUSE method
the PLAY method
the RECORD method
the REDIRECT method
the SETUP method
the SET_PARAMETER method
the TEARDOWN method
the GET method (HTTP).
the POST method (HTTP).
Convert @method to a string.
a string representation of @method.
a #GstRTSPMethod
The type of a message.
invalid message type
RTSP request message
RTSP response message
HTTP request message.
HTTP response message.
data message
The transfer profile to use.
invalid profile
the Audio/Visual profile
the secure Audio/Visual profile
Provides helper functions to deal with time ranges.
Last reviewed on 2007-07-25 (0.10.14)
Free the memory allocated by @range.
a #GstRTSPTimeRange
Parse @rangestr to a #GstRTSPTimeRange.
#GST_RTSP_OK on success.
a range string to parse
location to hold the #GstRTSPTimeRange result
Convert @range into a string representation.
The string representation of @range. g_free() after usage.
a #GstRTSPTimeRange
Different possible time range units.
SMPTE timecode
29.97 frames per second
25 frames per second
Normal play time
Absolute time expressed as ISO 8601 timestamps
Result codes from the RTSP functions.
no error
some unspecified error occured
invalid arguments were provided to a function
an operation was canceled
no memory was available for the operation
a host resolve error occured
function not implemented
a system error occured, errno contains more details
a persing error occured
windows networking could not start
windows networking stack has wrong version
end-of-file was reached
a network problem occured, h_errno contains more details
the host is not an IP host
a timeout occured
the tunnel GET request has been performed
the tunnel POST request has been performed
last error
The different RTSP states.
invalid state
initializing
ready for operation
seeking in progress
playing
recording
Enumeration of rtsp status codes
A time indication.
A time range.
Possible time types.
seconds
now
end
The transfer mode to use.
invalid tansport mode
transfer RTP data
transfer RDT (RealMedia) data
Provides helper functions to deal with RTSP transport strings.
Last reviewed on 2007-07-25 (0.10.14)
Convert @transport into a string that can be used to signal the transport in
an RTSP SETUP response.
a string describing the RTSP transport or #NULL when the transport is invalid.
a #GstRTSPTransport
Free the memory used by @transport.
#GST_RTSP_OK.
a #GstRTSPTransport
Initialize @transport so that it can be used.
#GST_RTSP_OK.
a #GstRTSPTransport
Get the #GstElement that can handle the buffers transported over @trans.
It is possible that there are several managers available, use @option to
selected one.
@manager will contain an element name or #NULL when no manager is
needed/available for @trans.
#GST_RTSP_OK.
a #GstRTSPTransMode
location to hold the result
option index.
Get the mime type of the transport mode @trans. This mime type is typically
used to generate #GstCaps on buffers.
#GST_RTSP_OK.
a #GstRTSPTransMode
location to hold the result
Allocate a new initialized #GstRTSPTransport. Use gst_rtsp_transport_free()
after usage.
a #GstRTSPResult.
location to hold the new #GstRTSPTransport
Parse the RTSP transport string @str into @transport.
a #GstRTSPResult.
a transport string
a #GstRTSPTransport
Provides helper functions to handle RTSP urls.
Last reviewed on 2007-07-25 (0.10.14)
Make a copy of @url.
a copy of @url. Free with gst_rtsp_url_free () after usage.
a #GstRTSPUrl
Splits the path of @url on '/' boundaries, decoding the resulting components,
The decoding performed by this routine is "URI decoding", as defined in RFC
3986, commonly known as percent-decoding. For example, a string "foo\%2fbar"
will decode to "foo/bar" -- the \%2f being replaced by the corresponding byte
with hex value 0x2f. Note that there is no guarantee that the resulting byte
sequence is valid in any given encoding. As a special case, \%00 is not
unescaped to NUL, as that would prematurely terminate the string.
Also note that since paths usually start with a slash, the first component
will usually be the empty string.
a string vector. g_strfreev() after usage.
a #GstRTSPUrl
Free the memory used by @url.
a #GstRTSPUrl
Get the port number of @url.
#GST_RTSP_OK.
a #GstRTSPUrl
location to hold the port
Get a newly allocated string describing the request URI for @url.
a string with the request URI. g_free() after usage.
a #GstRTSPUrl
Set the port number in @url to @port.
#GST_RTSP_OK.
a #GstRTSPUrl
the port
Parse the RTSP @urlstr into a newly allocated #GstRTSPUrl. Free after usage
with gst_rtsp_url_free().
a #GstRTSPResult.
the url string to parse
location to hold the result.
The supported RTSP versions.
unknown/invalid version
version 1.0
version 1.1.
Convert @version to a string.
a string representation of @version.
a #GstRTSPVersion
Opaque RTSP watch object that can be used for asynchronous RTSP
operations.
Adds a #GstRTSPWatch to a context so that it will be executed within that context.
the ID (greater than 0) for the watch within the GMainContext.
a #GstRTSPWatch
a GMainContext (if NULL, the default context will be used)
Reset @watch, this is usually called after gst_rtsp_connection_do_tunnel()
when the file descriptors of the connection might have changed.
a #GstRTSPWatch
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.
#GST_RTSP_OK on success.
a #GstRTSPWatch
a #GstRTSPMessage
location for a message ID or %NULL
Decreases the reference count of @watch by one. If the resulting reference
count is zero the watch and associated memory will be destroyed.
a #GstRTSPWatch
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.
#GST_RTSP_OK on success.
a #GstRTSPWatch
the data to queue
the size of @data
location for a message ID or %NULL
Create a watch object for @conn. The functions provided in @funcs will be
called with @user_data when activity happened on the watch.
The new watch is usually created so that it can be attached to a
maincontext with gst_rtsp_watch_attach().
@conn must exist for the entire lifetime of the watch.
a #GstRTSPWatch that can be used for asynchronous RTSP communication. Free with gst_rtsp_watch_unref () after usage.
a #GstRTSPConnection
watch functions
user data to pass to @funcs
notify when @user_data is not referenced anymore
Callback functions from a #GstRTSPWatch.
The default RTSP port to connect to.
Accept a new connection on @socket and create a new #GstRTSPConnection for
handling communication on new socket.
#GST_RTSP_OK when @conn contains a valid connection.
a socket
storage for a #GstRTSPConnection
a #GCancellable to cancel the operation
Create a newly allocated #GstRTSPConnection from @url and store it in @conn.
The connection will not yet attempt to connect to @url, use
gst_rtsp_connection_connect().
A copy of @url will be made.
#GST_RTSP_OK when @conn contains a valid connection.
a #GstRTSPUrl
storage for a #GstRTSPConnection
Create a new #GstRTSPConnection for handling communication on the existing
socket @socket. The @initial_buffer contains zero terminated data already
read from @socket which should be used before starting to read new data.
#GST_RTSP_OK when @conn contains a valid connection.
a #GSocket
the IP address of the other end
the port used by the other end
data already read from @fd
storage for a #GstRTSPConnection
Convert @header to a #GstRTSPHeaderField.
a #GstRTSPHeaderField for @header or #GST_RTSP_HDR_INVALID if the header field is unknown.
a header string
Convert @method to a #GstRTSPMethod.
a #GstRTSPMethod for @method or #GST_RTSP_INVALID if the method is unknown.
a method
Check whether @field may appear multiple times in a message.
%TRUE if multiple headers are allowed.
a #GstRTSPHeaderField
Convert @field to a string.
a string representation of @field.
a #GstRTSPHeaderField
Create a new initialized #GstRTSPMessage. Free with gst_rtsp_message_free().
a #GstRTSPResult.
a location for the new #GstRTSPMessage
Create a new data #GstRTSPMessage with @channel and store the
result message in @msg. Free with gst_rtsp_message_free().
a #GstRTSPResult.
a location for the new #GstRTSPMessage
the channel
Create a new #GstRTSPMessage with @method and @uri and store the result
request message in @msg. Free with gst_rtsp_message_free().
a #GstRTSPResult.
a location for the new #GstRTSPMessage
the request method to use
the uri of the request
Create a new response #GstRTSPMessage with @code and @reason and store the
result message in @msg. Free with gst_rtsp_message_free().
When @reason is #NULL, the default reason for @code will be used.
When @request is not #NULL, the relevant headers will be copied to the new
response message.
a #GstRTSPResult.
a location for the new #GstRTSPMessage
the status code
the status reason or %NULL
the request that triggered the response or %NULL
Convert @method to a string.
a string representation of @method.
a #GstRTSPMethod
Convert @options to a string.
a new string of @options. g_free() after usage.
one or more #GstRTSPMethod
Free the memory allocated by @range.
a #GstRTSPTimeRange
Parse @rangestr to a #GstRTSPTimeRange.
#GST_RTSP_OK on success.
a range string to parse
location to hold the #GstRTSPTimeRange result
Convert @range into a string representation.
The string representation of @range. g_free() after usage.
a #GstRTSPTimeRange
Convert @code to a string.
a string representation of @code.
a #GstRTSPStatusCode
Convert @result in a human readable string.
a newly allocated string. g_free() after usage.
a #GstRTSPResult
Get the #GstElement that can handle the buffers transported over @trans.
It is possible that there are several managers available, use @option to
selected one.
@manager will contain an element name or #NULL when no manager is
needed/available for @trans.
#GST_RTSP_OK.
a #GstRTSPTransMode
location to hold the result
option index.
Get the mime type of the transport mode @trans. This mime type is typically
used to generate #GstCaps on buffers.
#GST_RTSP_OK.
a #GstRTSPTransMode
location to hold the result
Allocate a new initialized #GstRTSPTransport. Use gst_rtsp_transport_free()
after usage.
a #GstRTSPResult.
location to hold the new #GstRTSPTransport
Parse the RTSP transport string @str into @transport.
a #GstRTSPResult.
a transport string
a #GstRTSPTransport
Parse the RTSP @urlstr into a newly allocated #GstRTSPUrl. Free after usage
with gst_rtsp_url_free().
a #GstRTSPResult.
the url string to parse
location to hold the result.
Convert @version to a string.
a string representation of @version.
a #GstRTSPVersion