/// <summary> /// Stop recoding a conversation between one or more calls. /// </summary> /// <param name="captureMedia">The capture media; e.g the local microphone.</param> /// <param name="conferenceCalls">Array of remote conference calls.</param> public void StopRecordingConversation(AudioMedia captureMedia, AudioMedia[] conferenceCalls) { pjsua2.AudioMedia media = captureMedia.PjAudioMedia; media.stopTransmit(_pjAudioMediaRecorder); // For each call. for (int i = 0; i < conferenceCalls.Length; i++) { pjsua2.AudioMedia mediaCall = conferenceCalls[i].PjAudioMedia; mediaCall.stopTransmit(_pjAudioMediaRecorder); } }
/// <summary> /// Stop conference call between remote parties; allow each party to talk to each other. /// </summary> /// <param name="conferenceCalls">Array of remote conference calls.</param> public void StopConferenceCall(AudioMedia[] conferenceCalls) { // For each call. for (int i = 0; i < conferenceCalls.Length; i++) { // Get first group. pjsua2.AudioMedia mediaCall_1 = conferenceCalls[i].PjAudioMedia; // For each call. for (int j = 0; j < conferenceCalls.Length; j++) { // Get second group. pjsua2.AudioMedia mediaCall_2 = conferenceCalls[j].PjAudioMedia; // If the two audio media are not equal. if (mediaCall_1.getPortId() != mediaCall_2.getPortId()) { // Stop these two calls from communicating. mediaCall_1.stopTransmit(mediaCall_2); } } } }
/// <summary> /// Stop media flow to destination/sink port. /// </summary> /// <param name="sink">The destination media.</param> public void StopTransmit(AudioMedia sink) { pjsua2.AudioMedia media = sink.PjAudioMedia; _pjAudioMedia.stopTransmit(media); }
/// <summary> /// Stop recording. /// </summary> /// <param name="captureMedia">The audio capture media.</param> public void Stop(AudioMedia captureMedia) { pjsua2.AudioMedia media = captureMedia.PjAudioMedia; media.stopTransmit(_pjAudioMediaRecorder); }