Add SetAudioPlayout and SetAudioRecording methods to the PeerConnection API
(this CL is based on the work by Taylor and Steve in https://webrtc-review.googlesource.com/c/src/+/10201) This SetAudioPlayout method lets applications disable audio playout while still processing incoming audio data and generating statistics on the received audio. This may be useful if the application wants to set up media flows as soon as possible, but isn't ready to play audio yet. Currently, native applications don't have any API point to control this, unless they completely implement their own AudioDeviceModule. The SetAudioRecording works in a similar fashion but for the recorded audio. One difference is that calling SetAudioRecording(false) does not keep any audio processing alive. TBR=solenberg Bug: webrtc:7313 Change-Id: I0aa075f6bfef9818f1080f85a8ff7842fb0750aa Reviewed-on: https://webrtc-review.googlesource.com/16180 Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20499}
This commit is contained in:
@ -363,6 +363,18 @@ public class PeerConnection {
|
||||
|
||||
public native void setRemoteDescription(SdpObserver observer, SessionDescription sdp);
|
||||
|
||||
// True if remote audio should be played out. Defaults to true.
|
||||
// Note that even if playout is enabled, streams will only be played out if
|
||||
// the appropriate SDP is also applied. The main purpose of this API is to
|
||||
// be able to control the exact time when audio playout starts.
|
||||
public native void setAudioPlayout(boolean playout);
|
||||
|
||||
// True if local audio shall be recorded. Defaults to true.
|
||||
// Note that even if recording is enabled, streams will only be recorded if
|
||||
// the appropriate SDP is also applied. The main purpose of this API is to
|
||||
// be able to control the exact time when audio recording starts.
|
||||
public native void setAudioRecording(boolean recording);
|
||||
|
||||
public boolean setConfiguration(RTCConfiguration config) {
|
||||
return nativeSetConfiguration(config, nativeObserver);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user