Amazon Kinesis Webrtc C SDK
Callbacks

Extra callbacks definitions. More...

Collaboration diagram for Callbacks:

Classes

struct  __RtcDataChannel
 RtcDataChannel represents a bi-directional data channel between two peers. More...
 

Typedefs

typedef VOID(* RtcOnFrame) (UINT64, PFrame)
 RtcOnFrame is fired everytime a frame is received from the remote peer. It is available via the RtpRec. More...
 
typedef VOID(* RtcOnBandwidthEstimation) (UINT64, DOUBLE)
 RtcOnBandwidthEstimation is fired everytime a bandwidth estimation value is computed. This will be fired for receiver side estimation. More...
 
typedef VOID(* RtcOnSenderBandwidthEstimation) (UINT64, UINT32, UINT32, UINT32, UINT32, UINT64)
 RtcOnSenderBandwidthEstimation is fired everytime a bandwidth estimation value is computed by sender. This is an estimate of ALL packets sent across all transceivers. See https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01 for more details. More...
 
typedef VOID(* RtcOnPictureLoss) (UINT64)
 RtcOnPictureLoss is fired everytime a Picture Loss Indication (PLI) feedback message is received. Receiving such message normally indicates that you sent a video frame which receiver could not decode. It may happen either because of packet loss or for any other reason. Generating an intra frame (aka keyframe, aka I-frame) in response to such message is considered a good strategy. More...
 
typedef struct __RtcDataChannel RtcDataChannel
 RtcDataChannel represents a bi-directional data channel between two peers. More...
 
typedef struct __RtcDataChannelPRtcDataChannel
 
typedef VOID(* RtcOnMessage) (UINT64, PRtcDataChannel, BOOL, PBYTE, UINT32)
 RtcOnMessage is fired when a message is received for the DataChannel. More...
 
typedef VOID(* RtcOnOpen) (UINT64, PRtcDataChannel)
 
typedef VOID(* RtcOnDataChannel) (UINT64, PRtcDataChannel)
 RtcOnDataChannel is fired when the remote PeerConnection creates a new DataChannel. More...
 
typedef VOID(* RtcOnIceCandidate) (UINT64, PCHAR)
 RtcOnIceCandidate is fired when new iceCandidate is found. if PCHAR is NULL then candidate gathering is done. More...
 
typedef BOOL(* IceSetInterfaceFilterFunc) (UINT64, PCHAR)
 IceSetInterfaceFilterFunc is fired when a callback function to filter network interfaces is assigned. The callback function is expected to check for specific interface names to be whitelisted/blacklisted. More...
 
typedef VOID(* RtcOnConnectionStateChange) (UINT64, RTC_PEER_CONNECTION_STATE)
 RtcOnConnectionStateChange is fired to report a change in peer connection state. More...
 
typedef STATUS(* SignalingClientMessageReceivedFunc) (UINT64, PReceivedSignalingMessage)
 
typedef STATUS(* SignalingClientErrorReportFunc) (UINT64, STATUS, PCHAR, UINT32)
 
typedef STATUS(* SignalingClientStateChangedFunc) (UINT64, SIGNALING_CLIENT_STATE)
 

Detailed Description

Extra callbacks definitions.

Typedef Documentation

◆ IceSetInterfaceFilterFunc

typedef BOOL(* IceSetInterfaceFilterFunc) (UINT64, PCHAR)

IceSetInterfaceFilterFunc is fired when a callback function to filter network interfaces is assigned. The callback function is expected to check for specific interface names to be whitelisted/blacklisted.

◆ PRtcDataChannel

◆ RtcDataChannel

RtcDataChannel represents a bi-directional data channel between two peers.

Reference: https://www.w3.org/TR/webrtc/#dom-rtcdatachannel

◆ RtcOnBandwidthEstimation

typedef VOID(* RtcOnBandwidthEstimation) (UINT64, DOUBLE)

RtcOnBandwidthEstimation is fired everytime a bandwidth estimation value is computed. This will be fired for receiver side estimation.

NOTE: RtcOnBandwidthEstimation is a KVS specific method

◆ RtcOnConnectionStateChange

typedef VOID(* RtcOnConnectionStateChange) (UINT64, RTC_PEER_CONNECTION_STATE)

RtcOnConnectionStateChange is fired to report a change in peer connection state.

Reference: https://www.w3.org/TR/webrtc/#event-iceconnectionstatechange

◆ RtcOnDataChannel

typedef VOID(* RtcOnDataChannel) (UINT64, PRtcDataChannel)

RtcOnDataChannel is fired when the remote PeerConnection creates a new DataChannel.

Reference: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-ondatachannel

◆ RtcOnFrame

typedef VOID(* RtcOnFrame) (UINT64, PFrame)

RtcOnFrame is fired everytime a frame is received from the remote peer. It is available via the RtpRec.

NOTE: RtcOnFrame is a KVS specific method

◆ RtcOnIceCandidate

typedef VOID(* RtcOnIceCandidate) (UINT64, PCHAR)

RtcOnIceCandidate is fired when new iceCandidate is found. if PCHAR is NULL then candidate gathering is done.

Reference: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-onicecandidate

◆ RtcOnMessage

typedef VOID(* RtcOnMessage) (UINT64, PRtcDataChannel, BOOL, PBYTE, UINT32)

RtcOnMessage is fired when a message is received for the DataChannel.

Reference: https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-onmessage

◆ RtcOnOpen

typedef VOID(* RtcOnOpen) (UINT64, PRtcDataChannel)

RtcOnOpen is fired when the DataChannel has opened

Reference: https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-onopen

◆ RtcOnPictureLoss

typedef VOID(* RtcOnPictureLoss) (UINT64)

RtcOnPictureLoss is fired everytime a Picture Loss Indication (PLI) feedback message is received. Receiving such message normally indicates that you sent a video frame which receiver could not decode. It may happen either because of packet loss or for any other reason. Generating an intra frame (aka keyframe, aka I-frame) in response to such message is considered a good strategy.

See https://tools.ietf.org/html/rfc4585#section-6.3 for more details

◆ RtcOnSenderBandwidthEstimation

typedef VOID(* RtcOnSenderBandwidthEstimation) (UINT64, UINT32, UINT32, UINT32, UINT32, UINT64)

RtcOnSenderBandwidthEstimation is fired everytime a bandwidth estimation value is computed by sender. This is an estimate of ALL packets sent across all transceivers. See https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01 for more details.

NOTE: RtcOnSenderBandwidthEstimation is a KVS specific method

Parameters
[in]UINT64User customData that will be passed along when RtcOnSenderBandwidthEstimation is called
[in]UINT32txBytes - bytes sent over the transport
[in]UINT32rxBytes - bytes reported as received
[in]UINT32txPackets - number of packets sent over the transport
[in]UINT32rxPackets - number of packets reported as received
[in]UINT64duration - time window for txBytes, rxBytes, txPackets, rxPackets

◆ SignalingClientErrorReportFunc

typedef STATUS(* SignalingClientErrorReportFunc) (UINT64, STATUS, PCHAR, UINT32)

Callback that is fired on error.

NOTE: This callback is optional and can be set to NULL.

NOTE: Returning non-success status will terminate the internal event loop and will force the state machinery to roll back to the state corresponding to the type of status returned.

Parameters
-UINT64 - Custom data passed in to the signaling client
-STATUS - The status code of the error
-PCHAR - Variable - can point to an error string or other information
-UINT32 - Length of the message
Returns
- STATUS code of the operation

◆ SignalingClientMessageReceivedFunc

typedef STATUS(* SignalingClientMessageReceivedFunc) (UINT64, PReceivedSignalingMessage)

Callback that is fired when Signalling client receives an Offer

NOTE: Returning non-success status will terminate the internal event loop and will force the state machinery to roll back to the state corresponding to the type of status returned.

Parameters
-UINT64 - Custom data passed in to the signaling client
-PReceivedSignalingMessage - Pointer to the received message
Returns
- STATUS code of the operation

◆ SignalingClientStateChangedFunc

typedef STATUS(* SignalingClientStateChangedFunc) (UINT64, SIGNALING_CLIENT_STATE)

Callback that is fired on signaling client state change.

NOTE: This callback is optional and can be set to NULL.

NOTE: Returning non-success status will terminate the internal event loop and will force the state machinery to roll back to the state corresponding to the type of status returned.

Parameters
-UINT64 - Custom data passed in to the signaling client
-SIGNALING_CLIENT_STATE - The new state
Returns
- STATUS code of the operation