And redefine rtc::Buffer as
using Buffer = BufferT<uint8_t>;
(In the long run, I'd like to remove the type alias and rename the
template to just rtc::Buffer, but that requires all current users of
Buffer to start saying Buffer<uint8_t> instead, and since Buffer is
used in the API, we can't do that in one step.)
The immediate reason for the new template is that we'd like to use
BufferT<int16_t> in the AudioDecoder interface.
BUG=webrtc:5801
Review-Url: https://codereview.webrtc.org/1929903002
Cr-Commit-Position: refs/heads/master@{#12564}
Reason for revert:
Reverting this temporarily while I figure out the issues with the Chrome on android GN debug build.
Original issue's description:
> New task queueing primitive for async tasks: TaskQueue.
> TaskQueue is a new way to asynchronously execute tasks sequentially
> in a thread safe manner with minimal locking. The implementation
> uses OS supported APIs to do this that are compatible with async IO
> notifications from things like sockets and files.
>
> This class is a part of rtc_base_approved, so can be used by both
> the webrtc and libjingle parts of the WebRTC library. Moving forward,
> we can replace rtc::Thread and webrtc::ProcessThread with this implementation.
>
> NOTE: It should not be assumed that all tasks that execute on a TaskQueue,
> run on the same thread. E.g. on Mac and iOS, we use GCD dispatch queues
> which means that tasks might execute on different threads depending on
> what's the most efficient thing to do.
TBR=perkj@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.webrtc.org/1935483002
Cr-Commit-Position: refs/heads/master@{#12562}
TaskQueue is a new way to asynchronously execute tasks sequentially
in a thread safe manner with minimal locking. The implementation
uses OS supported APIs to do this that are compatible with async IO
notifications from things like sockets and files.
This class is a part of rtc_base_approved, so can be used by both
the webrtc and libjingle parts of the WebRTC library. Moving forward,
we can replace rtc::Thread and webrtc::ProcessThread with this implementation.
NOTE: It should not be assumed that all tasks that execute on a TaskQueue,
run on the same thread. E.g. on Mac and iOS, we use GCD dispatch queues
which means that tasks might execute on different threads depending on
what's the most efficient thing to do.
Review-Url: https://codereview.webrtc.org/1919733002
Cr-Commit-Position: refs/heads/master@{#12561}
Moves logic of default SocketServer from MessageQueue to SocketServer
Review-Url: https://codereview.webrtc.org/1891293002
Cr-Commit-Position: refs/heads/master@{#12541}
- Places most ObjC code into webrtc/sdk/objc instead.
- New gyp targets to build, strip and export symbols for dylib.
- Removes old script used to generate dylib.
BUG=
Review URL: https://codereview.webrtc.org/1903663002
Cr-Commit-Position: refs/heads/master@{#12524}
This is more a correction than a change since bind.h was incorrectly not
a part of rtc_base when building with Chromium while still being used
(since it's a header file only). The only dependencies that bind.h has,
are in rtc_base_approved, so there's no need to restrict usage of it to
rtc_base users only.
NOTRY=true
TBR=perkj
NO_DEPENDENCY_CHECKS=true
Review URL: https://codereview.webrtc.org/1911403002 .
Cr-Commit-Position: refs/heads/master@{#12474}
When building as part of Chromium, webrtc/base/logging.h is overridden
by webrtc_overrides/webrtc/base/logging.h that uses Chromium logging
macros.
The implementation of webrtc/base/objc/RTCFileLogger.{h,mm} however has
dependency on the webrtc implementation of logging as it define a class
that inherits from rtc::LogSink. Since the class does not exists when
the overrides are used, the file fails compilation.
Fixes the compilation for iOS as part of Chromium by not compiling the
file webrtc/base/objc/RTCFileLogger.{h,mm} in that configuration.
BUG=459705
Review URL: https://codereview.webrtc.org/1898283002
Cr-Commit-Position: refs/heads/master@{#12438}
This is a new way of generating RTCCertificate objects that is meant
to replace DtlsIdentityStoreInterface and all of its implementations
(clean up work).
It is similar to the identity store in that it generates on the worker
thread and does callback on the signaling thread, but:
- It does not generate identities in the background that you did not
ask for (preemptive generation made more sense before certificates
were parameterized, not so much anymore, and ECDSA which will be most
common takes like <=2 ms to generate).
- As such this code is less complicated than the store's code.
- The API is different, it takes Optional<uint64_t> expires and it
returns RTCCertificates, not SSLIdentities.
- It supports a blocking version of GenerateCertificate that can be
called from any thread, necessary for Chrome which can generate
certificates before the signaling/worker threads have been
initialized as WebRTC-threads (Chrome can invoke this version on
the worker thread outside of WebRTC).
This CL does not remove the identity store, only adds the alternative.
Follow-up CLs will start using it, the store will be removed once it
is no longer used anywhere.
BUG=webrtc:5707, webrtc:5708
R=hta@webrtc.org, torbjorng@webrtc.org
Review URL: https://codereview.webrtc.org/1883813002 .
Cr-Commit-Position: refs/heads/master@{#12381}
- First audio RTP packet sent / received
- First RTP packet of the first video frame sent / received
- Last RTP packet of the first video frame sent / received
These timestamps should make it easier to measure how fast the call
becomes established from the user's perspective.
Review URL: https://codereview.webrtc.org/1765443002
Cr-Commit-Position: refs/heads/master@{#12287}
Reason for revert:
Creating template CL for reland
Original issue's description:
> Revert of Cleanup webrtc/base/base.gyp (patchset #2 id:80001 of https://codereview.webrtc.org/1859803002/ )
>
> Reason for revert:
> For some odd reason this breaks chromium.webrtc.fyi bots:
> ../../third_party/webrtc_overrides/webrtc/base/win32socketinit.cc:13:2: error: "Only compile this on Windows"
> #error "Only compile this on Windows"
> ^
> 1 error generated.
>
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/11515/steps/compile/logs/stdio
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/4650/steps/compile/logs/stdio
>
> Original issue's description:
> > Cleanup webrtc/base/base.gyp
> >
> > * Remove all source exclusions since they make the file very hard to
> > read and heavily increases the risk for mistakes.
> > * Don't compile the openssl* sources if use_openssl==0.
> > * Move platform specific sources into conditional includes to make it
> > easier to verify a 1:1 mapping with BUILD.gn (since GN doesn't support
> > automatic detection of platform specific sources based on filenames).
> > * Add missing sources for the GN build.
> > * Reorder some blocks to make GYP vs GN mapping match.
> >
> > BUG=webrtc:4256
> > R=perkj@webrtc.org, torbjorng@webrtc.org
> >
> > Committed: https://crrev.com/47f33cb28ffb0fa0f053ae0aa0086e11f85bf444
> > Cr-Commit-Position: refs/heads/master@{#12235}
>
> TBR=perkj@webrtc.org,torbjorng@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:4256
> NOTRY=True
>
> Committed: https://crrev.com/c8587ad92d394bfb60498df1209a3beb9017e001
> Cr-Commit-Position: refs/heads/master@{#12237}
TBR=perkj@webrtc.org,torbjorng@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4256
Review URL: https://codereview.webrtc.org/1857163003
Cr-Commit-Position: refs/heads/master@{#12242}
* Remove all source exclusions since they make the file very hard to
read and heavily increases the risk for mistakes.
* Don't compile the openssl* sources if use_openssl==0.
* Move platform specific sources into conditional includes to make it
easier to verify a 1:1 mapping with BUILD.gn (since GN doesn't support
automatic detection of platform specific sources based on filenames).
* Add missing sources for the GN build.
* Reorder some blocks to make GYP vs GN mapping match.
BUG=webrtc:4256
R=perkj@webrtc.org, torbjorng@webrtc.org
Review URL: https://codereview.webrtc.org/1859803002 .
Cr-Commit-Position: refs/heads/master@{#12235}
The other buffer classes as well as all other dependencies are in rtc_base_approved, so I think this is a better place for it. Additionally I found that code in Chromium that already depends on the other buffer classes but now depends on the CopyOnWriteBuffer class, needed to have their build files updated and they previously depended on the buffer classes in rtc_base_approved.
TBR=jbauch@webrtc.org
Review URL: https://codereview.webrtc.org/1820643002
Cr-Commit-Position: refs/heads/master@{#12059}
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}
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}
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}
This is needed because the target is defined in webrtc/common.gyp
and its current location crosses package boundaries when generating
projects for some build systems.
NOTRY=True
Review URL: https://codereview.webrtc.org/1665603003
Cr-Commit-Position: refs/heads/master@{#11496}
It looks to me like targets :rtc_base_approved is logically a subset of
:rtc_base, and so any targets depending on :rtc_base expect to also get
access to the headers in :rtc_base_approved.
Thus I think it's appropriate for :rtc_base to have :rtc_base_approved in
public_deps, so that `gn check` will permit this without clients having to
explicitly depend on both.
NOTRY=True
Review URL: https://codereview.webrtc.org/1578833002
Cr-Commit-Position: refs/heads/master@{#11227}
We'll only use temporary address for IPv6. However, due to a bug in iOS sdk, the necessary headers are not included. This change copies the minimum necessary definitions such that we could retrieve the ip attributes.
BUG=webrtc:4343
Review URL: https://codereview.webrtc.org/1531763006
Cr-Commit-Position: refs/heads/master@{#11114}
Created a simple unit test for the new random number generator. (It mostly tests
that the generated numbers are consistent with the intended distribution, e.g. uniform.
It is not a comprehensive test of the quality of the random numbers.)
Several assertions in OveruseDetectorTest seem to depend on the exact sequence of random numbers. I updated those numbers to work with the new PRNG.
Compute the standard deviation of the expected result in TestReorderFilter instead of passing an uncertainty parameter.
BUG=webrtc:5177
Review URL: https://codereview.webrtc.org/1457023002
Cr-Commit-Position: refs/heads/master@{#10965}
Also changes presubmit script to not run cpplint on objc dirs.
BUG=
Review URL: https://codereview.webrtc.org/1467173006
Cr-Commit-Position: refs/heads/master@{#10815}
The corresponding set of overrides weren't moved when logging.cc etc.
was moved over. This wasn't noticed because all existing targets before
webrtc fuzzers used to link both rtc_base and rtc_base_approved in
Chromium. Also adding //base:base as a dependency, this used to be
linked in by other targets either way before but generated build errors
when a target solely depends on rtc_base_approved.
BUG=webrtc:4771
R=kjellander@webrtc.orgTBR=henrikg@webrtc.org
Review URL: https://codereview.webrtc.org/1473223005 .
Cr-Commit-Position: refs/heads/master@{#10792}
Also removes all virtual methods. Permits using a thread from
rtc_base_approved (namely event tracing).
BUG=webrtc:5158
R=tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1469013002
Cr-Commit-Position: refs/heads/master@{#10760}