GstSdp.MIKEYMessage¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
CSB_id |
r/w |
Identifies the Crypto Session Bundle |
|
V |
r/w |
verify flag |
|
map_info |
[ |
r/w |
map info array of type depending on map_type |
map_type |
r/w |
||
mini_object |
r |
||
payloads |
[ |
r/w |
the payload array of |
prf_func |
r/w |
||
type |
r/w |
the |
|
version |
r/w |
the version |
Methods¶
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class GstSdp.MIKEYMessage¶
Structure holding the information of the MIKEY message
- classmethod new()[source]¶
- Returns:
a new
GstSdp.MIKEYMessage
on success- Return type:
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.MIKEYMessage
from bytes.New in version 1.4.
- classmethod new_from_caps(caps)[source]¶
- Parameters:
caps (
Gst.Caps
) – aGst.Caps
, including SRTP parameters (srtp/srtcp cipher, authorization, key data)- Returns:
a
GstSdp.MIKEYMessage
, orNone
if there is no srtp information in the caps.- Return type:
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
- Raises:
- Returns:
a
GstSdp.MIKEYMessage
on success orNone
when 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.
- add_cs_srtp(policy, ssrc, roc)[source]¶
- Parameters:
- Returns:
True
on success- Return type:
Add a Crypto policy for SRTP to self.
New in version 1.4.
- add_payload(payload)[source]¶
- Parameters:
payload (
GstSdp.MIKEYPayload
) – aGstSdp.MIKEYPayload
- Returns:
True
on success- Return type:
Add a new payload to self.
New in version 1.4.
- add_pke(C, data)[source]¶
- Parameters:
C (
GstSdp.MIKEYCacheType
) – envelope key cache indicatordata (
bytes
) – the encrypted envelope key
- Returns:
True
on success- Return type:
Add a new PKE payload to self with the given parameters.
New in version 1.4.
- add_rand(rand)[source]¶
-
Add a new RAND payload to self with the given parameters.
New in version 1.4.
- add_rand_len(len)[source]¶
-
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 usedts_value (
bytes
) – The timestamp value of the specified type
- Returns:
True
on success- Return type:
Add a new T payload to self with the given parameters.
New in version 1.4.
- add_t_now_ntp_utc()[source]¶
-
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.MIKEYPayload
of type.- Return type:
Find the nth occurrence of the payload with type in self.
New in version 1.4.
- get_cs_srtp(idx)[source]¶
- Parameters:
idx (
int
) – an index- Returns:
- Return type:
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:
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:
Get the number of payloads in self.
New in version 1.4.
- get_payload(idx)[source]¶
- Parameters:
idx (
int
) – an index- Returns:
the
GstSdp.MIKEYPayload
at idx. The payload remains valid for as long as it is part of self.- Return type:
Get the
GstSdp.MIKEYPayload
at idx in selfNew in version 1.4.
- insert_cs_srtp(idx, map)[source]¶
- Parameters:
idx (
int
) – the index to insert atmap (
GstSdp.MIKEYMapSRTP
) – the map info
- Returns:
True
on 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.
- insert_payload(idx, payload)[source]¶
- Parameters:
idx (
int
) – an indexpayload (
GstSdp.MIKEYPayload
) – aGstSdp.MIKEYPayload
- Returns:
True
on 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.
- replace_cs_srtp(idx, map)[source]¶
- Parameters:
idx (
int
) – the index to insert atmap (
GstSdp.MIKEYMapSRTP
) – the map info
- Returns:
True
on success- Return type:
Replace a Crypto Session map for SRTP in self at idx with map.
New in version 1.4.
- replace_payload(idx, payload)[source]¶
- Parameters:
idx (
int
) – an indexpayload (
GstSdp.MIKEYPayload
) – aGstSdp.MIKEYPayload
- Returns:
True
on success- Return type:
Replace the payload at idx in self with payload.
New in version 1.4.
- set_info(version, type, V, prf_func, CSB_id, map_type)[source]¶
- Parameters:
version (
int
) – a versiontype (
GstSdp.MIKEYType
) – aGstSdp.MIKEYType
V (
bool
) – verify flagprf_func (
GstSdp.MIKEYPRFFunc
) – theGstSdp.MIKEYPRFFunc
function to useCSB_id (
int
) – the Crypto Session Bundle idmap_type (
GstSdp.MIKEYMapType
) – theGstSdp.MIKEYMapType
- Returns:
True
on success- Return type:
Set the information in self.
New in version 1.4.
- to_bytes(info)[source]¶
- Parameters:
info (
GstSdp.MIKEYEncryptInfo
) – aGstSdp.MIKEYEncryptInfo
- Raises:
- Returns:
a new
GLib.Bytes
for self.- Return type:
Convert self to a
GLib.Bytes
.New in version 1.4.