gstrtsp.rtspmessage
Module for [RTSPMessage] class
class RTSPMessage
Types 1
classRTSPMessage : gobject.boxed.Boxed
Provides methods for creating and parsing request, response and data messages.
Methods
void type(gstrtsp.types.RTSPMsgType propval) @property nothrowSet `type` field. Params: propval = the message typegstrtsp.types.RTSPResult addHeader(gstrtsp.types.RTSPHeaderField field, string value) nothrowAdd a header with key field and value to msg. This function takes a copy of value.gstrtsp.types.RTSPResult addHeaderByName(string header, string value) nothrowAdd a header with key header and value to msg. This function takes a copy of value.gstrtsp.types.RTSPResult appendHeaders(glib.string_.String str) nothrowAppend the currently configured headers in msg to the #GString str suitable for transmission.gstrtsp.types.RTSPResult copy(out gstrtsp.rtspmessage.RTSPMessage copy) nothrowAllocate a new copy of msg and store the result in copy. The value in copy should be release with gst_rtsp_message_free function.gstrtsp.types.RTSPResult getBody(out ubyte[] data) nothrowGet the body of msg. data remains valid for as long as msg is valid and unchanged.gstrtsp.types.RTSPResult getBodyBuffer(out gst.buffer.Buffer buffer) nothrowGet the body of msg. buffer remains valid for as long as msg is valid and unchanged.gstrtsp.types.RTSPResult getHeader(gstrtsp.types.RTSPHeaderField field, out string value, int indx) nothrowGet the indx header value with key field from msg. The result in value stays valid as long as it remains present in msg.gstrtsp.types.RTSPResult getHeaderByName(string header, out string value, int index) nothrowGet the index header value with key header from msg. The result in value stays valid as long as it remains present in msg.bool hasBodyBuffer() nothrowChecks if msg has a body and the body is stored as #GstBuffer. Returns: true if msg has a body and it's stored as #GstBuffer, false otherwise.gstrtsp.types.RTSPResult init_() nothrowInitialize msg. This function is mostly used when msg is allocated on the stack. The reverse operation of this is [gstrtsp.rtspmessage.RTSPMessage.unset]. Returns: a #GstRTSPResult.gstrtsp.types.RTSPResult initData(ubyte channel) nothrowInitialize a new data #GstRTSPMessage for channel.gstrtsp.types.RTSPResult initRequest(gstrtsp.types.RTSPMethod method, string uri) nothrowInitialize msg as a request message with method and uri. To clear msg again, use [gstrtsp.rtspmessage.RTSPMessage.unset].gstrtsp.types.RTSPResult initResponse(gstrtsp.types.RTSPStatusCode code, string reason = null, gstrtsp.rtspmessage.RTSPMessage request = null) nothrowInitialize msg with code and reason.gstrtsp.rtspauth_credential.RTSPAuthCredential[] parseAuthCredentials(gstrtsp.types.RTSPHeaderField field) nothrowParses the credentials given in a WWW-Authenticate or Authorization header.gstrtsp.types.RTSPResult parseData(out ubyte channel) nothrowParse the data message msg and store the channel in channel.gstrtsp.types.RTSPResult parseRequest(out gstrtsp.types.RTSPMethod method, out string uri, out gstrtsp.types.RTSPVersion version_) nothrowParse 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.gstrtsp.types.RTSPResult parseResponse(out gstrtsp.types.RTSPStatusCode code, out string reason, out gstrtsp.types.RTSPVersion version_) nothrowParse 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.gstrtsp.types.RTSPResult removeHeader(gstrtsp.types.RTSPHeaderField field, int indx) nothrowRemove the indx header with key field from msg. If indx equals -1, all headers will be removed.gstrtsp.types.RTSPResult removeHeaderByName(string header, int index) nothrowRemove the index header with key header from msg. If index equals -1, all matching headers will be removed.gstrtsp.types.RTSPResult setBody(ubyte[] data) nothrowSet the body of msg to a copy of data. Any existing body or body buffer will be replaced by the new body.gstrtsp.types.RTSPResult setBodyBuffer(gst.buffer.Buffer buffer) nothrowSet the body of msg to buffer. Any existing body or body buffer will be replaced by the new body.gstrtsp.types.RTSPResult stealBody(out ubyte[] data) nothrowTake 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.gstrtsp.types.RTSPResult stealBodyBuffer(out gst.buffer.Buffer buffer) nothrowTake 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.gstrtsp.types.RTSPResult takeBodyBuffer(gst.buffer.Buffer buffer) nothrowSet 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.gstrtsp.types.RTSPResult takeHeader(gstrtsp.types.RTSPHeaderField field, string value) nothrowAdd a header with key field and value to msg. This function takes ownership of value.gstrtsp.types.RTSPResult takeHeaderByName(string header, string value) nothrowAdd a header with key header and value to msg. This function takes ownership of value, but not of header.gstrtsp.types.RTSPResult unset() nothrowUnset 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.rtspmes...Constructors
this(gstrtsp.types.RTSPMsgType type = gstrtsp.types.RTSPMsgType.init)Create a `rtspmessage.RTSPMessage` boxed type. Params: type = the message type