Problem found while refactoring usage in examples/turnserver/.
Bug: webrtc:6424
Change-Id: Ib1d54055c5914136b5bf165d48ab7d19520ff967
Reviewed-on: https://webrtc-review.googlesource.com/c/108302
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25412}
Since they rely on a real time simulation, a new build target is
introduced that is intended to be used for real time tests.
Bug: webrtc:9518
Change-Id: Iea58f6a2b687f026e9ab1f37b4aabf8261ed7d23
Reviewed-on: https://webrtc-review.googlesource.com/c/107345
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25410}
Modified PressEnterToContinue() to run the Windows message loop in the
context of the SingleThreadedTaskQueueForTesting thread. The previous
PressEnterToContinue() was running the message loop in the context of
the main thread, but the "Local Preview" and "Loopback Video #0" are
created in the context of the SingleThreadedTaskQueueForTesting thread
and the message loop must be executed in the context of the thread that
created these windows in order for these windows to respond to any
event.
BUG=webrtc:9123
Change-Id: I2ec19f2569a940a510d3b2bd3881a89032d70332
Reviewed-on: https://webrtc-review.googlesource.com/c/67520
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25408}
anonymous namespace.
There is some really scary code in this function that I did not refactor in
this change. I believe the ASN parsing code should be removed completely
and have attached TODOs to do this once we have a correct test suite to validate
the functionality. I am almost certain openssl has functions that do this
better.
Bug: webrtc:9860
Change-Id: Ice06079eb1e5b10bdb2ee45ae45cbfb2ce8f6f13
Reviewed-on: https://webrtc-review.googlesource.com/c/108206
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25404}
This is some of the older code in the code base and is using raw gotos. This
first pass of the file just does some basic refactorings to make the code more
readable.
Bug: webrtc:9860
Change-Id: Ic7b8dc51fe4b43af77c44dd725877bd0f4d47aec
Reviewed-on: https://webrtc-review.googlesource.com/c/108202
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25403}
Just a simple rename change to update these functions to be in compliance with
the WebRTC/Chromium style guide.
Bug: webrtc:9860
Change-Id: I5bc831754c80b7b00bd1e5e0b3905e55f5d22b0c
Reviewed-on: https://webrtc-review.googlesource.com/c/108204
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25402}
OpenSSL implementations are all final implementations of their more abstract
SSL variants. This should be both documented and enforced by the use of the
final keyword to indicate to future WebRTC contributors that this is the
intended depth of inheritance and it shouldn't be extended again. Hopefully
this minor change will help keep the code simpler to maintain going forward.
Bug: webrtc:9860
Change-Id: Ie22de722214e3b209c3d7727a93ac819c112434e
Reviewed-on: https://webrtc-review.googlesource.com/c/108203
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25401}
There was a suggestion in a previous CL to add an end to end test case to
prevent future regressions. I have enabled this by adding two fakes that
perform fake encryption and enabling an end to end test with VP8 and the
GenericDescriptor.
Bug: webrtc:9927
Change-Id: Icf96eeed541ada1e0579eb81b6f87a46d1c43d96
Reviewed-on: https://webrtc-review.googlesource.com/c/108020
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25399}
This change deals with a race condition if the media channel has been stopped
and is in the process of changing while we get a call to set a FrameDecryptor
or FrameEncryptor.
Bug: webrtc:9926, webrtc:9932
Change-Id: Ie2da2fa1f31f5cb5eb0b481861a7008e635f562d
Reviewed-on: https://webrtc-review.googlesource.com/c/107986
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25398}
Add some constructors to the structs in rtc_event_log_parser_new.h,
so that they may be emplaced into containers.
Bug: webrtc:8111
Change-Id: I2ccc3026673eef1237c7de2405e500fe9d7a33d0
Reviewed-on: https://webrtc-review.googlesource.com/c/108121
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25396}
Before this CL, when we encoded a sequence with a non-existent
base, we pretended that the delta was 0, and the first delta was
based on that. However, in a sequence where the deltas are small,
but where the first element is big, that would produce
unnecessarily wide deltas. Therefore, we change the behavior in
cases where the base is non-existent, to encode the first existent
value (if any) as a varint; the delta width may then be smaller.
This CL include two piggy-backed changes:
1. Varint encoding/decoding moved to its own file (and an
additional flavor added).
2. The unit tests for delta encoding are further parameterized
with a random seed.
Bug: webrtc:8111
Change-Id: I76fff577c86d019c8334bf74b76bd35db06ff68d
Reviewed-on: https://webrtc-review.googlesource.com/c/107860
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25395}
Use helper TimeMicrosToNtp() on clock TimeInMicroseconds()
instead of CurrentNtpTime() and CurrentNtpTimeMillis()
Also update TimeMicrosToNtp() to not introduce fractional in
milliseconds offset. Expose that offset in time_utils.h
Add test showing indended behavior.
Bug: webrtc:9919
Change-Id: I8b019e11ae5b79d0b8ba113a84066b0369cd2575
Reviewed-on: https://webrtc-review.googlesource.com/c/107889
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25391}
This means that the PacedSender::Process function becomes slightly
larger, however, it makes it much more obvious to the reader where
the locks are held or not. Confusion over this has previously caused
bugs.
Bug: webrtc:9870
Change-Id: I63257eae59ecf5e7dd28ea24f63157cefe9f81bd
Reviewed-on: https://webrtc-review.googlesource.com/c/105460
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25389}
This is implemented by allowing users to set two different aspect
ratios, one for landscape input and one for portrait input. This extra
control might be useful in other scenarios as well.
Bug: webrtc:9903
Change-Id: I91676737f4aa1f5d94cfe79ac51d5f866779945b
Reviewed-on: https://webrtc-review.googlesource.com/c/108086
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25387}
After the problem fixed by [1], it seems wiser to only check that
`include_rules` contains all the top level directories and delegate the
action of adding a rule for .cc file to the first user of an header
from a new root level directory.
This should make the presubmit check more actionable (in [1] for example
the solution was to *not* add "+ios" but to consider ios/ as a non
WebRTC directory).
[1] - https://webrtc-review.googlesource.com/c/107707
Bug: webrtc:9887, webrtc:9924
Change-Id: Ic85e2153a2b83a4874c8faec3c5d1a8c61fe6faf
Reviewed-on: https://webrtc-review.googlesource.com/c/107731
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25386}
This is a reland of ece3c228a2cbd1c1b05eee3a7f55dbb6f020acbc
Original change's description:
> Encode RTC event logs in new format.
>
> This CL adds the encoder and wires it up to the event log.
> Parser and unit tests are uploaded in a separate CL.
>
> Bug: webrtc:8111
> Change-Id: I6470003e55c2c4006cd8349a2c4bdc3f9491d869
> Reviewed-on: https://webrtc-review.googlesource.com/c/106708
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Elad Alon <eladalon@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25333}
Bug: webrtc:8111
Change-Id: I22eeca36d6b1f7cfa1ac65347571ebe33cecc1fc
Reviewed-on: https://webrtc-review.googlesource.com/c/108082
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25382}
After [1], the Chromium Roll into WebRTC fails with the following error:
FAILED: gen/examples/ \
AppRTCMobile_stubbed_video_io_test_apk__apk_manifest/AndroidManifest.xml
uses-sdk:minSdkVersion 13 cannot be smaller than version 14 declared in
library [...]/android_arch_lifecycle_runtime_java/AndroidManifest.xml
as the library might be using APIs not available in 13
Suggestion: use a compatible library with a minSdk of at most 13,
or increase this project's minSdk version to at least 14,
or use tools:overrideLibrary="android.arch.lifecycle" to force
usage (may lead to runtime failures)
[1] - https://chromium-review.googlesource.com/c/chromium/src/+/1298342
Bug: None
Change-Id: I839dd9dbb346d8f40c25f6a6b93b5d5fc1c26ae9
Reviewed-on: https://webrtc-review.googlesource.com/c/108080
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25381}
All dependencies now depend on :rtc_simulcast_encoder_adapter directly.
Leaving the simulcast adapter as a dependency of
:rtc_internal_video_codecs because it is used by
VP8EncoderSimulcastProxy.
Bug: webrtc:7925
Change-Id: I536d3d3b80b13529610847f44e62ad702915be60
Reviewed-on: https://webrtc-review.googlesource.com/c/107690
Commit-Queue: Jonathan Yu <yujo@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25378}
We have several places in the SSL APIs where we will poke holes through the API
surface with boolean flags to enable scenarios like disabling authentication.
This isn't an ideal approach because it is error prone and confusing to the
API user. Instead authentication should be dependency injected with a default
secure component and a fake can be created for testing.
For now this CL just cleans up the left over unused test flags and renames the
remaining ones with a ForTesting postfix to make it very clear they shouldn't
be used in any production code.
Bug: webrtc:9860
Change-Id: I31f55cf85097bacb9cd895c16a6fad3773cd1c2b
Reviewed-on: https://webrtc-review.googlesource.com/c/107786
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25377}
With the expanding use cases for webrtc::CryptoOptions it makes more sense for
it to be be available per peer connection instead of only as a factory option.
To support backwards compatability for now this code will support the factory
method of setting crypto options by default. However it will completely
overwrite these settings if an RTCConfiguration.crypto_options is provided.
Got LGTM offline from Sami, adding him to TBR if he has any further comments.
TBR=sakal@webrtc.org
Bug: webrtc:9891
Change-Id: I86914cab69284ad82afd7285fd84ec5f4f2c4986
Reviewed-on: https://webrtc-review.googlesource.com/c/107029
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25375}
This change corrects a potential race condition when updating a FrameEncryptor
for the audio send channel. If a FrameEncryptor is set on an active audio
stream it is possible for the current FrameEncryptor attached to the audio channel to be deallocated due to
the FrameEncryptors reference count reaching zero before the new FrameEncryptor is set on the
channel.
To address this issue the ChannelSend is now holds a scoped_reftptr<FrameEncryptor>
to only allow deallocation when it is actually set on the encoder queue.
ChannelSend is unique in this respect as the Audio Receiver a long with the
Video Sender and Video Receiver streams all recreate themselves when they have
a configuration change. ChannelSend instead reconfigures itself using the
existing channel object.
Added Seth as TBR as this only introduces mocks.
TBR=shampson@webrtc.org
Bug: webrtc:9907
Change-Id: Ibf391dc9cecdbed1874e0252ff5c2cb92a5c64f4
Reviewed-on: https://webrtc-review.googlesource.com/c/107664
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25374}
This functionality isn't (currently) available on Fuchsia from the OS.
Bug: chromium:808287
Change-Id: If017bc762448c437b74cb03587ba35da5d131c75
Reviewed-on: https://webrtc-review.googlesource.com/c/107760
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#25373}
This log is triggering many times a second for Chrome Remote Desktop on some
browsers. This CL just turns it off for release builds to avoid log files
filling up users' disks until we figure out what's going on.
Bug: chromium:888038
Change-Id: Ibbe9d47295b3633314feb28e155e3f59b878dbdb
Reviewed-on: https://webrtc-review.googlesource.com/c/107688
Commit-Queue: Jamie Walch <jamiewalch@google.com>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25372}
Underscore methods in the middle of classes is against the chromium style guide
this change is part of a long series of changes to refactor crypto code in
WebRTC to conform to the chromium standard better.
1. ssl_cert() -> GetSSLCertificate()
2. ssl_cert_chain() -> GetSSLCertificateChain()
3. Small tidying up in rtccertificategenerator.cc
Bug: webrtc:9860
Change-Id: I670f76e31d6d4f873034edb72d958b3c227379cb
Reviewed-on: https://webrtc-review.googlesource.com/c/107802
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25371}
Previously the rate limits weren't properly applied. This is fixed by
working on mutable copies of the TrackConfig.
Bug: webrtc:9718
Change-Id: I7438c59efa5d7e70fa3ce5e466e2c53a5a7ea9e2
Reviewed-on: https://webrtc-review.googlesource.com/c/107636
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25367}
This prepares for adding parameters to OnBitrateUpdated. By using a
struct, additional fields doesn't require a change in the signature and
only the obeservers that use the new fields will be affected by the
change.
Bug: webrtc:9718
Change-Id: I7dd6c9577afd77af06da5f56aea312356f80f9c0
Reviewed-on: https://webrtc-review.googlesource.com/c/107727
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25366}
Rather fail at compile time than at run-time.
Bug: chromium:898373
Bug: webrtc:9855
Change-Id: Iaae81e04e4a8135814c1226f82d3a994de75e9ad
Reviewed-on: https://webrtc-review.googlesource.com/c/107886
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25364}