GstSdp.MIKEYMessage¶
Fields¶
| Name | Type | Access | Description | 
|---|---|---|---|
| CSB_id | int | r/w | Identifies the Crypto Session Bundle | 
| V | bool | r/w | verify flag | 
| map_info | [ object] | r/w | map info array of type depending on map_type | 
| map_type | GstSdp.MIKEYMapType | r/w | a GstSdp.MIKEYMapType | 
| mini_object | Gst.MiniObject | r | |
| payloads | [ object] | r/w | the payload array of GstSdp.MIKEYPayload | 
| prf_func | GstSdp.MIKEYPRFFunc | r/w | a GstSdp.MIKEYPRFFunc | 
| type | GstSdp.MIKEYType | r/w | the GstSdp.MIKEYTypemessage type | 
| version | int | r/w | the version | 
Methods¶
| class | new() | 
| class | new_from_bytes(bytes, info) | 
| class | new_from_caps(caps) | 
| class | new_from_data(data, info) | 
| add_cs_srtp(policy, ssrc, roc) | |
| add_payload(payload) | |
| add_pke(C, data) | |
| add_rand(rand) | |
| add_rand_len(len) | |
| add_t(type, ts_value) | |
| add_t_now_ntp_utc() | |
| base64_encode() | |
| find_payload(type, nth) | |
| get_cs_srtp(idx) | |
| get_n_cs() | |
| get_n_payloads() | |
| get_payload(idx) | |
| insert_cs_srtp(idx, map) | |
| insert_payload(idx, payload) | |
| remove_cs_srtp(idx) | |
| remove_payload(idx) | |
| replace_cs_srtp(idx, map) | |
| replace_payload(idx, payload) | |
| set_info(version, type, V, prf_func, CSB_id, map_type) | |
| to_bytes(info) | |
| to_caps(caps) | 
Details¶
- 
class GstSdp.MIKEYMessage¶
- Structure holding the information of the MIKEY message - 
classmethod new()[source]¶
- Returns: - a new - GstSdp.MIKEYMessageon success- Return type: - GstSdp.MIKEYMessage- Make a new MIKEY message. - New in version 1.4. 
 - 
classmethod new_from_bytes(bytes, info)[source]¶
- Parameters: - bytes (GLib.Bytes) – aGLib.Bytes
- info (GstSdp.MIKEYDecryptInfo) – aGstSdp.MIKEYDecryptInfo
 - Raises: - Returns: - a new - GstSdp.MIKEYMessage- Return type: - Make a new - GstSdp.MIKEYMessagefrom bytes.- New in version 1.4. 
- bytes (
 - 
classmethod new_from_caps(caps)[source]¶
- Parameters: - caps ( - Gst.Caps) – a- Gst.Caps, including SRTP parameters (srtp/srtcp cipher, authorization, key data)- Returns: - a - GstSdp.MIKEYMessage, or- Noneif there is no srtp information in the caps.- Return type: - GstSdp.MIKEYMessage- Makes mikey message including: - Security Policy Payload
- Key Data Transport Payload
- Key Data Sub-Payload
 - New in version 1.8. 
 - 
classmethod new_from_data(data, info)[source]¶
- Parameters: - data (bytes) – bytes to read
- info (GstSdp.MIKEYDecryptInfo) –GstSdp.MIKEYDecryptInfo
 - Raises: - Returns: - a - GstSdp.MIKEYMessageon success or- Nonewhen parsing failed and error will be set.- Return type: - Parse size bytes from data into a - GstSdp.MIKEYMessage. info contains the parameters to decrypt and verify the data.- New in version 1.4. 
- data (
 - 
add_cs_srtp(policy, ssrc, roc)[source]¶
- Parameters: - Returns: - Trueon success- Return type: - Add a Crypto policy for SRTP to self. - New in version 1.4. 
 - 
add_payload(payload)[source]¶
- Parameters: - payload ( - GstSdp.MIKEYPayload) – a- GstSdp.MIKEYPayload- Returns: - Trueon success- Return type: - bool- Add a new payload to self. - New in version 1.4. 
 - 
add_pke(C, data)[source]¶
- Parameters: - C (GstSdp.MIKEYCacheType) – envelope key cache indicator
- data (bytes) – the encrypted envelope key
 - Returns: - Trueon success- Return type: - Add a new PKE payload to self with the given parameters. - New in version 1.4. 
- C (
 - 
add_rand(rand)[source]¶
- Parameters: - rand ( - bytes) – random data- Returns: - Trueon success- Return type: - bool- Add a new RAND payload to self with the given parameters. - New in version 1.4. 
 - 
add_rand_len(len)[source]¶
- Parameters: - len ( - int) – length- Returns: - Trueon success- Return type: - bool- Add a new RAND payload to self with len random bytes. - New in version 1.4. 
 - 
add_t(type, ts_value)[source]¶
- Parameters: - type (GstSdp.MIKEYTSType) – specifies the timestamp type used
- ts_value (bytes) – The timestamp value of the specified type
 - Returns: - Trueon success- Return type: - Add a new T payload to self with the given parameters. - New in version 1.4. 
- type (
 - 
add_t_now_ntp_utc()[source]¶
- Returns: - Trueon success- Return type: - bool- Add a new T payload to self that contains the current time in NTP-UTC format. - New in version 1.4. 
 - 
find_payload(type, nth)[source]¶
- Parameters: - type (GstSdp.MIKEYPayloadType) – aGstSdp.MIKEYPayloadType
- nth (int) – payload to find
 - Returns: - the nth - GstSdp.MIKEYPayloadof type.- Return type: - Find the nth occurrence of the payload with type in self. - New in version 1.4. 
- type (
 - 
get_cs_srtp(idx)[source]¶
- Parameters: - idx ( - int) – an index- Returns: - a - GstSdp.MIKEYMapSRTP- Return type: - GstSdp.MIKEYMapSRTP- Get the policy information of self at idx. - New in version 1.4. 
 - 
get_n_cs()[source]¶
- Returns: - the number of crypto sessions - Return type: - int- Get the number of crypto sessions in self. - New in version 1.4. 
 - 
get_n_payloads()[source]¶
- Returns: - the number of payloads in self - Return type: - int- Get the number of payloads in self. - New in version 1.4. 
 - 
get_payload(idx)[source]¶
- Parameters: - idx ( - int) – an index- Returns: - the - GstSdp.MIKEYPayloadat idx. The payload remains valid for as long as it is part of self.- Return type: - GstSdp.MIKEYPayload- Get the - GstSdp.MIKEYPayloadat idx in self- New in version 1.4. 
 - 
insert_cs_srtp(idx, map)[source]¶
- Parameters: - idx (int) – the index to insert at
- map (GstSdp.MIKEYMapSRTP) – the map info
 - Returns: - Trueon success- Return type: - Insert a Crypto Session map for SRTP in self at idx - When idx is -1, the policy will be appended. - New in version 1.4. 
- idx (
 - 
insert_payload(idx, payload)[source]¶
- Parameters: - idx (int) – an index
- payload (GstSdp.MIKEYPayload) – aGstSdp.MIKEYPayload
 - Returns: - Trueon success- Return type: - Insert the payload at index idx in self. If idx is -1, the payload will be appended to self. - New in version 1.4. 
- idx (
 - 
remove_cs_srtp(idx)[source]¶
- Parameters: - idx ( - int) – the index to remove- Returns: - Trueon success- Return type: - bool- Remove the SRTP policy at idx. - New in version 1.4. 
 - 
remove_payload(idx)[source]¶
- Parameters: - idx ( - int) – an index- Returns: - Trueon success- Return type: - bool- Remove the payload in self at idx - New in version 1.4. 
 - 
replace_cs_srtp(idx, map)[source]¶
- Parameters: - idx (int) – the index to insert at
- map (GstSdp.MIKEYMapSRTP) – the map info
 - Returns: - Trueon success- Return type: - Replace a Crypto Session map for SRTP in self at idx with map. - New in version 1.4. 
- idx (
 - 
replace_payload(idx, payload)[source]¶
- Parameters: - idx (int) – an index
- payload (GstSdp.MIKEYPayload) – aGstSdp.MIKEYPayload
 - Returns: - Trueon success- Return type: - Replace the payload at idx in self with payload. - New in version 1.4. 
- idx (
 - 
set_info(version, type, V, prf_func, CSB_id, map_type)[source]¶
- Parameters: - version (int) – a version
- type (GstSdp.MIKEYType) – aGstSdp.MIKEYType
- V (bool) – verify flag
- prf_func (GstSdp.MIKEYPRFFunc) – theGstSdp.MIKEYPRFFuncfunction to use
- CSB_id (int) – the Crypto Session Bundle id
- map_type (GstSdp.MIKEYMapType) – theGstSdp.MIKEYMapType
 - Returns: - Trueon success- Return type: - Set the information in self. - New in version 1.4. 
- version (
 - 
to_bytes(info)[source]¶
- Parameters: - info ( - GstSdp.MIKEYEncryptInfo) – a- GstSdp.MIKEYEncryptInfo- Raises: - GLib.Error- Returns: - a new - GLib.Bytesfor self.- Return type: - GLib.Bytes- Convert self to a - GLib.Bytes.- New in version 1.4. 
 
- 
classmethod