Exemple #1
0
        public PeerConnection(int connectionAddr)
        {
            _connectionAddr = connectionAddr;

            this.onAddStream_Callback_Handle          = new onAddStream_Callback(this.onAddStream_Callback);
            this.onAddTrack_Callback_Hanle            = new onAddTrack_Callback(this.onAddTrack_Callback);
            this.onDataChannel_Callback_Handle        = new onDataChannel_Callback(this.onDataChannel_Callback);
            this.onIceCandidate_Callback_Handle       = new onIceCandidate_Callback(this.onIceCandidate_Callback);
            this.onIceConnectionState_Callback_Handle = new onIceConnectionState_Callback(this.onIceConnectionState_Callback);
            this.onIceGatheringState_Callback_Handle  = new onIceGatheringState_Callback(this.onIceGatheringState_Callback);
            this.onRemoveStream_Callback_Handle       = new onRemoveStream_Callback(this.onRemoveStream_Callback);
            this.onRemoveTrack_Callback_Handle        = new onRemoveTrack_Callback(this.onRemoveTrack_Callback);
            this.onSignalingState_Callback_Handle     = new onSignalingState_Callback(this.onSignalingState_Callback);
            this.onLocalFrame_Callback_Handle         = new onFrame_Callback(this.onLocalFrame_Callback);
            this.onRemoteFrame_Callback_Handle        = new onFrame_Callback(this.onRemoteFrame_Callback);

            LibWebrtc.SetListenerAddStream(this.onAddStream_Callback_Handle, this._connectionAddr);
            LibWebrtc.SetListenerAddTrack(this.onAddTrack_Callback_Hanle, this._connectionAddr);
            LibWebrtc.SetListenerDataChannel(this.onDataChannel_Callback_Handle, this._connectionAddr);
            LibWebrtc.SetListenerIceCandidate(this.onIceCandidate_Callback_Handle, this._connectionAddr);
            LibWebrtc.SetListenerIceConnectionState(this.onIceConnectionState_Callback_Handle, this._connectionAddr);
            LibWebrtc.SetListenerIceGatheringState(this.onIceGatheringState_Callback_Handle, this._connectionAddr);
            LibWebrtc.SetListenerRemoveStream(this.onRemoveStream_Callback_Handle, this._connectionAddr);
            LibWebrtc.SetListenerRemoveTrack(this.onRemoveTrack_Callback_Handle, this._connectionAddr);
            LibWebrtc.SetListenerSignalingState(this.onSignalingState_Callback_Handle, this._connectionAddr);
            LibWebrtc.SetListenonLocalFrame(this.onLocalFrame_Callback_Handle, this._connectionAddr);
            LibWebrtc.SetListenonRemoteFrame(this.onRemoteFrame_Callback_Handle, this._connectionAddr);

            this.offerCreateFailure_Callback_Handle          = new sdpCreateFailure_Callback(this.offerCreateFailure_Callback);
            this.offerCreateSuccess_Callback_Handle          = new sdpCreateSuccess_Callback(this.offerCreateSuccess_Callback);
            this.answerCreateSuccess_Callback_Handle         = new sdpCreateSuccess_Callback(this.answerCreateSuccess_Callback);
            this.answerCreateFailure_Callback_Handle         = new sdpCreateFailure_Callback(this.answerCreateFailure_Callback);
            this.setLocalDescriptionFailure_Callback_Handle  = new setSdpFailure_Callback(this.setLocalDescriptionFailure_Callback);
            this.setLocalDescriptionSuccess_Callback_Handle  = new setSdpSuccess_Callback(this.setLocalDescriptionSuccess_Callback);
            this.setRemoteDescriptionFailure_Callback_Handle = new setSdpFailure_Callback(this.setRemoteDescriptionFailure_Callback);
            this.setRemoteDescriptionSuccess_Callback_Handle = new setSdpSuccess_Callback(this.setRemoteDescriptionSuccess_Callback);
            this.onChannelStateChanged_Callback_Handle       = new onChannelStateChanged_Callback(this.onChannelStateChanged_Callback);
            this.onChannelMessage_Callback_Handle            = new onChannelMessage_Callback(this.onChannelMessage_Callback);
        }
Exemple #2
0
 internal static extern void SetListenerSignalingState(onSignalingState_Callback handle, IntPtr peeraddr);
Exemple #3
0
 internal static extern void SetListenerSignalingState(onSignalingState_Callback handle, Int32 connectionAddr);