Public functions. More...
Functions | |
PUBLIC_API STATUS | createPeerConnection (PRtcConfiguration, PRtcPeerConnection *) |
Initialize a RtcPeerConnection with the provided Configuration. More... | |
PUBLIC_API STATUS | freePeerConnection (PRtcPeerConnection *) |
Free a RtcPeerConnection. More... | |
PUBLIC_API STATUS | peerConnectionOnIceCandidate (PRtcPeerConnection, UINT64, RtcOnIceCandidate) |
Set a callback when new Ice collects new local candidate. More... | |
PUBLIC_API STATUS | peerConnectionOnSenderBandwidthEstimation (PRtcPeerConnection, UINT64, RtcOnSenderBandwidthEstimation) |
Set a callback for transport-wide sender bandwidth estimation results. More... | |
PUBLIC_API STATUS | peerConnectionOnDataChannel (PRtcPeerConnection, UINT64, RtcOnDataChannel) |
PUBLIC_API STATUS | peerConnectionOnConnectionStateChange (PRtcPeerConnection, UINT64, RtcOnConnectionStateChange) |
PUBLIC_API STATUS | peerConnectionGetLocalDescription (PRtcPeerConnection, PRtcSessionDescriptionInit) |
PUBLIC_API STATUS | peerConnectionGetCurrentLocalDescription (PRtcPeerConnection, PRtcSessionDescriptionInit) |
PUBLIC_API STATUS | createOffer (PRtcPeerConnection, PRtcSessionDescriptionInit) |
Populate the provided answer that contains an RFC 3264 offer with the supported configurations for the session. More... | |
PUBLIC_API NullableBool | canTrickleIceCandidates (PRtcPeerConnection) |
The canTrickleIceCandidates attribute indicates whether the remote peer is able to accept trickled ICE candidates. The value is determined based on whether a remote description indicates support for trickle ICE. Prior to the completion of setRemoteDescription, this value is null. More... | |
PUBLIC_API STATUS | createAnswer (PRtcPeerConnection, PRtcSessionDescriptionInit) |
Populate the provided answer that contains an RFC 3264 answer with the supported configurations for the session. More... | |
PUBLIC_API STATUS | serializeSessionDescriptionInit (PRtcSessionDescriptionInit, PCHAR, PUINT32) |
Create a JSON string from RtcSessionDescriptionInit. More... | |
PUBLIC_API STATUS | deserializeSessionDescriptionInit (PCHAR, UINT32, PRtcSessionDescriptionInit) |
Parses a JSON string and returns an allocated PSessionDescriptionInit. More... | |
PUBLIC_API STATUS | deserializeRtcIceCandidateInit (PCHAR, UINT32, PRtcIceCandidateInit) |
Parses a JSON string and populates a PRtcIceCandidateInit. More... | |
PUBLIC_API STATUS | setLocalDescription (PRtcPeerConnection, PRtcSessionDescriptionInit) |
Instructs the RtcPeerConnection to apply the supplied RtcSessionDescriptionInit as the local description. More... | |
PUBLIC_API STATUS | setRemoteDescription (PRtcPeerConnection, PRtcSessionDescriptionInit) |
Instructs the RtcPeerConnection to apply the supplied RtcSessionDescriptionInit as the remote description. More... | |
PUBLIC_API STATUS | restartIce (PRtcPeerConnection) |
Instructs the RtcPeerConnection that ICE should be restarted. Subsequent calls to createOffer will create descriptions to restart ICE. More... | |
PUBLIC_API STATUS | closePeerConnection (PRtcPeerConnection) |
Close the underlying DTLS session and IceAgent connection. Trigger RtcOnConnectionStateChange to RTC_PEER_CONNECTION_STATE_CLOSED. More... | |
PUBLIC_API STATUS | addTransceiver (PRtcPeerConnection, PRtcMediaStreamTrack, PRtcRtpTransceiverInit, PRtcRtpTransceiver *) |
Create a new RtcRtpTransceiver and add it to the set of transceivers. More... | |
PUBLIC_API STATUS | transceiverOnFrame (PRtcRtpTransceiver, UINT64, RtcOnFrame) |
Set a callback for transceiver frame. More... | |
PUBLIC_API STATUS | transceiverOnBandwidthEstimation (PRtcRtpTransceiver, UINT64, RtcOnBandwidthEstimation) |
Set a callback for bandwidth estimation results. More... | |
PUBLIC_API STATUS | transceiverOnPictureLoss (PRtcRtpTransceiver, UINT64, RtcOnPictureLoss) |
Set a callback for picture loss packet (PLI) More... | |
PUBLIC_API STATUS | freeTransceiver (PRtcRtpTransceiver *) |
Frees the previously created transceiver object. More... | |
PUBLIC_API STATUS | initKvsWebRtc (VOID) |
Initializes global state needed for all RtcPeerConnections. It must only be called once. More... | |
PUBLIC_API STATUS | deinitKvsWebRtc (VOID) |
Deinitializes global state needed for all RtcPeerConnections. It must only be called once. More... | |
PUBLIC_API STATUS | addSupportedCodec (PRtcPeerConnection, RTC_CODEC) |
Adds to the list of codecs we support receiving. More... | |
PUBLIC_API STATUS | writeFrame (PRtcRtpTransceiver, PFrame) |
Packetizes and sends media via the configuration specified by the RtcRtpTransceiver. More... | |
PUBLIC_API STATUS | updateEncoderStats (PRtcRtpTransceiver, PRtcEncoderStats) |
call this function to update stats which depend on external encoder More... | |
PUBLIC_API STATUS | addIceCandidate (PRtcPeerConnection, PCHAR) |
Provides a remote candidate to the ICE Agent. More... | |
PUBLIC_API STATUS | createDataChannel (PRtcPeerConnection, PCHAR, PRtcDataChannelInit, PRtcDataChannel *) |
createDataChannel creates a new RtcDataChannel object with the given label. More... | |
PUBLIC_API STATUS | dataChannelOnMessage (PRtcDataChannel, UINT64, RtcOnMessage) |
Set a callback for data channel message. More... | |
PUBLIC_API STATUS | dataChannelOnOpen (PRtcDataChannel, UINT64, RtcOnOpen) |
Set a callback for data channel open. More... | |
PUBLIC_API STATUS | dataChannelSend (PRtcDataChannel, BOOL, PBYTE, UINT32) |
Send data via the PRtcDataChannel. More... | |
PUBLIC_API STATUS | discoverNatBehavior (PCHAR, NAT_BEHAVIOR *, NAT_BEHAVIOR *, IceSetInterfaceFilterFunc, UINT64) |
Use the process described in https://tools.ietf.org/html/rfc5780#section-4.3 to discover NAT behavior. More... | |
PUBLIC_API PCHAR | getNatBehaviorStr (NAT_BEHAVIOR natBehavior) |
Return the string representation for each NAT_BEHAVIOR enum. More... | |
PUBLIC_API STATUS | createSignalingClientSync (PSignalingClientInfo, PChannelInfo, PSignalingClientCallbacks, PAwsCredentialProvider, PSIGNALING_CLIENT_HANDLE) |
Creates a Signaling client and returns a handle to it. More... | |
PUBLIC_API STATUS | freeSignalingClient (PSIGNALING_CLIENT_HANDLE) |
Frees the Signaling client object. More... | |
PUBLIC_API STATUS | signalingClientSendMessageSync (SIGNALING_CLIENT_HANDLE, PSignalingMessage) |
Send a message through a Signaling client. More... | |
PUBLIC_API STATUS | signalingClientGetIceConfigInfoCount (SIGNALING_CLIENT_HANDLE, PUINT32) |
Gets the retrieved ICE configuration information object count. More... | |
PUBLIC_API STATUS | signalingClientGetIceConfigInfo (SIGNALING_CLIENT_HANDLE, UINT32, PIceConfigInfo *) |
Gets the ICE configuration information object given its index. More... | |
PUBLIC_API STATUS | signalingClientFetchSync (SIGNALING_CLIENT_HANDLE) |
Fetches all assets needed to ready the state machine before attempting to connect. Can also be used to reallocate missing / expired assets before reconnecting. More... | |
PUBLIC_API STATUS | signalingClientConnectSync (SIGNALING_CLIENT_HANDLE) |
Connects the signaling client to the web socket in order to send/receive messages. More... | |
PUBLIC_API STATUS | signalingClientDisconnectSync (SIGNALING_CLIENT_HANDLE) |
Disconnects the signaling client. More... | |
PUBLIC_API STATUS | signalingClientGetCurrentState (SIGNALING_CLIENT_HANDLE, PSIGNALING_CLIENT_STATE) |
Gets the Signaling client current state. More... | |
PUBLIC_API STATUS | signalingClientGetStateString (SIGNALING_CLIENT_STATE, PCHAR *) |
PUBLIC_API STATUS | signalingClientDeleteSync (SIGNALING_CLIENT_HANDLE) |
Deletes the signaling channel referenced by SIGNALING_CLIENT_HANDLE. More... | |
PUBLIC_API STATUS | signalingClientGetMetrics (SIGNALING_CLIENT_HANDLE, PSignalingClientMetrics) |
Get signaling related metrics. More... | |
PUBLIC_API STATUS | peerConnectionGetMetrics (PRtcPeerConnection, PPeerConnectionMetrics) |
Get peer connection related metrics. More... | |
PUBLIC_API STATUS | iceAgentGetMetrics (PRtcPeerConnection, PKvsIceAgentMetrics) |
Get peer connection related metrics. More... | |
PUBLIC_API STATUS | rtcPeerConnectionGetMetrics (PRtcPeerConnection, PRtcRtpTransceiver, PRtcStats) |
Get the relevant/all metrics based on the RTCStatsType field. This does not include any signaling related metrics. The caller of the API is expected to populate requestedTypeOfStats member of PRtcStats object with one of the values in RTC_STATS_TYPE. More... | |
PUBLIC_API STATUS | createRtcCertificate (PRtcCertificate *) |
Creates an RtcCertificate object. More... | |
PUBLIC_API STATUS | freeRtcCertificate (PRtcCertificate) |
Frees previously generated RtcCertificate object. More... | |
Public functions.
PUBLIC_API STATUS addIceCandidate | ( | PRtcPeerConnection | pPeerConnection, |
PCHAR | pIceCandidate | ||
) |
Provides a remote candidate to the ICE Agent.
This method can also be used to indicate the end of remote candidates when called with an empty string for the candidate member.
Reference: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-addicecandidate
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in] | PCHAR | New remote ICE candidate to add |
PUBLIC_API STATUS addSupportedCodec | ( | PRtcPeerConnection | pPeerConnection, |
RTC_CODEC | rtcCodec | ||
) |
Adds to the list of codecs we support receiving.
NOTE: The remote MUST only send codecs we declare
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in] | RTC_CODEC | Codec that we support receiving. |
PUBLIC_API STATUS addTransceiver | ( | PRtcPeerConnection | pPeerConnection, |
PRtcMediaStreamTrack | pRtcMediaStreamTrack, | ||
PRtcRtpTransceiverInit | pRtcRtpTransceiverInit, | ||
PRtcRtpTransceiver * | ppRtcRtpTransceiver | ||
) |
Create a new RtcRtpTransceiver and add it to the set of transceivers.
Reference https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-addtransceiver
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in] | PRtcMediaStreamTrack | Stream track information for the codec appropriate codec, or NULL for RECVONLY |
[in] | PRtcRtpTransceiverInit | PRtcRtpTransceiverInit that may configure our new Transceiver |
[in,out] | PRtcRtpTransceiver* | IN/Initialized and configured RtcRtpTransceiver |
PUBLIC_API NullableBool canTrickleIceCandidates | ( | PRtcPeerConnection | pPeerConnection | ) |
The canTrickleIceCandidates attribute indicates whether the remote peer is able to accept trickled ICE candidates. The value is determined based on whether a remote description indicates support for trickle ICE. Prior to the completion of setRemoteDescription, this value is null.
Reference: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-cantrickleicecandidates
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
PUBLIC_API STATUS closePeerConnection | ( | PRtcPeerConnection | pPeerConnection | ) |
Close the underlying DTLS session and IceAgent connection. Trigger RtcOnConnectionStateChange to RTC_PEER_CONNECTION_STATE_CLOSED.
Reference: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
PUBLIC_API STATUS createAnswer | ( | PRtcPeerConnection | pPeerConnection, |
PRtcSessionDescriptionInit | pSessionDescriptionInit | ||
) |
Populate the provided answer that contains an RFC 3264 answer with the supported configurations for the session.
Reference: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-createanswer
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in,out] | PRtcSessionDescriptionInit | IN/answer that describes the supported configurations of the RtcPeerConnection |
PUBLIC_API STATUS createDataChannel | ( | PRtcPeerConnection | pPeerConnection, |
PCHAR | pDataChannelName, | ||
PRtcDataChannelInit | pRtcDataChannelInit, | ||
PRtcDataChannel * | ppRtcDataChannel | ||
) |
createDataChannel creates a new RtcDataChannel object with the given label.
NOTE: The RtcDataChannelInit dictionary can be used to configure properties of the underlying channel such as data reliability. NOTE: Data channel can be created only after signaling for now
Reference: https://www.w3.org/TR/webrtc/#methods-11
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in] | PCHAR | Data channel Name |
[in] | PRtcDataChannelInit | Allowed to be NULL/defines underlying channel properties |
[out] | PRtcDataChannel* | Created data channel with supplied channel name |
PUBLIC_API STATUS createOffer | ( | PRtcPeerConnection | pPeerConnection, |
PRtcSessionDescriptionInit | pSessionDescriptionInit | ||
) |
Populate the provided answer that contains an RFC 3264 offer with the supported configurations for the session.
Reference: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-createoffer
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in,out] | PRtcSessionDescriptionInit | IN/answer that describes the supported configurations of the RtcPeerConnection |
PUBLIC_API STATUS createPeerConnection | ( | PRtcConfiguration | pConfiguration, |
PRtcPeerConnection * | ppPeerConnection | ||
) |
Initialize a RtcPeerConnection with the provided Configuration.
Reference: https://www.w3.org/TR/webrtc/#constructor
[in] | PConfiguration | Configuration to initialize provided RtcPeerConnection |
[in,out] | PRtcPeerConnection | Uninitialized RtcPeerConnection |
PUBLIC_API STATUS createRtcCertificate | ( | PRtcCertificate * | ppRtcCertificate | ) |
Creates an RtcCertificate object.
[in,out] | RtcCertificate | object that will be generated and returned. |
PUBLIC_API STATUS createSignalingClientSync | ( | PSignalingClientInfo | pClientInfo, |
PChannelInfo | pChannelInfo, | ||
PSignalingClientCallbacks | pCallbacks, | ||
PAwsCredentialProvider | pCredentialProvider, | ||
PSIGNALING_CLIENT_HANDLE | pSignalingHandle | ||
) |
Creates a Signaling client and returns a handle to it.
[in] | PSignalingClientInfo | Signaling client info |
[in] | PChannelInfo | Signaling channel info to use/create a channel |
[in] | PSignalingClientCallbacks | Signaling callbacks for event notifications |
[in] | PAwsCredentialProvider | Credential provider for auth integration |
[out] | PSIGNALING_CLIENT_HANDLE | Returned signaling client handle |
PUBLIC_API STATUS dataChannelOnMessage | ( | PRtcDataChannel | pRtcDataChannel, |
UINT64 | customData, | ||
RtcOnMessage | rtcOnMessage | ||
) |
Set a callback for data channel message.
[in] | PRtcDataChannel | Data channel struct created by createDataChannel() |
[in] | UINT64 | User customData that will be passed along when RtcOnMessage is called |
[in] | RtcOnMessage | User RtcOnMessage callback |
PUBLIC_API STATUS dataChannelOnOpen | ( | PRtcDataChannel | pRtcDataChannel, |
UINT64 | customData, | ||
RtcOnOpen | rtcOnOpen | ||
) |
Set a callback for data channel open.
[in] | PRtcDataChannel | Data channel struct created by createDataChannel() |
[in] | UINT64 | User customData that will be passed along when RtcOnOpen is called |
[in] | RtcOnOpen | User RtcOnOpen callback |
PUBLIC_API STATUS dataChannelSend | ( | PRtcDataChannel | pRtcDataChannel, |
BOOL | isBinary, | ||
PBYTE | pMessage, | ||
UINT32 | pMessageLen | ||
) |
Send data via the PRtcDataChannel.
Reference: https://www.w3.org/TR/webrtc/#dfn-send
[in] | PRtcDataChannel | Configured and connected PRtcDataChannel |
[in] | BOOL | Is message binary, if false will be delivered as a string |
[in] | PBYTE | Data that you wish to send |
[in] | UINT32 | Length of the PBYTE you wish to send |
PUBLIC_API STATUS deinitKvsWebRtc | ( | VOID | ) |
Deinitializes global state needed for all RtcPeerConnections. It must only be called once.
PUBLIC_API STATUS deserializeRtcIceCandidateInit | ( | PCHAR | pJson, |
UINT32 | jsonLen, | ||
PRtcIceCandidateInit | pRtcIceCandidateInit | ||
) |
Parses a JSON string and populates a PRtcIceCandidateInit.
[in] | PCHAR | JSON String of a PRtcIceCandidateInit |
[in] | UINT32 | Length of JSON String |
[out] | PRtcIceCandidateInit | PRtcIceCandidateInit populated from JSON String |
PUBLIC_API STATUS deserializeSessionDescriptionInit | ( | PCHAR | sessionDescriptionJSON, |
UINT32 | sessionDescriptionJSONLen, | ||
PRtcSessionDescriptionInit | pSessionDescriptionInit | ||
) |
Parses a JSON string and returns an allocated PSessionDescriptionInit.
[in] | PCHAR | JSON String of a RtcSessionDescriptionInit |
[in] | UINT32 | Length of JSON String |
[out] | PRtcSessionDescriptionInit | RtcSessionDescriptionInit populated from JSON String |
PUBLIC_API STATUS discoverNatBehavior | ( | PCHAR | stunServer, |
NAT_BEHAVIOR * | pNatMappingBehavior, | ||
NAT_BEHAVIOR * | pNatFilteringBehavior, | ||
IceSetInterfaceFilterFunc | filterFunc, | ||
UINT64 | filterFuncCustomData | ||
) |
Use the process described in https://tools.ietf.org/html/rfc5780#section-4.3 to discover NAT behavior.
[in] | PCHAR | STUN hostname. Need to in form of stun:hostname:port |
[out] | NAT_BEHAVIOR* | detected NAT mapping behavior |
[out] | NAT_BEHAVIOR* | detected NAT filtering behavior |
[in] | IceSetInterfaceFilterFunc | filter function for selecting local network interface to create socket. Optional. |
[in] | UINT64 | User data for filter function |
PUBLIC_API STATUS freePeerConnection | ( | PRtcPeerConnection * | ppPeerConnection | ) |
Free a RtcPeerConnection.
[in] | PRtcPeerConnection* | RtcPeerConnection that is to be freed |
PUBLIC_API STATUS freeRtcCertificate | ( | PRtcCertificate | pRtcCertificate | ) |
Frees previously generated RtcCertificate object.
[in,out] | RtcCertificate | object that will be freed if not NULL. |
PUBLIC_API STATUS freeSignalingClient | ( | PSIGNALING_CLIENT_HANDLE | pSignalingHandle | ) |
Frees the Signaling client object.
NOTE: The call is idempotent.
[in,out/opt] | PSIGNALING_CLIENT_HANDLE Signaling client handle to free |
PUBLIC_API STATUS freeTransceiver | ( | PRtcRtpTransceiver * | pRtcRtpTransceiver | ) |
Frees the previously created transceiver object.
This method is currently a no-op as Transceivers are freed when freePeerConnection is called in the future when renegotiation is supported this will be useful to remove Transceivers at anytime
[in,out/opt] | PRtcRtpTransceiver* in,out/OPT RtcRtpTransceiver to be freed |
PUBLIC_API PCHAR getNatBehaviorStr | ( | NAT_BEHAVIOR | natBehavior | ) |
Return the string representation for each NAT_BEHAVIOR enum.
[in] | natBehavior | the NAT_BEHAVIOR enum |
PUBLIC_API STATUS iceAgentGetMetrics | ( | PRtcPeerConnection | pPeerConnection, |
PKvsIceAgentMetrics | pKvsIceAgentMetrics | ||
) |
Get peer connection related metrics.
[in] | PRtcPeerConnection | Peer connection object |
[in,out] | PKvsIceAgentMetrics | KVS ICE agent stats object |
PUBLIC_API STATUS initKvsWebRtc | ( | VOID | ) |
Initializes global state needed for all RtcPeerConnections. It must only be called once.
PUBLIC_API STATUS peerConnectionGetCurrentLocalDescription | ( | PRtcPeerConnection | pRtcPeerConnection, |
PRtcSessionDescriptionInit | pRtcSessionDescriptionInit | ||
) |
Load the sdp field of PRtcSessionDescriptionInit with current local session description
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in,out] | PRtcSessionDescriptionInit | IN/PRtcSessionDescriptionInit whose sdp field will be modified. |
PUBLIC_API STATUS peerConnectionGetLocalDescription | ( | PRtcPeerConnection | pRtcPeerConnection, |
PRtcSessionDescriptionInit | pRtcSessionDescriptionInit | ||
) |
Load the sdp field of PRtcSessionDescriptionInit with pending or current local session description
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in,out] | PRtcSessionDescriptionInit | IN/PRtcSessionDescriptionInit whose sdp field will be modified. |
PUBLIC_API STATUS peerConnectionGetMetrics | ( | PRtcPeerConnection | pPeerConnection, |
PPeerConnectionMetrics | pPeerConnectionMetrics | ||
) |
Get peer connection related metrics.
[in] | PRtcPeerConnection | Peer connection object |
[in,out] | PPeerConnectionMetrics | Peer connection stats object |
PUBLIC_API STATUS peerConnectionOnConnectionStateChange | ( | PRtcPeerConnection | pRtcPeerConnection, |
UINT64 | customData, | ||
RtcOnConnectionStateChange | rtcOnConnectionStateChange | ||
) |
Set a callback for connection state change
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in] | UINT64 | User customData that will be passed along when RtcOnDataChannel is called |
[in] | RtcOnIceCandidate | User RtcOnConnectionStateChange callback |
PUBLIC_API STATUS peerConnectionOnDataChannel | ( | PRtcPeerConnection | pRtcPeerConnection, |
UINT64 | customData, | ||
RtcOnDataChannel | rtcOnDataChannel | ||
) |
Set a callback for data channel
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in] | UINT64 | User customData that will be passed along when RtcOnDataChannel is called |
[in] | RtcOnDataChannel | User RtcOnDataChannel callback |
PUBLIC_API STATUS peerConnectionOnIceCandidate | ( | PRtcPeerConnection | pRtcPeerConnection, |
UINT64 | customData, | ||
RtcOnIceCandidate | rtcOnIceCandidate | ||
) |
Set a callback when new Ice collects new local candidate.
NOTE: When IceAgent is done with collecting candidates, RtcOnIceCandidate will be called with NULL.
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in] | UINT64 | User customData that will be passed along when RtcOnIceCandidate is called |
[in] | RtcOnIceCandidate | User callback when new local candidate is found |
PUBLIC_API STATUS peerConnectionOnSenderBandwidthEstimation | ( | PRtcPeerConnection | pRtcPeerConnection, |
UINT64 | customData, | ||
RtcOnSenderBandwidthEstimation | rtcOnSenderBandwidthEstimation | ||
) |
Set a callback for transport-wide sender bandwidth estimation results.
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in] | UINT64 | User customData that will be passed along when RtcOnSenderBandwidthEstimation is called |
[in] | RtcOnSenderBandwidthEstimation | User RtcOnSenderBandwidthEstimation callback |
PUBLIC_API STATUS restartIce | ( | PRtcPeerConnection | pPeerConnection | ) |
Instructs the RtcPeerConnection that ICE should be restarted. Subsequent calls to createOffer will create descriptions to restart ICE.
Reference: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-restartice
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
PUBLIC_API STATUS rtcPeerConnectionGetMetrics | ( | PRtcPeerConnection | pRtcPeerConnection, |
PRtcRtpTransceiver | pRtcRtpTransceiver, | ||
PRtcStats | pRtcMetrics | ||
) |
Get the relevant/all metrics based on the RTCStatsType field. This does not include any signaling related metrics. The caller of the API is expected to populate requestedTypeOfStats member of PRtcStats object with one of the values in RTC_STATS_TYPE.
Stats specific expectations: IceServerStats: This return stats for a specific ICE server. In a multi server configuration, it is upto to the application to get Stats for every server being supported / desired server. The application is expected to pass in the specific iceServerIndex for which the stats are desired
[in] | PRtcPeerConnection | Peer connection for which the stats need to be collected |
[in] | PRtcRtpTransceiver | set to desired transceiver for RTP stats, NULL otherwise If set to NULL for RTP stats, the stats for the first transceiver are returned. |
[in,out] | PRtcStats | The stats object with the RTCStatsType field populated |
Reference: https://www.w3.org/TR/webrtc/#rtcpeerconnection-interface-extensions-1
PUBLIC_API STATUS serializeSessionDescriptionInit | ( | PRtcSessionDescriptionInit | pSessionDescriptionInit, |
PCHAR | sessionDescriptionJSON, | ||
PUINT32 | sessionDescriptionJSONLen | ||
) |
Create a JSON string from RtcSessionDescriptionInit.
[in] | PRtcSessionDescriptionInit | Source RtcSessionDescriptionInit that will become JSON string |
[out] | PCHAR | JSON string generated from PRtcSessionDescriptionInit |
[out] | PUINT32 | If PCHAR is null this is the required buffer size. If PCHAR is non-NULL this is the length of the output |
PUBLIC_API STATUS setLocalDescription | ( | PRtcPeerConnection | pPeerConnection, |
PRtcSessionDescriptionInit | pSessionDescriptionInit | ||
) |
Instructs the RtcPeerConnection to apply the supplied RtcSessionDescriptionInit as the local description.
Reference: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-setlocaldescription
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in,out] |
PUBLIC_API STATUS setRemoteDescription | ( | PRtcPeerConnection | pPeerConnection, |
PRtcSessionDescriptionInit | pSessionDescriptionInit | ||
) |
Instructs the RtcPeerConnection to apply the supplied RtcSessionDescriptionInit as the remote description.
Reference: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-setremotedescription
[in] | PRtcPeerConnection | Initialized RtcPeerConnection |
[in,out] | PRtcSessionDescriptionInit | IN/RtcSessionDescriptionInit that becomes our new remote description |
PUBLIC_API STATUS signalingClientConnectSync | ( | SIGNALING_CLIENT_HANDLE | signalingClientHandle | ) |
Connects the signaling client to the web socket in order to send/receive messages.
NOTE: The call will succeed only when the signaling client is in a ready state.
[in] | SIGNALING_CLIENT_HANDLE | Signaling client handle |
PUBLIC_API STATUS signalingClientDeleteSync | ( | SIGNALING_CLIENT_HANDLE | signalingClientHandle | ) |
Deletes the signaling channel referenced by SIGNALING_CLIENT_HANDLE.
NOTE: The function is intended to be used to clean up the backend resources and as such should be called at the end of the lifecycle of the signaling channel resource. Attempting to connect to the channel or send a message will result in an error or an unpredictable results after this call.
NOTE: The call transitions the signaling client state machine to a terminal state even if the call fails. The proper handling on success and on an error is to free the signaling client.
[in] | SIGNALING_CLIENT_HANDLE | Signaling client handle |
PUBLIC_API STATUS signalingClientDisconnectSync | ( | SIGNALING_CLIENT_HANDLE | signalingClientHandle | ) |
Disconnects the signaling client.
[in] | SIGNALING_CLIENT_HANDLE | Signaling client handle |
PUBLIC_API STATUS signalingClientFetchSync | ( | SIGNALING_CLIENT_HANDLE | signalingClientHandle | ) |
Fetches all assets needed to ready the state machine before attempting to connect. Can also be used to reallocate missing / expired assets before reconnecting.
[in] | SIGNALING_CLIENT_HANDLE | Signaling client handle |
PUBLIC_API STATUS signalingClientGetCurrentState | ( | SIGNALING_CLIENT_HANDLE | signalingClientHandle, |
PSIGNALING_CLIENT_STATE | pState | ||
) |
Gets the Signaling client current state.
[in] | SIGNALING_CLIENT_HANDLE | Signaling client handle |
[out] | PSIGNALING_CLIENT_STATE | Current state of the signaling client as an UINT32 enum |
PUBLIC_API STATUS signalingClientGetIceConfigInfo | ( | SIGNALING_CLIENT_HANDLE | signalingClientHandle, |
UINT32 | index, | ||
PIceConfigInfo * | ppIceConfigInfo | ||
) |
Gets the ICE configuration information object given its index.
NOTE: The call will fail if the client is not in the CONNECTED state. IMPORTANT: The returned pointer to the ICE configuration information object points to internal structures and its contents should not be modified.
[in] | SIGNALING_CLIENT_HANDLE | Signaling client handle |
[in] | UINT32 | Index of the ICE configuration information object to retrieve |
[out] | PIceConfigInfo | The pointer to the ICE configuration information object |
PUBLIC_API STATUS signalingClientGetIceConfigInfoCount | ( | SIGNALING_CLIENT_HANDLE | signalingClientHandle, |
PUINT32 | pIceConfigCount | ||
) |
Gets the retrieved ICE configuration information object count.
NOTE: The call will fail if the client is not in the CONNECTED state.
[in] | SIGNALING_CLIENT_HANDLE | Signaling client handle |
[out] | PUINT32 | The count of the ICE configuration information objects |
PUBLIC_API STATUS signalingClientGetMetrics | ( | SIGNALING_CLIENT_HANDLE | signalingClientHandle, |
PSignalingClientMetrics | pSignalingClientMetrics | ||
) |
Get signaling related metrics.
[in] | SIGNALING_CLIENT_HANDLE | Signaling client handle |
[in,out] | PSignalingClientMetrics | Signaling stats |
PUBLIC_API STATUS signalingClientGetStateString | ( | SIGNALING_CLIENT_STATE | state, |
PCHAR * | ppStateStr | ||
) |
Gets a literal string representing a Signaling client state.
[in] | SIGNALING_CLIENT_HANDLE | Signaling client handle |
[out] | PCHAR* | Read only string representing the state |
PUBLIC_API STATUS signalingClientSendMessageSync | ( | SIGNALING_CLIENT_HANDLE | signalingClientHandle, |
PSignalingMessage | pSignalingMessage | ||
) |
Send a message through a Signaling client.
NOTE: The call will fail if the client is not in the CONNECTED state. NOTE: This is a synchronous call. It will block and wait for sending the data and await for the ACK from the service.
[in] | SIGNALING_CLIENT_HANDLE | Signaling client handle |
[in] | PSignalingMessage | Message to send. |
PUBLIC_API STATUS transceiverOnBandwidthEstimation | ( | PRtcRtpTransceiver | pRtcRtpTransceiver, |
UINT64 | customData, | ||
RtcOnBandwidthEstimation | rtcOnBandwidthEstimation | ||
) |
Set a callback for bandwidth estimation results.
[in] | PRtcRtpTransceiver | Populated RtcRtpTransceiver struct |
[in] | UINT64 | User customData that will be passed along when RtcOnBandwidthEstimation is called |
[in] | RtcOnBandwidthEstimation | User RtcOnBandwidthEstimation callback |
PUBLIC_API STATUS transceiverOnFrame | ( | PRtcRtpTransceiver | pRtcRtpTransceiver, |
UINT64 | customData, | ||
RtcOnFrame | rtcOnFrame | ||
) |
Set a callback for transceiver frame.
[in] | PRtcRtpTransceiver | Populated RtcRtpTransceiver struct |
[in] | UINT64 | User customData that will be passed along when RtcOnFrame is called |
[in] | RtcOnFrame | User RtcOnFrame callback |
PUBLIC_API STATUS transceiverOnPictureLoss | ( | PRtcRtpTransceiver | pRtcRtpTransceiver, |
UINT64 | customData, | ||
RtcOnPictureLoss | onPictureLoss | ||
) |
Set a callback for picture loss packet (PLI)
[in] | PRtcRtpTransceiver | Populated RtcRtpTransceiver struct |
[in] | UINT64 | User customData that will be passed along when RtcOnPictureLoss is called |
[in] | RtcOnPictureLoss | User RtcOnPictureLoss callback |
PUBLIC_API STATUS updateEncoderStats | ( | PRtcRtpTransceiver | pRtcRtpTransceiver, |
PRtcEncoderStats | encoderStats | ||
) |
call this function to update stats which depend on external encoder
[in] | PRtcRtpTransceiver | transceiver for which encoder stats will be updated |
[in] | PRtcEncoderStats | populated in the application layer which is then consumed as part of outgoingRtpStats |
PUBLIC_API STATUS writeFrame | ( | PRtcRtpTransceiver | pRtcRtpTransceiver, |
PFrame | pFrame | ||
) |
Packetizes and sends media via the configuration specified by the RtcRtpTransceiver.
[in] | PRtcRtpTransceiver | Configured and connected RtcRtpTransceiver to send media |
[in] | PFrame | Frame of media that will be sent |