Functions

sdp_address_is_multicast (nettype, addrtype, addr)

sdp_make_keymgmt (uri, base64)

sdp_media_init ()

sdp_media_new ()

sdp_media_set_media_from_caps (caps)

sdp_message_as_uri (scheme, msg)

sdp_message_init ()

sdp_message_new ()

sdp_message_new_from_text (text)

sdp_message_parse_buffer (data, msg)

sdp_message_parse_uri (uri, msg)

Details

GstSdp.sdp_address_is_multicast(nettype, addrtype, addr)
Parameters:
  • nettype (str) – a network type

  • addrtype (str) – an address type

  • addr (str) – an address

Returns:

True when addr is multicast.

Return type:

bool

Check if the given addr is a multicast address.

GstSdp.sdp_make_keymgmt(uri, base64)
Parameters:
  • uri (str) – a str URI

  • base64 (str) – a str base64-encoded key data

Returns:

a str key-mgmt data,

Return type:

str

Makes key management data

New in version 1.8.

GstSdp.sdp_media_init()
Returns:

a GstSdp.SDPResult.

media:

a GstSdp.SDPMedia

Return type:

(GstSdp.SDPResult, media: GstSdp.SDPMedia)

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

GstSdp.sdp_media_new()
Returns:

a GstSdp.SDPResult.

media:

pointer to new GstSdp.SDPMedia

Return type:

(GstSdp.SDPResult, media: GstSdp.SDPMedia)

Allocate a new GstSdp.SDPMedia and store the result in media.

GstSdp.sdp_media_set_media_from_caps(caps)
Parameters:

caps (Gst.Caps) – a Gst.Caps

Returns:

a GstSdp.SDPResult.

media:

a GstSdp.SDPMedia

Return type:

(GstSdp.SDPResult, media: GstSdp.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)

New in version 1.8.

GstSdp.sdp_message_as_uri(scheme, msg)
Parameters:
Returns:

a uri for msg.

Return type:

str

Creates a uri from msg with the given scheme. The uri has the format:

\`scheme`:///[#type=value *[&type=value]]

Where each value is url encoded.

GstSdp.sdp_message_init()
Returns:

a GstSdp.SDPResult.

msg:

a GstSdp.SDPMessage

Return type:

(GstSdp.SDPResult, msg: GstSdp.SDPMessage)

Initialize msg so that its contents are as if it was freshly allocated with GstSdp.SDPMessage.new(). This function is mostly used to initialize a message allocated on the stack. GstSdp.SDPMessage.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.

GstSdp.sdp_message_new()
Returns:

a GstSdp.SDPResult.

msg:

pointer to new GstSdp.SDPMessage

Return type:

(GstSdp.SDPResult, msg: GstSdp.SDPMessage)

Allocate a new GstSdp.SDPMessage and store the result in msg.

GstSdp.sdp_message_new_from_text(text)
Parameters:

text (str) – A dynamically allocated string representing the SDP description

Returns:

a GstSdp.SDPResult.

msg:

pointer to new GstSdp.SDPMessage

Return type:

(GstSdp.SDPResult, msg: GstSdp.SDPMessage)

Parse text and create a new SDPMessage from these.

New in version 1.16.

GstSdp.sdp_message_parse_buffer(data, msg)
Parameters:
Returns:

GstSdp.SDPResult.OK on success.

Return type:

GstSdp.SDPResult

Parse the contents of size bytes pointed to by data and store the result in msg.

GstSdp.sdp_message_parse_uri(uri, msg)
Parameters:
Returns:

GstSdp.SDPResult.OK on success.

Return type:

GstSdp.SDPResult

Parse the null-terminated uri and store the result in msg.

The uri should be of the form:

scheme://[address’:ttl=ttl [:noa=noa]’]/’sessionname [#type=value *[&type=value]’]

where value is url encoded. This looslely resembles http://tools.ietf.org/html/draft-fujikawa-sdp-url-01