This CL connects RTCConfiguration::audioJitterBufferFastMode in
PeerConnection.java, through libjingle, down to
NetEq::Config::enable_fast_accelerate in native WebRTC.
When enabled, it will allow NetEq to do faster time-compression when
the buffer level is very high.
BUG=4691
R=henrika@webrtc.org, mflodman@webrtc.org, pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/55479004
Cr-Commit-Position: refs/heads/master@{#9344}
BUG=4690
Changes:
1. In MediaEngineInterface changed CreateChannel() to CreateChannel(const AudioOptions&). Plan is to eventually remove Get/SetAudioOptions and the cousins SetDelayOffset and SetDevices.
2. In ChannelManager changed CreateVoiceChannel(...) to CreateVoiceChannel(..., const AudioOptions&).
3. In ChannelManager removed SetEngineAudioOptions, because it is not used and we want to eventually remove SetAudioOptions.
4. Updated MediaEngineInterface implementations and unit tests accordingly.
5. In WebRtcVoiceEngine changed access of Set/ClearOptionOverrides to protected. These are only used by WebRtcVoiceMediaChannel (now a friend). Plan is to rethink the logic behind option overrides.
6. Cosmetics: replaced NULL with nullptr in touched code
R=solenberg@google.com, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/56499004
Cr-Commit-Position: refs/heads/master@{#9330}
If srtp_create fails while adding streams, it deallocates the session
but doesn't clear the passed pointer which then could lead to a
double-free in the SrtpSession dtor.
The CL also adds locking for libsrtp initialization / shutdown.
BUG=4042
R=jiayl@webrtc.org, juberti@google.com, pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47319004
Cr-Commit-Position: refs/heads/master@{#9300}
This avoids a deadlock in WebRtcVideoCapturer.
The deadlock could occur because OnIncomingFrame() has the |critical_section_stopping_| lock, which could block a Stop() on the |start_thread_|. When OnIncomingFrame() then tries to do synchronous invoke on |start_thread_| (before releasing said lock) we have a deadlock.
BUG=4670
R=magjed@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47259004
Cr-Commit-Position: refs/heads/master@{#9294}
BUG=4690
I have removed methods in VoE interfaces that were marked to be removed. I have removed them also in fake and mock implementations. I have also updated the callers in various ways:
1. Project win_test had some calls to the removed methods, but it turned out that the project is not used anymore, so I removed it entirely.
2. There were some calls to removed methods in jni methods. I have removed couple of jni methods as now they seem to do nothing.
3. With the remaining callers I just removed the calls to removed methods.
R=pbos@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/53519004
Cr-Commit-Position: refs/heads/master@{#9281}
This is being done in preparation of moving base/logging.* to rtc_base_approved. base/stream.* has libjingle dependencies that webrtc can't use, so logging.* can't depend on streams. It does look like stream.* isn't used much, so cleaning that up as well as cleaning up usage of the actual stream support (now LogStream) in the logging code, is in order, but I'll leave that to another cl.
BUG=
R=pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/54529004
Cr-Commit-Position: refs/heads/master@{#9269}
I wanted to use Config::Get in Chromium code, but it triggered the following
warning:
../../third_party/webrtc/common.h:89:20: error: declaration requires an exit-time destructor [-Werror,-Wexit-time-destructors]
static const T def;
^
../../third_party/webrtc/common.h:110:10: note: in instantiation of function template specialization requested here
return default_value<T>();
^
I assume we don't hit this in webrtc because the warning is disabled.
This also switches to the RTC_ prefix from the deprecated LIBJINGLE_.
Needed due to this Chromium CL:
https://codereview.chromium.org/1148843004/R=andresp@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/53459004
Cr-Commit-Position: refs/heads/master@{#9268}
This fixes a bug where, if the VideoCapturer failed to start under certain circumstances, the capture manager would cause a callback saying that the capturer stopped even though it never started in the first place. A VERIFY check in VideoSource::SetState would then cause a crash since the state was set to kEnded when it was already in state kEnded (SetState only allows being called when the state changes).
I only noticed this bug while doing a mistake in a separate CL. Not sure how to reliably reproduce said bug on a working build, but I have previously had camera hardware issues where it couldn't start the camera which resulted in the SetState kEnded -> kEnded crash. Hopefully this will fix that.
R=tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/51039004
Cr-Commit-Position: refs/heads/master@{#9259}
This CL adds an API to SSL stream adapters to set the maximum allowed
protocol version and with that implements support for DTLS 1.2.
With DTLS 1.2 the default cipher changes in the unittests as follows.
BoringSSL
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA -> TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
NSS
TLS_RSA_WITH_AES_128_CBC_SHA -> TLS_RSA_WITH_AES_128_GCM_SHA256
BUG=chromium:428343
R=juberti@google.com
Review URL: https://webrtc-codereview.appspot.com/50989004
Cr-Commit-Position: refs/heads/master@{#9232}
When a frame being stretched, the original rotation information is lost. This is to ensure it's carried over.
Also removed StretchToBuffer function as it's not called and dangerous.
BUG=4366
R=pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/51869004
Cr-Commit-Position: refs/heads/master@{#9224}
- Set Camera.ErrorCallback callback when opening camera to
receive camera server error notifications.
- Allow user to provide interface for handling camera errors
happening on camera thread.
- Run camera observer on camera thread and monitor camera fps
and amount of callback buffers, print statistics and report error
if camera stops generating frames.
- Query camera formats starting from front camera instead of back
camera to detect camera failures as fast as possible.
- Change all DCHECK to CHECK in androidvideocapturer.cc to detect
camera error on release builds.
- Plus adding some extra logging.
R=hbos@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/52519004
Cr-Commit-Position: refs/heads/master@{#9221}
BUG=4573,2982,2175,3590
TEST=modules_unittests --gtest_filter=AudioDevice*, AppRTCDemo and WebRTCDemo
Summary:
- Removes dependency of the 'enable_android_opensl' compiler flag.
Instead, OpenSL ES is always supported, and will enabled for devices that
supports low-latency output.
- WebRTC no longer supports OpenSL ES for the input/recording side.
- Removes old code and demos using OpenSL ES for audio input.
- Improves accuracy of total delay estimates (better AEC performance).
- Reduces roundtrip audio latency; especially when OpenSL can be used.
Performance verified on: Nexus 5, 6, 7 and 9. Samsung Galaxy S4 and S6.
Android One device.
R=magjed@webrtc.org, phoglund@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/51759004
Cr-Commit-Position: refs/heads/master@{#9208}
Enable the -Wformat-security and -Wformat warnings for talk/.
Remove *.def and *.h.pump files from webrtc/base/base.gyp since they're not supported by some tools.
BUG=4242
R=henrika@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/49969004
Cr-Commit-Position: refs/heads/master@{#9191}