VideoFrameBuffer currently has two overloaded data() functions for pixel access, one for const and one for non-const. Unfortunately, it will default to the non-const version, even when 'const scoped_refptr<VideoFrameBuffer>&' is used. This is a problem, because many subclasses use RTC_NOTREACHED() in the non-const version.
This CL makes the non-const version of data() explicit with a different, longer function name MutableData().
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1304143003 .
Cr-Commit-Position: refs/heads/master@{#9787}
- Pull out part of WebRtcVoiceMediaChannel::SetRecvCodecs() into WebRtcVoiceMediaChannel::SetRecvCodecsInternal().
BUG=webrtc:4690
R=pbos@webrtc.org
Review URL: https://codereview.webrtc.org/1291343002 .
Cr-Commit-Position: refs/heads/master@{#9785}
The primary fix in this CL is to remove the dangling |thread_| pointer in AndroidVideoCapturerJni. That thread is not safe to use after Stop() has been called. Even after Stop() has been called, we must still be able to return late frames to Java in order to not leak them, so that path has been made thread safe instead. To make sure that we always return frames, the Java frame should be wrapped in a scoped_refptr as quickly as possible, so this CL moves the wrapping from AndroidVideoCapturer to AndroidVideoCapturerJni. This also removes the need for the interface function AndroidVideoCapturerDelegate::ReturnBuffer().
Some other minor changes are:
* Remove |valid_global_refs_| and all logic related to that. Now that rtc::Bind() captures method objects as scoped_refptr, the destructor of AndroidVideoCapturerJni will not be called before all frames are returned.
* Remove global ref |j_frame_observer_|. No need for this, we don’t call it and it is kept alive with standard Java memory management.
* Add helper function ShallowCenterCrop() for VideoFrameBuffers. This functionality already exists in the constructor of WrappedI420Buffer, but it’s more convenient to have it as a separate function.
BUG=webrtc:4742,webrtc:4909
R=glaznev@webrtc.org, tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1307973002 .
Cr-Commit-Position: refs/heads/master@{#9784}
Since the TCPConnection has never been connected, they are not scheduled for ping hence will never be detected.
Also fix the case when reconnect fails, as it has become READABLE before, it also will not be deleted.
BUG=webrtc:4936
R=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1307083002 .
Cr-Commit-Position: refs/heads/master@{#9782}
With this change, the aggregates for packet waiting times are
calculated in NetEq's StatisticsCalculator insead of in
AcmReceiver. This simplifies things somewhat, and avoids having to
copy the raw data on polling.
R=ivoc@webrtc.org, minyue@webrtc.org
Review URL: https://codereview.webrtc.org/1296633002 .
Cr-Commit-Position: refs/heads/master@{#9778}
By converting three raw pointers to scoped_ptrs, we can eliminate the
need for a manually-defined destructor, and generally sleep better at
night.
R=henrik.lundin@webrtc.org
Review URL: https://codereview.webrtc.org/1310213003 .
Cr-Commit-Position: refs/heads/master@{#9776}
This CL allows you to, having generated one or more RTCCertificates, supply them to RTCConfiguration for CreatePeerConnection use. This means an SSLIdentity does not have to be generated with a DtlsIdentityStore[Interface/Impl] as part of the CreatePeerConnection steps because the certificate contains all the necessary information.
To create an RTCCertificate you have to do the identity generation yourself though. But you could reuse the same RTCCertificate for multiple connections.
BUG=webrtc:4927
R=tommi@webrtc.org, torbjorng@webrtc.org
Review URL: https://codereview.webrtc.org/1288033009 .
Cr-Commit-Position: refs/heads/master@{#9774}
During the reconnection phase, EWOULDBLOCK has been returned to upper layer which stops the sending of video stream.
BUG=webrtc:4930
R=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1288553010 .
Cr-Commit-Position: refs/heads/master@{#9767}
The only shared state is now the bandwidth estimation info.
This reduces the amount and complexity of the locking
substantially.
Review URL: https://codereview.webrtc.org/1208993010
Cr-Commit-Position: refs/heads/master@{#9762}
AudioDeviceTemplate doesn't initialize `output_` and `input_` if the
initialization of `audio_manager_` succeeds. Similarly, it doesn't
terminate `input_` and `audio_manager_` if the termination of `output_`
succeeds. This CL fixes this.
BUG=
Review URL: https://codereview.webrtc.org/1296693003
Cr-Commit-Position: refs/heads/master@{#9760}
This functionality is not used internally in WebRTC. Also, it's not safe, because the frame is supposed to be read-only, and it will likely not work for texture frames.
R=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1296113002 .
Cr-Commit-Position: refs/heads/master@{#9753}
This makes us use the clever code that adapts the path depending on where we build, so it works in google3 too.
BUG=None
Review URL: https://codereview.webrtc.org/1291283003
Cr-Commit-Position: refs/heads/master@{#9752}
If the same extension URI is used for both audio and video (such as
abs-send-time), we should be able to re-use the same ID. A conflict
only exists if two different URIs are attempting to use the same ID.
Review URL: https://codereview.webrtc.org/1286273003
Cr-Commit-Position: refs/heads/master@{#9749}
Adding 'ReceiveCodecsHaveChanged' method that will determine if codecs
HAVE changed, irrespective of order and preference.
Review URL: https://codereview.webrtc.org/1291763003
Cr-Commit-Position: refs/heads/master@{#9748}
On the controlled side, a stun request without use-candidate attribute will
be used for sending media.
BUG=4900
Review URL: https://codereview.webrtc.org/1270613006
Cr-Commit-Position: refs/heads/master@{#9747}
Migrated from https://codereview.webrtc.org/1275703006/ which causes test failures for android. On android, loopback interface was used as local interface to generate candidates. Add a test case to make sure this won't be broken in the future.
Also observed some failures under content_browsertests in chromium.fyi bot but can't repro locally. Might just be temporary test issue.
BUG=webrtc:4517
TBR=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1299333003 .
Cr-Commit-Position: refs/heads/master@{#9746}
This cl removes a lot of unused functionality in SystemInfo and reduces dependencies.
There's duplicate functionality in this class and WebRTC's CpuInfo class, so I'm consolidating the two implementations.
The CpuInfo interface will still exist since it's being used from Chrome to initialize the core count before the sandbox is engaged.
With this change, the SystemInfo class will get the benefit too of this initialization.
NOTRY=true
(using no try due to a dead android try bot)
Review URL: https://codereview.webrtc.org/1286163003
Cr-Commit-Position: refs/heads/master@{#9743}
Negative values from TimeUntilNextProcess indicate that the module
wanted to run sooner than possible, not that an invalid error code was
returned. As such it's not a contract error.
BUG=webrtc:4879
NOTRY=true
Review URL: https://codereview.webrtc.org/1257833004
Cr-Commit-Position: refs/heads/master@{#9740}