RTSPMessage

Provides methods for creating and parsing request, response and data messages.

class RTSPMessage : Boxed {}

Members

Functions

addHeader
gstrtsp.types.RTSPResult addHeader(gstrtsp.types.RTSPHeaderField field, string value)

Add a header with key field and value to msg. This function takes a copy of value.

addHeaderByName
gstrtsp.types.RTSPResult addHeaderByName(string header, string value)

Add a header with key header and value to msg. This function takes a copy of value.

appendHeaders
gstrtsp.types.RTSPResult appendHeaders(glib.string_.String str)

Append the currently configured headers in msg to the #GString str suitable for transmission.

copy
gstrtsp.types.RTSPResult copy(gstrtsp.rtspmessage.RTSPMessage copy)

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
gstrtsp.types.RTSPResult dump()

Dump the contents of msg to stdout.

getBody
gstrtsp.types.RTSPResult getBody(ubyte[] data)

Get the body of msg. data remains valid for as long as msg is valid and unchanged.

getBodyBuffer
gstrtsp.types.RTSPResult getBodyBuffer(gst.buffer.Buffer buffer)

Get the body of msg. buffer remains valid for as long as msg is valid and unchanged.

getHeader
gstrtsp.types.RTSPResult getHeader(gstrtsp.types.RTSPHeaderField field, string value, int indx)

Get the indx header value with key field from msg. The result in value stays valid as long as it remains present in msg.

getHeaderByName
gstrtsp.types.RTSPResult getHeaderByName(string header, string value, int index)

Get the index header value with key header from msg. The result in value stays valid as long as it remains present in msg.

getType
gstrtsp.types.RTSPMsgType getType()

Get the message type of msg.

hasBodyBuffer
bool hasBodyBuffer()

Checks if msg has a body and the body is stored as #GstBuffer.

initData
gstrtsp.types.RTSPResult initData(ubyte channel)

Initialize a new data #GstRTSPMessage for channel.

initRequest
gstrtsp.types.RTSPResult initRequest(gstrtsp.types.RTSPMethod method, string uri)

Initialize msg as a request message with method and uri. To clear msg again, use gstrtsp.rtspmessage.RTSPMessage.unset.

initResponse
gstrtsp.types.RTSPResult initResponse(gstrtsp.types.RTSPStatusCode code, string reason, gstrtsp.rtspmessage.RTSPMessage request)

Initialize msg with code and reason.

init_
gstrtsp.types.RTSPResult init_()

Initialize msg. This function is mostly used when msg is allocated on the stack. The reverse operation of this is gstrtsp.rtspmessage.RTSPMessage.unset.

parseAuthCredentials
gstrtsp.rtspauth_credential.RTSPAuthCredential[] parseAuthCredentials(gstrtsp.types.RTSPHeaderField field)

Parses the credentials given in a WWW-Authenticate or Authorization header.

parseData
gstrtsp.types.RTSPResult parseData(ubyte channel)

Parse the data message msg and store the channel in channel.

parseRequest
gstrtsp.types.RTSPResult parseRequest(gstrtsp.types.RTSPMethod method, string uri, gstrtsp.types.RTSPVersion version_)

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.

parseResponse
gstrtsp.types.RTSPResult parseResponse(gstrtsp.types.RTSPStatusCode code, string reason, gstrtsp.types.RTSPVersion 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.

removeHeader
gstrtsp.types.RTSPResult removeHeader(gstrtsp.types.RTSPHeaderField field, int indx)

Remove the indx header with key field from msg. If indx equals -1, all headers will be removed.

removeHeaderByName
gstrtsp.types.RTSPResult removeHeaderByName(string header, int index)

Remove the index header with key header from msg. If index equals -1, all matching headers will be removed.

setBody
gstrtsp.types.RTSPResult setBody(ubyte[] data)

Set the body of msg to a copy of data. Any existing body or body buffer will be replaced by the new body.

setBodyBuffer
gstrtsp.types.RTSPResult setBodyBuffer(gst.buffer.Buffer buffer)

Set the body of msg to buffer. Any existing body or body buffer will be replaced by the new body.

stealBody
gstrtsp.types.RTSPResult stealBody(ubyte[] 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.

stealBodyBuffer
gstrtsp.types.RTSPResult stealBodyBuffer(gst.buffer.Buffer buffer)

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.

takeBodyBuffer
gstrtsp.types.RTSPResult takeBodyBuffer(gst.buffer.Buffer buffer)

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.

takeHeader
gstrtsp.types.RTSPResult takeHeader(gstrtsp.types.RTSPHeaderField field, string value)

Add a header with key field and value to msg. This function takes ownership of value.

takeHeaderByName
gstrtsp.types.RTSPResult takeHeaderByName(string header, string value)

Add a header with key header and value to msg. This function takes ownership of value, but not of header.

unset
gstrtsp.types.RTSPResult unset()

Unset the contents of msg so that it becomes an uninitialized #GstRTSPMessage again. This function is mostly used in combination with gstrtsp.rtspmessage.RTSPMessage.initRequest, gstrtsp.rtspmessage.RTSPMessage.initResponse and gstrtsp.rtspmessage.RTSPMessage.initData on stack allocated #GstRTSPMessage structures.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.