Gjsify LogoGjsify Logo

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

record

Hierarchy

  • RTSPMessage

Index

Constructors

Properties

the message type

field
name: string

Methods

  • addHeaderByName(header: string, value: string): RTSPResult
  • Add a header with key header and value to msg. This function takes a copy of value.

    Parameters

    • header: string

      header string

    • value: string

      the value of the header

    Returns RTSPResult

  • 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.

    Returns [RTSPResult, Uint8Array]

  • 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().

    Returns [RTSPResult, Gst.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.

    Parameters

    • field: RTSPHeaderField

      a #GstRTSPHeaderField

    • indx: number

      the index of the header

    Returns [RTSPResult, string]

  • getHeaderByName(header: string, index: number): [RTSPResult, string]
  • Get the index header value with key header from msg. The result in value stays valid as long as it remains present in msg.

    Parameters

    • header: string

      a #GstRTSPHeaderField

    • index: number

      the index of the header

    Returns [RTSPResult, string]

  • hasBodyBuffer(): boolean
  • Checks if msg has a body and the body is stored as #GstBuffer.

    Returns boolean

  • Initialize msg. This function is mostly used when msg is allocated on the stack. The reverse operation of this is gst_rtsp_message_unset().

    Returns RTSPResult

  • Initialize msg as a request message with method and uri. To clear msg again, use gst_rtsp_message_unset().

    Parameters

    • method: RTSPMethod

      the request method to use

    • uri: string

      the uri of the request

    Returns RTSPResult

  • 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.

    Parameters

    • code: RTSPStatusCode

      the status code

    • reason: string

      the status reason or %NULL

    • request: RTSPMessage

      the request that triggered the response or %NULL

    Returns RTSPResult

  • 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.

    Returns [RTSPResult, RTSPMethod, string, RTSPVersion]

  • 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.

    Returns [RTSPResult, RTSPStatusCode, string, RTSPVersion]

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

    Parameters

    • field: RTSPHeaderField

      a #GstRTSPHeaderField

    • indx: number

      the index of the header

    Returns RTSPResult

  • removeHeaderByName(header: string, index: number): RTSPResult
  • Remove the index header with key header from msg. If index equals -1, all matching headers will be removed.

    Parameters

    • header: string

      the header string

    • index: number

      the index of the header

    Returns RTSPResult

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

    Parameters

    • data: Uint8Array

      the data

    Returns RTSPResult

  • 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.

    Returns [RTSPResult, Uint8Array]

  • 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().

    Returns [RTSPResult, Gst.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.

    Parameters

    • data: Uint8Array

      the data

    Returns RTSPResult

  • 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.

    Parameters

    Returns RTSPResult

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

    Parameters

    • field: RTSPHeaderField

      a #GstRTSPHeaderField

    • value: string

      the value of the header

    Returns RTSPResult

  • takeHeaderByName(header: string, value: string): RTSPResult
  • Add a header with key header and value to msg. This function takes ownership of value, but not of header.

    Parameters

    • header: string

      a header string

    • value: string

      the value of the header

    Returns RTSPResult

  • 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.

    Returns RTSPResult

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method