GstSdp.SDPMessage¶
Fields¶
| Name | Type | Access | Description | 
|---|---|---|---|
| attributes | [ object] | r/w | array of GstSdp.SDPAttributewith session attributes | 
| bandwidths | [ object] | r/w | array of GstSdp.SDPBandwidthwith bandwidth information | 
| connection | GstSdp.SDPConnection | r/w | connection information for the session | 
| emails | [ object] | r/w | array of strwith email addresses | 
| information | str | r/w | session information | 
| key | GstSdp.SDPKey | r/w | encryption key | 
| medias | [ object] | r/w | array of GstSdp.SDPMediawith media descriptions | 
| origin | GstSdp.SDPOrigin | r/w | owner/creator and session identifier | 
| phones | [ object] | r/w | array of strwith phone numbers | 
| session_name | str | r/w | session name | 
| times | [ object] | r/w | array of GstSdp.SDPTimewith time descriptions | 
| uri | str | r/w | URI of description | 
| version | str | r/w | the protocol version | 
| zones | [ object] | r/w | array of GstSdp.SDPZonewith time zone adjustments | 
Methods¶
Details¶
- 
class GstSdp.SDPMessage¶
- The - GstSdp.SDPMessagehelper functions makes it easy to parse and create SDP messages.- 
classmethod as_uri(scheme, msg)[source]¶
- Parameters: - scheme (str) – the uri scheme
- msg (GstSdp.SDPMessage) – theGstSdp.SDPMessage
 - Returns: - a uri for msg. - Return type: - 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. 
- scheme (
 - 
classmethod new()[source]¶
- Returns: - a - GstSdp.SDPResult.- msg: - pointer to new - GstSdp.SDPMessage- Return type: - ( - GstSdp.SDPResult, msg:- GstSdp.SDPMessage)- Allocate a new - GstSdp.SDPMessageand store the result in msg.
 - 
classmethod new_from_text(text)[source]¶
- 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. 
 - 
classmethod parse_buffer(data, msg)[source]¶
- Parameters: - data (bytes) – the start of the buffer
- msg (GstSdp.SDPMessage) – the resultGstSdp.SDPMessage
 - Returns: - GstSdp.SDPResult.OKon success.- Return type: - Parse the contents of size bytes pointed to by data and store the result in msg. 
- data (
 - 
classmethod parse_uri(uri, msg)[source]¶
- Parameters: - uri (str) – the start of the uri
- msg (GstSdp.SDPMessage) – the resultGstSdp.SDPMessage
 - Returns: - GstSdp.SDPResult.OKon success.- Return type: - 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 
- uri (
 - 
add_attribute(key, value)[source]¶
- Parameters: - Returns: - Return type: - Add the attribute with key and value to self. 
 - 
add_bandwidth(bwtype, bandwidth)[source]¶
- Parameters: - Returns: - Return type: - Add the specified bandwidth information to self. 
 - 
add_email(email)[source]¶
- Parameters: - email ( - str) – an email- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Add email to the list of emails in self. 
 - 
add_media(media)[source]¶
- Parameters: - media ( - GstSdp.SDPMedia) – a- GstSdp.SDPMediato add- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Adds media to the array of medias in self. This function takes ownership of the contents of media so that media will have to be reinitialized with - GstSdp.SDPMedia.init() before it can be used again.
 - 
add_phone(phone)[source]¶
- Parameters: - phone ( - str) – a phone- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Add phone to the list of phones in self. 
 - 
add_time(start, stop, repeat)[source]¶
- Parameters: - Returns: - Return type: - Add time information start and stop to self. 
 - 
add_zone(adj_time, typed_time)[source]¶
- Parameters: - Returns: - Return type: - Add time zone information to self. 
 - 
as_text()[source]¶
- Returns: - A dynamically allocated string representing the SDP description. - Return type: - str- Convert the contents of self to a text string. 
 - 
attributes_len()[source]¶
- Returns: - the number of attributes in self. - Return type: - int- Get the number of attributes in self. 
 - 
attributes_to_caps(caps)[source]¶
- Parameters: - caps ( - Gst.Caps) – a- Gst.Caps- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Mapping of attributes of - GstSdp.SDPMessageto- Gst.Caps- New in version 1.8. 
 - 
bandwidths_len()[source]¶
- Returns: - the number of bandwidth information in self. - Return type: - int- Get the number of bandwidth information in self. 
 - 
copy()[source]¶
- Returns: - a - GstSdp.SDPResult- copy: - pointer to new - GstSdp.SDPMessage- Return type: - ( - GstSdp.SDPResult, copy:- GstSdp.SDPMessage)- Allocate a new copy of self and store the result in copy. The value in copy should be release with - GstSdp.SDPMessage.freefunction.- New in version 1.2. 
 - 
dump()[source]¶
- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Dump the parsed contents of self to stdout. 
 - 
emails_len()[source]¶
- Returns: - the number of emails in self. - Return type: - int- Get the number of emails in self. 
 - 
free()[source]¶
- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Free all resources allocated by self. self should not be used anymore after this function. This function should be used when self was dynamically allocated with - GstSdp.SDPMessage.new().
 - 
get_attribute(idx)[source]¶
- Parameters: - idx ( - int) – the index- Returns: - the - GstSdp.SDPAttributeat position idx.- Return type: - GstSdp.SDPAttribute- Get the attribute at position idx in self. 
 - 
get_attribute_val(key)[source]¶
- Parameters: - key ( - str) – the key- Returns: - the attribute value of the first attribute with key. - Return type: - str- Get the first attribute with key key in self. 
 - 
get_attribute_val_n(key, nth)[source]¶
- Parameters: - Returns: - the attribute value of the nth attribute with key. - Return type: - Get the nth attribute with key key in self. 
 - 
get_bandwidth(idx)[source]¶
- Parameters: - idx ( - int) – the bandwidth index- Returns: - a - GstSdp.SDPBandwidth.- Return type: - GstSdp.SDPBandwidth- Get the bandwidth at index idx from self. 
 - 
get_connection()[source]¶
- Returns: - a - GstSdp.SDPConnection. The result remains valid as long as self is valid.- Return type: - GstSdp.SDPConnection- Get the connection of self. 
 - 
get_email(idx)[source]¶
- Parameters: - idx ( - int) – an email index- Returns: - the email at position idx. - Return type: - str- Get the email with number idx from self. 
 - 
get_information()[source]¶
- Returns: - a - GstSdp.SDPResult.- Return type: - str- Get the information in self. 
 - 
get_key()[source]¶
- Returns: - a - GstSdp.SDPKey.- Return type: - GstSdp.SDPKey- Get the encryption information from self. 
 - 
get_media(idx)[source]¶
- Parameters: - idx ( - int) – the index- Returns: - a - GstSdp.SDPMedia.- Return type: - GstSdp.SDPMedia- Get the media description at index idx in self. 
 - 
get_origin()[source]¶
- Returns: - a - GstSdp.SDPOrigin. The result remains valid as long as self is valid.- Return type: - GstSdp.SDPOrigin- Get the origin of self. 
 - 
get_phone(idx)[source]¶
- Parameters: - idx ( - int) – a phone index- Returns: - the phone at position idx. - Return type: - str- Get the phone with number idx from self. 
 - 
get_session_name()[source]¶
- Returns: - a - GstSdp.SDPResult.- Return type: - str- Get the session name in self. 
 - 
get_time(idx)[source]¶
- Parameters: - idx ( - int) – the time index- Returns: - a - GstSdp.SDPTime.- Return type: - GstSdp.SDPTime- Get time information with index idx from self. 
 - 
get_uri()[source]¶
- Returns: - a - GstSdp.SDPResult.- Return type: - str- Get the URI in self. 
 - 
get_version()[source]¶
- Returns: - a - GstSdp.SDPResult.- Return type: - str- Get the version in self. 
 - 
get_zone(idx)[source]¶
- Parameters: - idx ( - int) – the zone index- Returns: - a - GstSdp.SDPZone.- Return type: - GstSdp.SDPZone- Get time zone information with index idx from self. 
 - 
init()[source]¶
- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Initialize self 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. 
 - 
insert_attribute(idx, attr)[source]¶
- Parameters: - idx (int) – an index
- attr (GstSdp.SDPAttribute) – aGstSdp.SDPAttribute
 - Returns: - Return type: - Insert attribute into the array of attributes in self at index idx. When -1 is given as idx, the attribute is inserted at the end. - New in version 1.2. 
- idx (
 - 
insert_bandwidth(idx, bw)[source]¶
- Parameters: - idx (int) – an index
- bw (GstSdp.SDPBandwidth) – the bandwidth
 - Returns: - Return type: - Insert bandwidth parameters into the array of bandwidths in self at index idx. When -1 is given as idx, the bandwidth is inserted at the end. - New in version 1.2. 
- idx (
 - 
insert_email(idx, email)[source]¶
- Parameters: - Returns: - Return type: - Insert email into the array of emails in self at index idx. When -1 is given as idx, the email is inserted at the end. - New in version 1.2. 
 - 
insert_phone(idx, phone)[source]¶
- Parameters: - Returns: - Return type: - Insert phone into the array of phone numbers in self at index idx. When -1 is given as idx, the phone is inserted at the end. - New in version 1.2. 
 - 
insert_time(idx, t)[source]¶
- Parameters: - idx (int) – an index
- t (GstSdp.SDPTime) – aGstSdp.SDPTime
 - Returns: - Return type: - Insert time parameters into the array of times in self at index idx. When -1 is given as idx, the times are inserted at the end. - New in version 1.2. 
- idx (
 - 
insert_zone(idx, zone)[source]¶
- Parameters: - idx (int) – an index
- zone (GstSdp.SDPZone) – aGstSdp.SDPZone
 - Returns: - Return type: - Insert zone parameters into the array of zones in self at index idx. When -1 is given as idx, the zone is inserted at the end. - New in version 1.2. 
- idx (
 - 
medias_len()[source]¶
- Returns: - the number of media descriptions in self. - Return type: - int- Get the number of media descriptions in self. 
 - 
parse_keymgmt()[source]¶
- Returns: - a - GstSdp.SDPResult.- mikey: - pointer to new - GstSdp.MIKEYMessage- Return type: - ( - GstSdp.SDPResult, mikey:- GstSdp.MIKEYMessage)- Creates a new - GstSdp.MIKEYMessageafter parsing the key-mgmt attribute from a- GstSdp.SDPMessage.- New in version 1.8.1. 
 - 
phones_len()[source]¶
- Returns: - the number of phones in self. - Return type: - int- Get the number of phones in self. 
 - 
remove_attribute(idx)[source]¶
- Parameters: - idx ( - int) – the index- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Remove the attribute in self at index idx. - New in version 1.2. 
 - 
remove_bandwidth(idx)[source]¶
- Parameters: - idx ( - int) – the bandwidth index- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Remove the bandwidth information in self at index idx. - New in version 1.2. 
 - 
remove_email(idx)[source]¶
- Parameters: - idx ( - int) – an email index- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Remove the email in self at index idx. - New in version 1.2. 
 - 
remove_phone(idx)[source]¶
- Parameters: - idx ( - int) – a phone index- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Remove the phone number in self at index idx. - New in version 1.2. 
 - 
remove_time(idx)[source]¶
- Parameters: - idx ( - int) – the index- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Remove the time information in self at index idx. - New in version 1.2. 
 - 
remove_zone(idx)[source]¶
- Parameters: - idx ( - int) – the index- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Remove the zone information in self at index idx. - New in version 1.2. 
 - 
replace_attribute(idx, attr)[source]¶
- Parameters: - idx (int) – the index
- attr (GstSdp.SDPAttribute) – aGstSdp.SDPAttribute
 - Returns: - Return type: - Replace the attribute in self at index idx with attr. - New in version 1.2. 
- idx (
 - 
replace_bandwidth(idx, bw)[source]¶
- Parameters: - idx (int) – the bandwidth index
- bw (GstSdp.SDPBandwidth) – the bandwidth
 - Returns: - Return type: - Replace the bandwidth information in self at index idx with bw. - New in version 1.2. 
- idx (
 - 
replace_email(idx, email)[source]¶
- Parameters: - Returns: - Return type: - Replace the email in self at index idx with email. - New in version 1.2. 
 - 
replace_phone(idx, phone)[source]¶
- Parameters: - Returns: - Return type: - Replace the phone number in self at index idx with phone. - New in version 1.2. 
 - 
replace_time(idx, t)[source]¶
- Parameters: - idx (int) – the index
- t (GstSdp.SDPTime) – aGstSdp.SDPTime
 - Returns: - Return type: - Replace the time information in self at index idx with t. - New in version 1.2. 
- idx (
 - 
replace_zone(idx, zone)[source]¶
- Parameters: - idx (int) – the index
- zone (GstSdp.SDPZone) – aGstSdp.SDPZone
 - Returns: - Return type: - Replace the zone information in self at index idx with zone. - New in version 1.2. 
- idx (
 - 
set_connection(nettype, addrtype, address, ttl, addr_number)[source]¶
- Parameters: - Returns: - Return type: - Configure the SDP connection in self with the given parameters. 
 - 
set_information(information)[source]¶
- Parameters: - information ( - str) – the information- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Set the information in self. 
 - 
set_key(type, data)[source]¶
- Parameters: - Returns: - Return type: - Adds the encryption information to self. 
 - 
set_origin(username, sess_id, sess_version, nettype, addrtype, addr)[source]¶
- Parameters: - Returns: - Return type: - Configure the SDP origin in self with the given parameters. 
 - 
set_session_name(session_name)[source]¶
- Parameters: - session_name ( - str) – the session name- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Set the session name in self. 
 - 
set_uri(uri)[source]¶
- Parameters: - uri ( - str) – the URI- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Set the URI in self. 
 - 
set_version(version)[source]¶
- Parameters: - version ( - str) – the version- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Set the version in self. 
 - 
times_len()[source]¶
- Returns: - the number of time information entries in self. - Return type: - int- Get the number of time information entries in self. 
 - 
uninit()[source]¶
- Returns: - a - GstSdp.SDPResult.- Return type: - GstSdp.SDPResult- Free all resources allocated in self. self should not be used anymore after this function. This function should be used when self was allocated on the stack and initialized with - GstSdp.SDPMessage.init().
 
- 
classmethod