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}
The problem with gmock is worked around by commenting out any other override declarations in classes using gmock.
NOPRESUBMIT=True
BUG=webrtc:3970
Review-Url: https://codereview.webrtc.org/1921653002
Cr-Commit-Position: refs/heads/master@{#12563}
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}
This CL adds the ability to convert RTCCertificate objects to and from
PEM string representations of it (its private key and certificate).
The RTCCertificate being a wrapper of SSLIdentity, this is where the
meat is.
Changes:
- SSLIdentity::PrivateKeyToPEMString() added. It together with the
already existing SSLCertificate::ToPEMString() yields both private
key and certificate PEM strings, both of which are required
parameters to SSLIdentity::FromPEMStrings().
- Its only implementation, OpenSSLIdentity::PrivateKeyToPemString().
- SSLIdentity::PublicKeyToPEMString() added, used by tests.
- sslidentity_unittest.cc updated:
* FromPEMStringsRSA and FromPEMStringsEC updated.
* CloneIdentityRSA and CloneIdentityECDSA added.
- RTCCertificate::To/FromPem added, using new class RTCCertificatePem.
- rtccertificate_unittest.cc: New test CloneWithPemSerialization.
- Renamed rtc_unittests.cc to rtccertificate_unittest.cc to match
convention.
BUG=webrtc:5794, chromium:581354
Review-Url: https://codereview.webrtc.org/1898383003
Cr-Commit-Position: refs/heads/master@{#12546}
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}
Any file that uses the RTC_DISALLOW_* macros should #include
"webrtc/base/constructormagic.h", but a shocking number of them don't.
This causes trouble when we try to wean files off of #including
scoped_ptr.h, since a bunch of files get their constructormagic macros
only from there.
Rather than fixing these errors one by one as they turn up, this CL
simply ensures that every file in the WebRTC tree that uses the
RTC_DISALLOW_* macros #includes "webrtc/base/constructormagic.h".
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1917043005
Cr-Commit-Position: refs/heads/master@{#12509}
This propagated into various other places. Also had to #include headers that
were implicitly pulled by "scoped_ptr.h".
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1920043002
Cr-Commit-Position: refs/heads/master@{#12501}
There's also one fixup that could neither be done before or after
landing the type alias CL: changing the FunctorMessageHandler template
specialization for rtc::scoped_ptr<ReturnT> to be for
std::unique_ptr<ReturnT> instead. (Having one specialization for
scoped_ptr and one for unique_ptr doesn't work when the types are the
same, and having just the scoped_ptr specialization doesn't work when
scoped_ptr is a type alias. I'm sure there's some template
metaprogramming magic that could solve the problem, but it's easy
enough to just make the change in this CL instead.)
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1797463002
Cr-Commit-Position: refs/heads/master@{#12499}
Move the all_dependent_configs configurations into
a single config for better readability.
Sync the Mac and iOS frameworks between the GYP and the GN
build. Many entries that used to be default included in
https://code.google.com/p/chromium/codesearch#chromium/src/build/config/BUILD.gn
are no longer implicitly added for Mac, so to ensure they are
they're added back for the Mac build.
NOTRY=True
Review URL: https://codereview.webrtc.org/1914913002
Cr-Commit-Position: refs/heads/master@{#12484}
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}
- name(): Returns the name of the thread (useful for debugging).
- GetThreadRef(): Returns the ID of the worker thread (also useful for debugging).
- QueueApc(): This is a Windows-only, protected function that allows derived classes on Windows to queue APCs to the worker thread.
NOTRY=true
(using notry since the patch has already passed the trybots and the cq is currently stalled)
Review URL: https://codereview.webrtc.org/1908373002
Cr-Commit-Position: refs/heads/master@{#12472}
This is done by changing the RateStatistics so that it resets its window when the accumulator is empty. It also keeps a dynamic window, so that the rates computed before a full window worth of data has been received will be computed over a smaller window. This means that the rate will be closer to the true rate, but with a higher variance.
BUG=webrtc:5773
R=perkj@webrtc.org, sprang@webrtc.org
Review URL: https://codereview.webrtc.org/1908893003 .
Cr-Commit-Position: refs/heads/master@{#12470}
They can all benefit from moving, since they contain std::string and
std::vector. We intended to add these in
https://codereview.webrtc.org/1896953004/, but got compiler errors we
couldn't make sense of, so we skipped them. It turns out that what the
compiler was complaining about was that when we said we'd have a
user-defined move constructor, it stopped generating a copy assignment
operator for us. This CL solves the problem by outfitting the types
with defaulted copy and move assignment operators too.
Review URL: https://codereview.webrtc.org/1899173002
Cr-Commit-Position: refs/heads/master@{#12469}
Reason for revert:
Breaks downstream for SRTP include paths. Will rework this and reland without that one.
Original issue's description:
> Remove the rtc_relative_path GYP variable and similar defines
>
> The defines that can be used to alter the include paths for Expat, SRTP
> and gtest are no longer needed in WebRTC or Chromium. Let's remove them
> to simplify the GYP a little.
>
> Removed defines:
> EXPAT_RELATIVE_PATH
> GTEST_RELATIVE_PATH
> SRTP_RELATIVE_PATH
>
> They're all set in the Chromium build so this shouldn't affect Chromium:
> https://code.google.com/p/chromium/codesearch#chromium/src/third_party/libjingle/libjingle.gyp
>
> BUG=webrtc:4256
> NOTRY=True
> NOPRESUBMIT=True
>
> Committed: https://crrev.com/e19cf59eb6ee44fd4d7e7fbcfdd1a6ea75063605
> Cr-Commit-Position: refs/heads/master@{#12467}
TBR=pthatcher@webrtc.org,perkj@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/1913043003
Cr-Commit-Position: refs/heads/master@{#12468}
The defines that can be used to alter the include paths for Expat, SRTP
and gtest are no longer needed in WebRTC or Chromium. Let's remove them
to simplify the GYP a little.
Removed defines:
EXPAT_RELATIVE_PATH
GTEST_RELATIVE_PATH
SRTP_RELATIVE_PATH
They're all set in the Chromium build so this shouldn't affect Chromium:
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/libjingle/libjingle.gyp
BUG=webrtc:4256
NOTRY=True
NOPRESUBMIT=True
Review URL: https://codereview.webrtc.org/1903553003
Cr-Commit-Position: refs/heads/master@{#12467}
This is needed for an upcoming task queue implementation.
The location of this folder was recently moved under base/ in Chromium, so I'm wondering if that's really the best way to do this for WebRTC as well.
NOTRY=True
Review URL: https://codereview.webrtc.org/1909223004
Cr-Commit-Position: refs/heads/master@{#12465}
This requires including logging.h, which in turn pointed out a problem with our 'LOG_TAG' macro, so that macro is now renamed.
BUG=
Review URL: https://codereview.webrtc.org/1911903002
Cr-Commit-Position: refs/heads/master@{#12464}
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}
on an IPv6 network that contains the actual default local address. This is for preventing potential IP leaking.
BUG=webrtc:5376
Review URL: https://codereview.webrtc.org/1837823005
Cr-Commit-Position: refs/heads/master@{#12417}
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}
With this CL, legacy OpenSSL should work again.
BUG=webrtc:5714
Review URL: https://codereview.webrtc.org/1868033005
Cr-Commit-Position: refs/heads/master@{#12300}
- 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}
Instead of using a raw pointer output parameter. This affects
SSLStreamAdapter::GetPeerCertificate
Transport::GetRemoteSSLCertificate
TransportChannel::GetRemoteSSLCertificate
TransportController::GetRemoteSSLCertificate
WebRtcSession::GetRemoteSSLCertificate
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/1802013002
Cr-Commit-Position: refs/heads/master@{#12262}
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}
- Posts to WebRTC thread instead of Send
- Sample buffers are returned on capture session queue instead of main queue
- Camera switch happens on captures session queue
BUG=webrtc:5679, webrtc:4212
Review URL: https://codereview.webrtc.org/1838933004
Cr-Commit-Position: refs/heads/master@{#12186}
so that the call knows which packet ids were sent on the previous candidate pair.
Note that packet_id is actually 16bits, so we can use -1 for values that are not set.
Also moved the tests for candidate pair changes to TestSelectConnectionBeforeNomination.
BUG=
R=deadbeef@webrtc.org, pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1842093002 .
Cr-Commit-Position: refs/heads/master@{#12184}
This allows the reader to reference data, thus avoiding unnecessary
allocations and memory copies.
BUG=webrtc:5155,webrtc:5670
Review URL: https://codereview.webrtc.org/1821083002
Cr-Commit-Position: refs/heads/master@{#12160}
It'll go away soon, when rtc::scoped_ptr becomes a type alias for
std::unique_ptr.
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1837693002
Cr-Commit-Position: refs/heads/master@{#12144}