Class (GI Struct)

GstSdp-1.0GstSdpSDPMessage

The GstSDPMessage helper functions makes it easy to parse and create SDP messages.

Index

Constructors

  • Parameters

    • Optionalproperties: Partial<
          {
              attributes: any[];
              bandwidths: any[];
              connection: SDPConnection;
              emails: any[];
              information: string;
              key: SDPKey;
              medias: any[];
              origin: SDPOrigin;
              phones: any[];
              session_name: string;
              times: any[];
              uri: string;
              version: string;
              zones: any[];
          },
      >

    Returns SDPMessage

Properties

attributes: any[]
bandwidths: any[]
connection: SDPConnection
emails: any[]
information: string
key: SDPKey
medias: any[]
origin: SDPOrigin
phones: any[]
session_name: string
times: any[]
uri: string
version: string
zones: any[]
$gtype: GType<SDPMessage>

Methods

  • Add time zone information to msg.

    Parameters

    • adj_time: string

      the NTP time that a time zone adjustment happens

    • typed_time: string

      the offset from the time when the session was first scheduled

    Returns SDPResult

    a GstSdp.SDPResult.

  • Convert the contents of msg to a text string.

    Returns string

    A dynamically allocated string representing the SDP description.

  • Get the number of bandwidth information in msg.

    Returns number

    the number of bandwidth information in msg.

  • Get the first attribute with key key in msg.

    Parameters

    • key: string

      the key

    Returns string

    the attribute value of the first attribute with key.

  • Get the nth attribute with key key in msg.

    Parameters

    • key: string

      the key

    • nth: number

      the index

    Returns string

    the attribute value of the nth attribute with key.

  • Get the email with number idx from msg.

    Parameters

    • idx: number

      an email index

    Returns string

    the email at position idx.

  • Get the phone with number idx from msg.

    Parameters

    • idx: number

      a phone index

    Returns string

    the phone at position idx.

  • Get the number of media descriptions in msg.

    Returns number

    the number of media descriptions in msg.

  • Remove the media at idx from the array of medias in msg if found.

    Parameters

    • idx: number

      the media index

    Returns SDPResult

    #GST_SDP_OK when the specified media is found at idx and removed, #GST_SDP_EINVAL otherwise.

  • Configure the SDP connection in msg with the given parameters.

    Parameters

    • nettype: string

      the type of network. "IN" is defined to have the meaning "Internet".

    • addrtype: string

      the type of address.

    • address: string

      the address

    • ttl: number

      the time to live of the address

    • addr_number: number

      the number of layers

    Returns SDPResult

    a GstSdp.SDPResult.

  • Configure the SDP origin in msg with the given parameters.

    Parameters

    • username: string

      the user name

    • sess_id: string

      a session id

    • sess_version: string

      a session version

    • nettype: string

      a network type

    • addrtype: string

      an address type

    • addr: string

      an address

    Returns SDPResult

    #GST_SDP_OK.

  • Get the number of time information entries in msg.

    Returns number

    the number of time information entries in msg.

  • Get the number of time zone information entries in msg.

    Returns number

    the number of time zone information entries in msg.

  • Initialize msg so that its contents are as if it was freshly allocated with gst_sdp_message_new(). This function is mostly used to initialize a message allocated on the stack. gst_sdp_message_uninit() undoes this operation.

    When this function is invoked on newly allocated data (with malloc or on the stack), its contents should be set to 0 before calling this function.

    Returns [SDPResult, SDPMessage]