Update webrtc/sdp docs

This commit is contained in:
Sebastian Dröge 2018-04-05 22:25:13 +03:00
parent d850a4d50a
commit ad038cb54d
2 changed files with 515 additions and 6 deletions

View file

@ -39,10 +39,442 @@ HMAC-SHA-1-160
<!-- enum MIKEYMapType -->
Specifies the method of uniquely mapping Crypto Sessions to the security
protocol sessions.
<!-- struct MIKEYMessage -->
Structure holding the information of the MIKEY message
<!-- impl MIKEYMessage::fn new -->
Make a new MIKEY message.
# Returns
a new `MIKEYMessage` on success
<!-- impl MIKEYMessage::fn new_from_bytes -->
Make a new `MIKEYMessage` from `bytes`.
## `bytes`
a `glib::Bytes`
## `info`
a `MIKEYDecryptInfo`
# Returns
a new `MIKEYMessage`
<!-- impl MIKEYMessage::fn new_from_caps -->
Makes mikey message including:
- Security Policy Payload
- Key Data Transport Payload
- Key Data Sub-Payload
## `caps`
a `gst::Caps`, including SRTP parameters (srtp/srtcp cipher, authorization, key data)
# Returns
a `MIKEYMessage`,
or `None` if there is no srtp information in the caps.
<!-- impl MIKEYMessage::fn new_from_data -->
Parse `size` bytes from `data` into a `MIKEYMessage`. `info` contains the
parameters to decrypt and verify the data.
## `data`
bytes to read
## `size`
length of `data`
## `info`
`MIKEYDecryptInfo`
# Returns
a `MIKEYMessage` on success or `None` when parsing failed and
`error` will be set.
<!-- impl MIKEYMessage::fn add_cs_srtp -->
Add a Crypto policy for SRTP to `self`.
## `policy`
The security policy applied for the stream with `ssrc`
## `ssrc`
the SSRC that must be used for the stream
## `roc`
current rollover counter
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_payload -->
Add a new payload to `self`.
## `payload`
a `MIKEYPayload`
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_pke -->
Add a new PKE payload to `self` with the given parameters.
## `C`
envelope key cache indicator
## `data_len`
the length of `data`
## `data`
the encrypted envelope key
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_rand -->
Add a new RAND payload to `self` with the given parameters.
## `len`
the length of `rand`
## `rand`
random data
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_rand_len -->
Add a new RAND payload to `self` with `len` random bytes.
## `len`
length
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_t -->
Add a new T payload to `self` with the given parameters.
## `type_`
specifies the timestamp type used
## `ts_value`
The timestamp value of the specified `type_`
# Returns
`true` on success
<!-- impl MIKEYMessage::fn add_t_now_ntp_utc -->
Add a new T payload to `self` that contains the current time
in NTP-UTC format.
# Returns
`true` on success
<!-- impl MIKEYMessage::fn base64_encode -->
# Returns
a `gchar`, base64-encoded data
<!-- impl MIKEYMessage::fn find_payload -->
Find the `nth` occurence of the payload with `type_` in `self`.
## `type_`
a `MIKEYPayloadType`
## `nth`
payload to find
# Returns
the `nth` `MIKEYPayload` of `type_`.
<!-- impl MIKEYMessage::fn get_cs_srtp -->
Get the policy information of `self` at `idx`.
## `idx`
an index
# Returns
a `MIKEYMapSRTP`
<!-- impl MIKEYMessage::fn get_n_cs -->
Get the number of crypto sessions in `self`.
# Returns
the number of crypto sessions
<!-- impl MIKEYMessage::fn get_n_payloads -->
Get the number of payloads in `self`.
# Returns
the number of payloads in `self`
<!-- impl MIKEYMessage::fn get_payload -->
Get the `MIKEYPayload` at `idx` in `self`
## `idx`
an index
# Returns
the `MIKEYPayload` at `idx`. The payload
remains valid for as long as it is part of `self`.
<!-- impl MIKEYMessage::fn insert_cs_srtp -->
Insert a Crypto Session map for SRTP in `self` at `idx`
When `idx` is -1, the policy will be appended.
## `idx`
the index to insert at
## `map`
the map info
# Returns
`true` on success
<!-- impl MIKEYMessage::fn insert_payload -->
Insert the `payload` at index `idx` in `self`. If `idx` is -1, the payload
will be appended to `self`.
## `idx`
an index
## `payload`
a `MIKEYPayload`
# Returns
`true` on success
<!-- impl MIKEYMessage::fn remove_cs_srtp -->
Remove the SRTP policy at `idx`.
## `idx`
the index to remove
# Returns
`true` on success
<!-- impl MIKEYMessage::fn remove_payload -->
Remove the payload in `self` at `idx`
## `idx`
an index
# Returns
`true` on success
<!-- impl MIKEYMessage::fn replace_cs_srtp -->
Replace a Crypto Session map for SRTP in `self` at `idx` with `map`.
## `idx`
the index to insert at
## `map`
the map info
# Returns
`true` on success
<!-- impl MIKEYMessage::fn replace_payload -->
Replace the payload at `idx` in `self` with `payload`.
## `idx`
an index
## `payload`
a `MIKEYPayload`
# Returns
`true` on success
<!-- impl MIKEYMessage::fn set_info -->
Set the information in `self`.
## `version`
a version
## `type_`
a `MIKEYType`
## `V`
verify flag
## `prf_func`
the `MIKEYPRFFunc` function to use
## `CSB_id`
the Crypto Session Bundle id
## `map_type`
the `GstMIKEYCSIDMapType`
# Returns
`true` on success
<!-- impl MIKEYMessage::fn to_bytes -->
Convert `self` to a `glib::Bytes`.
## `info`
a `MIKEYEncryptInfo`
# Returns
a new `glib::Bytes` for `self`.
<!-- impl MIKEYMessage::fn to_caps -->
Feature: `v1_8_1`
## `caps`
a `gst::Caps` to be filled with SRTP parameters (srtp/srtcp cipher, authorization, key data)
# Returns
`true` on success
<!-- enum MIKEYPRFFunc -->
The PRF function that has been/will be used for key derivation
<!-- enum MIKEYPRFFunc::variant MikeyPrfMikey1 -->
MIKEY-1 PRF function
<!-- struct MIKEYPayload -->
Hold the common fields for all payloads
<!-- impl MIKEYPayload::fn new -->
Make a new `MIKEYPayload` with `type_`.
## `type_`
a `MIKEYPayloadType`
# Returns
a new `MIKEYPayload` or `None` on failure.
<!-- impl MIKEYPayload::fn kemac_add_sub -->
Add a new sub payload to `self`.
## `newpay`
a `MIKEYPayload` to add
# Returns
`true` on success.
<!-- impl MIKEYPayload::fn kemac_get_n_sub -->
Get the number of sub payloads of `self`. `self` should be of type
`MIKEYPayloadType::Kemac`.
# Returns
the number of sub payloads in `self`
<!-- impl MIKEYPayload::fn kemac_get_sub -->
Get the sub payload of `self` at `idx`. `self` should be of type
`MIKEYPayloadType::Kemac`.
## `idx`
an index
# Returns
the `MIKEYPayload` at `idx`.
<!-- impl MIKEYPayload::fn kemac_remove_sub -->
Remove the sub payload at `idx` in `self`.
## `idx`
the index to remove
# Returns
`true` on success.
<!-- impl MIKEYPayload::fn kemac_set -->
Set the KEMAC parameters. `self` should point to a `MIKEYPayloadType::Kemac`
payload.
## `enc_alg`
the `MIKEYEncAlg`
## `mac_alg`
a `MIKEYMacAlg`
# Returns
`true` on success
<!-- impl MIKEYPayload::fn key_data_set_interval -->
Set the key validity period in the `MIKEYPayloadType::KeyData` `self`.
## `vf_len`
the length of `vf_data`
## `vf_data`
the Valid From data
## `vt_len`
the length of `vt_data`
## `vt_data`
the Valid To data
# Returns
`true` on success
<!-- impl MIKEYPayload::fn key_data_set_key -->
Set `key_len` bytes of `key_data` of type `key_type` as the key for the
`MIKEYPayloadType::KeyData` `self`.
## `key_type`
a `MIKEYKeyDataType`
## `key_len`
the length of `key_data`
## `key_data`
the key of type `key_type`
# Returns
`true` on success
<!-- impl MIKEYPayload::fn key_data_set_salt -->
Set the salt key data. If `salt_len` is 0 and `salt_data` is `None`, the
salt data will be removed.
## `salt_len`
the length of `salt_data`
## `salt_data`
the salt
# Returns
`true` on success
<!-- impl MIKEYPayload::fn key_data_set_spi -->
Set the SPI/MKI validity in the `MIKEYPayloadType::KeyData` `self`.
## `spi_len`
the length of `spi_data`
## `spi_data`
the SPI/MKI data
# Returns
`true` on success
<!-- impl MIKEYPayload::fn pke_set -->
Set the PKE values in `self`. `self` must be of type
`MIKEYPayloadType::Pke`.
## `C`
envelope key cache indicator
## `data_len`
the length of `data`
## `data`
the encrypted envelope key
# Returns
`true` on success
<!-- impl MIKEYPayload::fn rand_set -->
Set the random values in a `MIKEYPayloadType::Rand` `self`.
## `len`
the length of `rand`
## `rand`
random values
# Returns
`true` on success
<!-- impl MIKEYPayload::fn sp_add_param -->
Add a new parameter to the `MIKEYPayloadType::Sp` `self` with `type_`, `len`
and `val`.
## `type_`
a type
## `len`
a length
## `val`
`len` bytes of data
# Returns
`true` on success
<!-- impl MIKEYPayload::fn sp_get_n_params -->
Get the number of security policy parameters in a `MIKEYPayloadType::Sp`
`self`.
# Returns
the number of parameters in `self`
<!-- impl MIKEYPayload::fn sp_get_param -->
Get the Security Policy parameter in a `MIKEYPayloadType::Sp` `self`
at `idx`.
## `idx`
an index
# Returns
the `MIKEYPayloadSPParam` at `idx` in `self`
<!-- impl MIKEYPayload::fn sp_remove_param -->
Remove the Security Policy parameters from a `MIKEYPayloadType::Sp`
`self` at `idx`.
## `idx`
an index
# Returns
`true` on success
<!-- impl MIKEYPayload::fn sp_set -->
Set the Security Policy parameters for `self`.
## `policy`
the policy number
## `proto`
a `MIKEYSecProto`
# Returns
`true` on success
<!-- impl MIKEYPayload::fn t_set -->
Set the timestamp in a `MIKEYPayloadType::T` `self`.
## `type_`
the `MIKEYTSType`
## `ts_value`
the timestamp value
# Returns
`true` on success
<!-- enum MIKEYPayloadType -->
Different MIKEY Payload types.
<!-- enum MIKEYPayloadType::variant Last -->
@ -131,9 +563,3 @@ Initiator's DH exchange message
Responder's DH exchange message
<!-- enum MIKEYType::variant Error -->
Error message
<!-- enum SDPResult -->
Return values for the SDP functions.
<!-- enum SDPResult::variant Ok -->
A successful return value
<!-- enum SDPResult::variant Einval -->
a function was given invalid parameters

View file

@ -0,0 +1,83 @@
<!-- file * -->
<!-- struct WebRTCDTLSTransport -->
# Implements
[`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html)
<!-- enum WebRTCDTLSTransportState -->
GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW: new
GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED: closed
GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED: failed
GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING: connecting
GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED: connected
<!-- enum WebRTCICEComponent -->
GST_WEBRTC_ICE_COMPONENT_RTP,
GST_WEBRTC_ICE_COMPONENT_RTCP,
<!-- enum WebRTCICEConnectionState -->
GST_WEBRTC_ICE_CONNECTION_STATE_NEW: new
GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING: checking
GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED: connected
GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED: completed
GST_WEBRTC_ICE_CONNECTION_STATE_FAILED: failed
GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED: disconnected
GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED: closed
See <ulink url="http://w3c.github.io/webrtc-pc/`dom`-rtciceconnectionstate">http://w3c.github.io/webrtc-pc/`dom`-rtciceconnectionstate`</ulink>`
<!-- enum WebRTCICEGatheringState -->
GST_WEBRTC_ICE_GATHERING_STATE_NEW: new
GST_WEBRTC_ICE_GATHERING_STATE_GATHERING: gathering
GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE: complete
See <ulink url="http://w3c.github.io/webrtc-pc/`dom`-rtcicegatheringstate">http://w3c.github.io/webrtc-pc/`dom`-rtcicegatheringstate`</ulink>`
<!-- enum WebRTCICERole -->
GST_WEBRTC_ICE_ROLE_CONTROLLED: controlled
GST_WEBRTC_ICE_ROLE_CONTROLLING: controlling
<!-- struct WebRTCICETransport -->
# Implements
[`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html)
<!-- struct WebRTCRTPReceiver -->
# Implements
[`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html)
<!-- struct WebRTCRTPSender -->
# Implements
[`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html)
<!-- struct WebRTCRTPTransceiver -->
# Implements
[`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html)
<!-- enum WebRTCSDPType -->
GST_WEBRTC_SDP_TYPE_OFFER: offer
GST_WEBRTC_SDP_TYPE_PRANSWER: pranswer
GST_WEBRTC_SDP_TYPE_ANSWER: answer
GST_WEBRTC_SDP_TYPE_ROLLBACK: rollback
See <ulink url="http://w3c.github.io/webrtc-pc/`rtcsdptype`">http://w3c.github.io/webrtc-pc/`rtcsdptype``</ulink>`
<!-- struct WebRTCSessionDescription -->
sdp: the `gst_sdp::SDPMessage` of the description
See <ulink url="https://www.w3.org/TR/webrtc/`rtcsessiondescription`-class">https://www.w3.org/TR/webrtc/`rtcsessiondescription`-class`</ulink>`
<!-- impl WebRTCSessionDescription::fn new -->
## `type_`
a `WebRTCSDPType`
## `sdp`
a `gst_sdp::SDPMessage`
# Returns
a new `WebRTCSessionDescription` from `type_`
and `sdp`
<!-- impl WebRTCSessionDescription::fn copy -->
# Returns
a new copy of `self`
<!-- impl WebRTCSessionDescription::fn free -->
Free `self` and all associated resources