the message type
Add a header with key field
and value
to msg
. This function takes a copy
of value
.
a #GstRTSPHeaderField
the value of the header
Add a header with key header
and value
to msg
. This function takes a copy
of value
.
header string
the value of the header
Append the currently configured headers in msg
to the #GString str
suitable
for transmission.
Allocate a new copy of msg
and store the result in copy
. The value in
copy
should be release with gst_rtsp_message_free function.
Dump the contents of msg
to stdout.
Free the memory used by msg
.
Get the body of msg
. data
remains valid for as long as msg
is valid and
unchanged.
If the message body was set as a #GstBuffer before this will cause the data to be copied and stored in the message. The #GstBuffer will no longer be kept in the message.
Get the body of msg
. buffer
remains valid for as long as msg
is valid and
unchanged.
If body data was set from raw memory instead of a #GstBuffer this function will always return %NULL. The caller can check if there is a body buffer by calling gst_rtsp_message_has_body_buffer().
Get the indx
header value with key field
from msg
. The result in value
stays valid as long as it remains present in msg
.
a #GstRTSPHeaderField
the index of the header
Get the index
header value with key header
from msg
. The result in value
stays valid as long as it remains present in msg
.
a #GstRTSPHeaderField
the index of the header
Get the message type of msg
.
Checks if msg
has a body and the body is stored as #GstBuffer.
Initialize msg
. This function is mostly used when msg
is allocated on the
stack. The reverse operation of this is gst_rtsp_message_unset().
Initialize a new data #GstRTSPMessage for channel
.
a channel
Initialize msg
as a request message with method
and uri
. To clear msg
again, use gst_rtsp_message_unset().
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.
the status code
the status reason or %NULL
the request that triggered the response or %NULL
Parses the credentials given in a WWW-Authenticate or Authorization header.
a #GstRTSPHeaderField
Parse the data message msg
and store the channel in 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.
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.
Remove the indx
header with key field
from msg
. If indx
equals -1, all
headers will be removed.
a #GstRTSPHeaderField
the index of the header
Remove the index
header with key header
from msg
. If index
equals -1,
all matching headers will be removed.
the header string
the index of the header
Set the body of msg
to a copy of data
. Any existing body or body buffer
will be replaced by the new body.
the data
Set the body of msg
to buffer
. Any existing body or body buffer
will be replaced by the new body.
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.
Take the body of msg
and store it in buffer
. After this method,
the body and size of msg
will be set to %NULL and 0 respectively.
If body data was set from raw memory instead of a #GstBuffer this function will always return %NULL. The caller can check if there is a body buffer by calling gst_rtsp_message_has_body_buffer().
Set the body of msg
to data
and size
. This method takes ownership of
data
. Any existing body or body buffer will be replaced by the new body.
the data
Set the body of msg
to buffer
. This method takes ownership of buffer
.
Any existing body or body buffer will be replaced by the new body.
Add a header with key field
and value
to msg
. This function takes
ownership of value
.
a #GstRTSPHeaderField
the value of the header
Add a header with key header
and value
to msg
. This function takes
ownership of value,
but not of header
.
a header string
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.
Provides methods for creating and parsing request, response and data messages.