The existing comment is wrong, and the test even ensures it: Bind will capture reference values by reference. That makes it hard to use with AsyncInvoker, because you can't safely Bind to a function that takes (const) reference params.
The new version of this code strips references in the bound object, so it captures by value, but can bind against functions that take const references, they'll just be references to the copy.
As the class comment implies, actual by-reference args should be passed as pointers or things that safely share (e.g. scoped_refptr) and not references directly. A new test case ensures the pointer reference works. The new code will also give a compiler error if you try to bind
to a non-const reference.
BUG=
Review URL: https://codereview.webrtc.org/1291543006
Cr-Commit-Position: refs/heads/master@{#10397}
I replaced quitSafely() with a CountDownLatch. The reason for not using ThreadUtils.invokeUninterruptibly() is that I want to stop accepting frames asap, and invokeUninterruptibly() would still accept frames during the waiting time.
BUG=webrtc:4742
Review URL: https://codereview.webrtc.org/1418223002
Cr-Commit-Position: refs/heads/master@{#10393}
This patch removes IPToString and IPToSensitiveString static helper
methods, since there are class methods that replace them already, and
they aren't used by anyone anymore.
BUG=None
R=pthacher@webrtc.org
Review URL: https://codereview.webrtc.org/1408873005
Cr-Commit-Position: refs/heads/master@{#10391}
Matches the include order in webrtc/base/criticalsection.h and makes use
of winsock2.h instead of winsock.h for consistency.
BUG=
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1407053008
Cr-Commit-Position: refs/heads/master@{#10389}
Prevents including platform headers from all files that include logging.
Also removes warn_slow_logs_delay_ which adds contention to the logging
critical section.
BUG=
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1416373004 .
Cr-Commit-Position: refs/heads/master@{#10388}
With it removed, you can now use it with scoped_refptr by wrapping it in
an rtc::RefCountedObject<rtc::Buffer>.
BUG=
Review URL: https://codereview.webrtc.org/1414053003
Cr-Commit-Position: refs/heads/master@{#10386}
Also update the wake up logic to handle the case if <5 ms interval is requested.
BUG=
Review URL: https://codereview.webrtc.org/1422593002
Cr-Commit-Position: refs/heads/master@{#10381}
The purpose with this change is to support older API levels by replacing EGL14 (API lvl 17) with EGL10 (API lvl 1). The main purpose is to lower API lvl requirement for SurfaceViewRenderer from API lvl 17 to API lvl 15. Also, camera texture capture will work on API lvl < 17 (and texture encode/decode in MediaCodec, but we don't use MediaCodec below API lvl 18?).
GLSurfaceView/VideoRendererGui is already using EGL10.
EGL 1.1 - 1.4 added new functionality, but won't affect performance. We don't need the functionality, so there should be no reason to not use EGL 1.0.
I have profiled AppRTCDemo with Qualcomm Trepn Profiler on a Nexus 5 and Nexus 6 and couldn't see any difference.
Specifically, this CL:
* Update EglBase to use EGL10 instead of EGL14.
* Update imports from EGL14 to EGL10 in a lot of files (plus changing import order in some cases).
* Update VideoCapturerAndroid to always support texture capture.
Review URL: https://codereview.webrtc.org/1396013004
Cr-Commit-Position: refs/heads/master@{#10378}
NDEBUG is a standard macro with the semantic "Not Debug" for C89, C99, C++98,
C++2003, C++2011, C++2014 standards. There are no _DEBUG macros in the
standards.
_DEBUG is a macro Visual Studio defines when you specify the /MTd or /MDd
option.
http://stackoverflow.com/a/29253284/5237416
This should help fix the TODO in third_party/libjingle/libjingle.gyp
BUG=None
R=sergeyu@chromium.org
Review URL: https://codereview.webrtc.org/1419733004
Cr-Commit-Position: refs/heads/master@{#10377}
By default, we'll now offer to receive if already receiving
(meaning that the last remote description contained a track).
Also, m-lines that are neither receiving nor sending are now correctly
marked "inactive".
Also moved some logic relating to default tracks out of webrtcsdp.cc,
such that now the direction seen by upper layers will always be
consistent with the consumed/produced SDP.
BUG=528089
Review URL: https://codereview.webrtc.org/1406803004
Cr-Commit-Position: refs/heads/master@{#10376}
Before this change, UpdateEstimate would repeatedly decrease bitrate
even though there's no fresh corresponding RTCP loss report, triggering
multiple reactions to a single indication of high packet loss.
BUG=webrtc:5101
R=stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1417723005
Cr-Commit-Position: refs/heads/master@{#10374}
The function to stop recording an AEC dump was missing from the PeerConnectionFactory interface (only a start function was provided). This CL adds the missing stop function.
BUG=webrtc:4741
Review URL: https://codereview.webrtc.org/1415733005
Cr-Commit-Position: refs/heads/master@{#10372}
Like video_decoder.cc, a call to Encode that returns
WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE will trigger an attempted fallback
to a built-in software encoder. Initialization information, along with
any rate and channel parameter info, will be replayed on the software
encoder and then the frame (that cause the fallback) will be immediately
replayed for the software encoder.
Also modified the existing behavior to Release() the "real" encoder even
if a fallback encoder exists. That seems like the correct behavior.
BUG=webrtc:2920
Review URL: https://codereview.webrtc.org/1328863002
Cr-Commit-Position: refs/heads/master@{#10368}
Xvfb is needed for the screen capture tests in modules_unittests,
which also brings in xdisplaycheck used by testing/xvfb.py.
libjingle_media_unittest was missing a resource video in the .isolate
file.
BUG=chromium:497757
R=stip@chromium.org
Review URL: https://codereview.webrtc.org/1415603005 .
Cr-Commit-Position: refs/heads/master@{#10365}
We don't allow more than one retransmission within one RTT, but the RTT
estimate might be off. Reasonably, the remote end will not send a NACK
until the packet after has been received - so always resend on first
request.
Review URL: https://codereview.webrtc.org/1414563003
Cr-Commit-Position: refs/heads/master@{#10362}
Prevents RTCP receiver reports, including PLIs with an old
receiver-report SSRC, from being dropped from the remote sender's
BundleFilter due to no longer being in use.
BUG=chromium:523928, webrtc:4883
R=stefan@webrtc.org
Review URL: https://codereview.webrtc.org/1404363003 .
Cr-Commit-Position: refs/heads/master@{#10359}
Reports show that we see full echo from the OnePlus 2 device.
Disabling hardware effects and revert to WebRTC-based
components instead as a test to see if it helps.
R=tommi@webrtc.org
TBR=tommi
BUG=b/25096456
Review URL: https://codereview.webrtc.org/1417093002 .
Cr-Commit-Position: refs/heads/master@{#10357}
This patch also also ensures that audio is restored after an incoming
GSM call.
BUG=webrtc:5058, webrtc:5012
TEST=Manual tests using modified AppRTCDemo and three different BT headsets
Review URL: https://codereview.webrtc.org/1401963002
Cr-Commit-Position: refs/heads/master@{#10354}