Class (GI Struct)

GstSdp-1.0GstSdpSDPMedia

The contents of the SDP "m=" field with all related fields.

Index

Constructors

  • Parameters

    • Optionalproperties: Partial<
          {
              attributes: any[];
              bandwidths: any[];
              connections: any[];
              fmts: any[];
              information: string;
              key: SDPKey;
              media: string;
              num_ports: number;
              port: number;
              proto: string;
          },
      >

    Returns SDPMedia

Properties

attributes: any[]
bandwidths: any[]
connections: any[]
fmts: any[]
information: string
key: SDPKey
media: string
num_ports: number
port: number
proto: string
$gtype: GType<SDPMedia>

Methods

  • Add the bandwidth information with bwtype and bandwidth to media.

    Parameters

    • bwtype: string

      the bandwidth modifier type

    • bandwidth: number

      the bandwidth in kilobits per second

    Returns SDPResult

    #GST_SDP_OK.

  • Add the given connection parameters to media.

    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.

  • Convert the contents of media to a text string.

    Returns string

    A dynamically allocated string representing the media.

  • Get the number of attribute fields in media.

    Returns number

    the number of attributes in media.

  • Get the number of bandwidth fields in media.

    Returns number

    the number of bandwidths in media.

  • Get the number of connection fields in media.

    Returns number

    the number of connections in media.

  • Get the first attribute value for key in media.

    Parameters

    • key: string

      a key

    Returns string

    the first attribute value for key.

  • Get the nth attribute value for key in media.

    Parameters

    • key: string

      a key

    • nth: number

      an index

    Returns string

    the nth attribute value.

  • Mapping of caps from SDP fields:

    a=rtpmap:(payload) (encoding_name)/(clock_rate)[/(encoding_params)]

    a=framesize:(payload) (width)-(height)

    a=fmtp:(payload) (param)[=(value)];...

    Note that the extmap, ssrc and rid attributes are set only by gst_sdp_media_attributes_to_caps().

    Parameters

    • pt: number

      a payload type

    Returns Gst.Caps

    a Gst.Caps, or null if an error happened

  • Get the format information at position idx in media.

    Parameters

    • idx: number

      an index

    Returns string

    the format at position idx.

  • Insert the format information to media at idx. When idx is -1, the format is appended.

    Parameters

    • idx: number

      an index

    • format: string

      the format

    Returns SDPResult

    #GST_SDP_OK.

  • Initialize media so that its contents are as if it was freshly allocated with gst_sdp_media_new(). This function is mostly used to initialize a media allocated on the stack. gst_sdp_media_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, SDPMedia]

  • Mapping of caps to SDP fields:

    a=rtpmap:(payload) (encoding_name) or (clock_rate)[or (encoding_params)]

    a=framesize:(payload) (width)-(height)

    a=fmtp:(payload) (param)[=(value)];...

    a=rtcp-fb:(payload) (param1) [param2]...

    a=extmap:(id)[/direction] (extensionname) (extensionattributes)

    Parameters

    Returns [SDPResult, SDPMedia]