Reason for revert:
The openmax_dl include change breaks downstream projects.
Original issue's description:
> Add check_deps rules in DEPS files.
>
> Add fine-grained check_deps rules for all of WebRTC.
> This will help both maintaining sane dependencies and provides a way
> to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.
>
> Example:
> buildtools/checkdeps/graphdeps.py --root=. --format=png \
> --out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
> --excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'
>
> will produce a neat webrtc.png image showcasing the dependencies
> (according to the DEPS file) for the bitrate_controller module.
> Some dependencies are filtered out for readability.
>
> BUG=webrtc:5623
> TESTED=Passing runs using:
> buildtools/checkdeps/checkdeps.py --root=. talk
> buildtools/checkdeps/checkdeps.py --root=. webrtc
>
> R=tommi@webrtc.org
>
> Committed: https://crrev.com/086f851b7b9b4bcbd4fe507c3bf83b760bd7f4d9
> Cr-Commit-Position: refs/heads/master@{#12008}
TBR=tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5623
Review URL: https://codereview.webrtc.org/1808573002
Cr-Commit-Position: refs/heads/master@{#12009}
Add fine-grained check_deps rules for all of WebRTC.
This will help both maintaining sane dependencies and provides a way
to visualize dependency graphs using the buildtools/checkdeps/graphdeps.py script.
Example:
buildtools/checkdeps/graphdeps.py --root=. --format=png \
--out=./webrtc.png --incl='^webrtc/modules/bitrate_controller->' \
--excl='chromium|base|external|testing|webrtc/test|\.h$|\.cc$'
will produce a neat webrtc.png image showcasing the dependencies
(according to the DEPS file) for the bitrate_controller module.
Some dependencies are filtered out for readability.
BUG=webrtc:5623
TESTED=Passing runs using:
buildtools/checkdeps/checkdeps.py --root=. talk
buildtools/checkdeps/checkdeps.py --root=. webrtc
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1796413002 .
Cr-Commit-Position: refs/heads/master@{#12008}
Part 3 of refactor. Also:
- better weak pointer delegate storage + tests
- we now ignore route changes when we're interrupted
- fixed bug where preferred sample rate wasn't set if audio session
wasn't active
BUG=
Review URL: https://codereview.webrtc.org/1796983004
Cr-Commit-Position: refs/heads/master@{#12007}
Instead of using a raw pointer output parameter. This is a good idea
in general, but will also be very convenient when scoped_ptr is gone,
since unique_ptr doesn't have an .accept() method.
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1799233002
Cr-Commit-Position: refs/heads/master@{#12004}
In this CL:
- Added more general version of ForwardDiff/RevereseDiff.
- Replaced macro for testing if type T is of unsiged int with
std::is_unsigned<T> instead.
- Changed from EXPECT_XXX to ASSERT_XXX in the unittests since a lot of
the test contains loops that would otherwise just spam the terminal.
BUG=
Review URL: https://codereview.webrtc.org/1786043004
Cr-Commit-Position: refs/heads/master@{#11982}
In addition:
- Introduces RTCAudioSessionTest
- iOS/Mac gtests now have an autoreleasepool
- Moves ScopedAutoreleasePool to rtc_base_approved
- Introduces route change button in AppRTCDemo
BUG=webrtc:5649
Review URL: https://codereview.webrtc.org/1782363002
Cr-Commit-Position: refs/heads/master@{#11971}
The old code insists on exact cipher suite matches with hardwired expectations. It does this matching parameterized with key type (RSA vs ECDSA) and TLS version (DTLS vs TLS and version 1.0 vs 1.2).
This CL changes things to check against a white-list of cipher suites, with the check parameterized with key type (again RSA vs ECDSA). Then separately checks TLS version since the old implicit check of TLS version by means of resulting cipher suite was too blunt.
Using a white list for cipher suites isn't perfect, but it is safe and requires minimal maintenance. It allows compatibility with not just one exact version of underlying crypto lib, but any version with reasonable defaults.
The CL also re-enables critical tests which had to be disabled recently to allow a boringssl roll.
BUG=webrtc:5634
Review URL: https://codereview.webrtc.org/1774583002
Cr-Commit-Position: refs/heads/master@{#11951}
Also fix a timestamp issue in video analyzer test.
BUG=webrtc:5637, webrtc:5537
Review URL: https://codereview.webrtc.org/1779773002
Cr-Commit-Position: refs/heads/master@{#11938}
When the iOS application is not in the foreground, the hardware encoder and
decoder become invalidated. There doesn't seem to be a way to query their state
so we don't know they're invalid until we get an error code after an
encode/decode request. To solve the issue, we just don't encode/decode when the
app is not active, and reinitialize the encoder/decoder when the app is active
again.
Also fixes a leak in the decoder.
BUG=webrtc:4081
Review URL: https://codereview.webrtc.org/1732953003
Cr-Commit-Position: refs/heads/master@{#11916}
for webrtc/base/numerics/safe_conversions.h.
This prevents downstream projects from breaking that have not yet been
updated to use the new file path. As soon as they have this file should
be removed.
This is a follow-up to https://codereview.webrtc.org/1753293002/.
TBR=hta@webrtc.org
NOPRESUBMIT=True
NOTRY=True
BUG=webrtc:5548
Review URL: https://codereview.webrtc.org/1774933003
Cr-Commit-Position: refs/heads/master@{#11912}
This copies the contents (unittest excluded) of base/numerics in
chromium to base/numerics in webrtc. Files added:
- safe_conversions.h
- safe_conversions_impl.h
- safe_math.h
- safe_math_impl.h
A really old version of safe_conversions[_impl].h previously existed in
base/, this has been deleted and sources using it have been updated
to include the new base/numerics/safe_converions.h.
This CL also adds a DEPS file to webrtc/base.
NOPRESUBMIT=True
BUG=webrtc:5548, webrtc:5623
Review URL: https://codereview.webrtc.org/1753293002
Cr-Commit-Position: refs/heads/master@{#11907}
Reason for revert:
Unfortunately this breaks in the main waterfall: https://build.chromium.org/p/client.webrtc/builders/Android32%20Builder/builds/6362
I think it's related to dcheck_always_on=1 which is set in GYP_DEFINES only on the trybots, but not on the bots in the main waterfall.
Original issue's description:
> Implement the NackModule as part of the new jitter buffer.
>
> Things done/implemented in this CL:
> - An interface that can send Nack (VCMNackSender).
> - An interface that can request KeyFrames (VCMKeyFrameRequestSender).
> - The nack module (NackModule).
> - A set of convenience functions for modular numbers (mod_ops.h).
>
> BUG=webrtc:5514
>
> Committed: https://crrev.com/f472c5b6722dfb221f929fc4d3a2b4ca54647701
> Cr-Commit-Position: refs/heads/master@{#11882}
TBR=sprang@webrtc.org,stefan@webrtc.org,terelius@webrtc.org,torbjorng@webrtc.org,perkj@webrtc.org,tommi@webrtc.org,philipel@webrtc.org
BUG=webrtc:5514
NOTRY=True
Review URL: https://codereview.webrtc.org/1771883002
Cr-Commit-Position: refs/heads/master@{#11887}
Things done/implemented in this CL:
- An interface that can send Nack (VCMNackSender).
- An interface that can request KeyFrames (VCMKeyFrameRequestSender).
- The nack module (NackModule).
- A set of convenience functions for modular numbers (mod_ops.h).
BUG=webrtc:5514
Review URL: https://codereview.webrtc.org/1715673002
Cr-Commit-Position: refs/heads/master@{#11882}
This is useful to keep the NAT binding alive on backup connections.
BUG=
Review URL: https://codereview.webrtc.org/1737493004
Cr-Commit-Position: refs/heads/master@{#11862}
Permits measuring times from start of recording (usually start of a
call), and not time from first event that occurs after tracing starts.
BUG=
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1746693002 .
Cr-Commit-Position: refs/heads/master@{#11815}
As a follow-up to https://codereview.webrtc.org/1737053006/ this CL further
improves memory usage by lazily allocating output buffers up to the passed
maximum size. This also changes the output buffer to a Buffer object.
BUG=
Review URL: https://codereview.webrtc.org/1741413002
Cr-Commit-Position: refs/heads/master@{#11801}
Listening sockets will not read/write directly, so they don't need buffers.
BUG=
Review URL: https://codereview.webrtc.org/1737053006
Cr-Commit-Position: refs/heads/master@{#11791}
Reason for revert:
Breaks GN in chromium.
Original issue's description:
> Move webrtc/audio/audio_sink.h to webrtc/ and fix some dependencies.
>
> webrtc/audio/audio_sink.h is used by voice engine, but webrtc/audio is
> depending on voice engine, resulting in a cyclic dependency (which we
> don't detect since we have that check turned off, see webrtc:4243).
>
> BUG=webrtc:4243, webrtc:5589
> R=pbos@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org
> TBR=tommi@webrtc.org
>
> Committed: https://crrev.com/99b345c4e50c59a776c56949c17da3f50992f1a2
> Cr-Commit-Position: refs/heads/master@{#11766}
TBR=solenberg@webrtc.org,pbos@webrtc.org,perkj@webrtc.org,tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4243, webrtc:5589
Review URL: https://codereview.webrtc.org/1739783002
Cr-Commit-Position: refs/heads/master@{#11769}
This CL introduces a new class CopyOnWriteBuffer that holds data in a
refcounted Buffer which is shared between copied CopyOnWriteBuffer to avoid
unnecessary allocations / memory copies.
BUG=webrtc:5155
Review URL: https://codereview.webrtc.org/1697743003
Cr-Commit-Position: refs/heads/master@{#11767}
The CL prevents a data race in MessageQueue where the variable "ss_" is
modified without a lock while sometimes read inside a lock.
Also thread annotations have been added to the MessageQueue class.
This was already reviewed and landed in https://codereview.webrtc.org/1675923002/
but failed in Chromium GN builds due to sharedexclusivelock.cc not being
compiled in these builds. This changed in https://codereview.webrtc.org/1712773003/
so the reland should work fine now.
BUG=webrtc:5496
Review URL: https://codereview.webrtc.org/1729893002
Cr-Commit-Position: refs/heads/master@{#11758}
When remote side closes, opensslstreamadapter could return SR_EOS which will not trigger upper layer to clean up what's left in the StreamInterfaceChannel. The result of this is when there are more packets coming in, the Write on the StreamInterfaceChannel will overflow the buffer.
The fix here is that when receiving the remote side close signal, we also close the underneath StreamInterfaceChannel which will clean up the queue to prevent overflow.
BUG=574524
TBR=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1566023002
Cr-Commit-Position: refs/heads/master@{#11751}
They are invoked with the maximum size of the data to be added, and a
callable that generates that data, like this:
buffer.AppendData(10, [] (rtc::ArrayView<uint8_t> av) {
for (uint8_t i = 0; i != 5; ++i)
av[i] = i;
return 5;
});
The callable returns the number of bytes actually written, and the
final Buffer size will be adjusted accordingly. SetData and AppendData
both return the number of bytes added (i.e. the return value of the
callable).
These versions will be useful when converting AudioEncoder::Encode to use Buffer rather than raw pointers.
Also added a few tests for the new functionality.
Review URL: https://codereview.webrtc.org/1717273002
Cr-Commit-Position: refs/heads/master@{#11733}
Reduces contention on event_mutex_ while taking gettimeofday(). Impact
highly hypothetical at this point, but less locking is better.
BUG=
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1716563003 .
Cr-Commit-Position: refs/heads/master@{#11706}
Landing https://codereview.webrtc.org/1675923002/ broke some Chromium FYI bots
because the GN build didn't include "sharedexclusivelock.cc" in that scenario.
This CL moves the files from the non-Chromium block into the common sources
list.
BUG=webrtc:5496
Review URL: https://codereview.webrtc.org/1712773003
Cr-Commit-Position: refs/heads/master@{#11699}
Reason for revert:
Broke chromium.webrtc.fyi bots:
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/9891https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20GN/builds/11416
Fails with
-----
Undefined symbols for architecture x86_64:
"rtc::SharedExclusiveLock::LockShared()", referenced from:
rtc::MessageQueue::DoDestroy() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::socketserver() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::WakeUpSocketServer() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Quit() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Get(rtc::Message*, int, bool) in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Post(rtc::MessageHandler*, unsigned int, rtc::MessageData*, bool) in librtc_base.a(messagequeue.o)
rtc::MessageQueue::DoDelayPost(int, unsigned int, rtc::MessageHandler*, unsigned int, rtc::MessageData*) in librtc_base.a(messagequeue.o)
...
"rtc::SharedExclusiveLock::UnlockShared()", referenced from:
rtc::MessageQueue::DoDestroy() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::socketserver() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::WakeUpSocketServer() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Quit() in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Get(rtc::Message*, int, bool) in librtc_base.a(messagequeue.o)
rtc::MessageQueue::Post(rtc::MessageHandler*, unsigned int, rtc::MessageData*, bool) in librtc_base.a(messagequeue.o)
rtc::MessageQueue::DoDelayPost(int, unsigned int, rtc::MessageHandler*, unsigned int, rtc::MessageData*) in librtc_base.a(messagequeue.o)
...
"rtc::SharedExclusiveLock::SharedExclusiveLock()", referenced from:
rtc::MessageQueue::MessageQueue(rtc::SocketServer*, bool) in librtc_base.a(messagequeue.o)
ld: symbol(s) not found for architecture x86_64
-----
Looks like these are compiling without "webrtc/base/sharedexclusivelock.cc".
Original issue's description:
> Prevent data race in MessageQueue.
>
> The CL prevents a data race in MessageQueue where the variable "ss_" is
> modified without a lock while sometimes read inside a lock.
>
> Also thread annotations have been added to the MessageQueue class.
>
> BUG=webrtc:5496
>
> Committed: https://crrev.com/df88460372e7ce78c871a87774d7e6d82aac6ee3
> Cr-Commit-Position: refs/heads/master@{#11683}
TBR=ivoc@webrtc.org,pthatcher@webrtc.org,deadbeef@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5496
Review URL: https://codereview.webrtc.org/1714463003
Cr-Commit-Position: refs/heads/master@{#11686}
The CL prevents a data race in MessageQueue where the variable "ss_" is
modified without a lock while sometimes read inside a lock.
Also thread annotations have been added to the MessageQueue class.
BUG=webrtc:5496
Review URL: https://codereview.webrtc.org/1675923002
Cr-Commit-Position: refs/heads/master@{#11683}
Also added a test for Clear to ensure this invariant holds.
With this change, it is easy to empty a Buffer and reuse its storage. Further down the line, code filling data into a Buffer could be written to just append to it, with the caller determining if the Buffer should first be cleared or not.
There is currently only one use of Buffer::Clear (in AudioEncoderCopyRed::Reset()) and it should benefit from the change, by not requiring a reallocation after Reset.
Review URL: https://codereview.webrtc.org/1707693002
Cr-Commit-Position: refs/heads/master@{#11680}
Also introduce a pair of scoped_ptr <-> unique_ptr conversion
functions. By using them judiciously, we can keep these CL:s small and
avoid having to convert enormous amounts of code at once.
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1702983002
Cr-Commit-Position: refs/heads/master@{#11658}