- Use worker_thread TaskQueue for channel operations
- Fix use of deprecated DNS resolver
- Restore quantization of audio levels
- Simplify crypto options change
- Move channel blocking operations to pc
- Sync opus for merge
Keeping the headers to allow compatibility with current users
that expect the headers to be in that target before they are
also updated.
Bug: webrtc:9838
Change-Id: I8b1e88850958e92c043686587a37791f01860220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290569
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39031}
Uppercase constants are more likely to conflict with macros (for
example rtc::SRTP_AES128_CM_SHA1_80 and OpenSSL SRTP_AES128_CM_SHA1_80).
This CL renames some constants and follows the C++ style guide.
Bug: webrtc:12997
Change-Id: I2398232568b352f88afed571a9b698040bb81c30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226564
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34553}
as it has been used in production for a while already.
BUG=None
Change-Id: Idd466f3ad02129a8125e54122e77036959e67aa4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175131
Reviewed-by: Justin Uberti <juberti@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#31817}
`gn format` recently [1] changed its formatting behavior
for deps, source, and a few other elements when they
are assigned (with =) single-element lists to be consistent
with the formatting of updates (with +=) with single-element.
Now that we've rolled in a GN binary with the change,
reformat all files so that people don't get presubmit
warnings due to this.
CL generated with:
$ git ls-files | grep BUILD.gn | xargs gn format
$ gn format build_overrides/build.gni
$ gn format build_overrides/gtest.gni
$ gn format modules/audio_coding/audio_coding.gni
$ gn format webrtc.gni
$ gn format .gn
Plus a few manual changes to add exceptions for
"public_deps" (after changing these lines the presubmit
started to complain).
[1] - https://gn-review.googlesource.com/c/gn/+/6860
Bug: webrtc:11302
Change-Id: Iac29d23c1618ebef925c972e2891cd9f4e8cd613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166882
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30334}
Move the GCM srtp cipher suites below the default SRTP_AES128_CM_SHA1_80 one.
This will not negotiate them by default since they have an impact on packet overhead for audio-only calls.
GCM can still be negotiated if the peer offers it as preferred cipher suite or answers with just that cipher suite.
BUG=chromium:713701
Change-Id: I79bd4ab827e5c7f55f5550d14db3f4217a7eff86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158404
Reviewed-by: Justin Uberti <juberti@google.com>
Reviewed-by: Justin Uberti <juberti@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Justin Uberti <juberti@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29672}
Static libraries don't guarantee that an exported symbol gets linked
into a shared library (and in order to support Chromium's component
build mode, WebRTC needs to be linked as a shared library).
Source sets always pass all the object files to the linker.
On the flip side, source_sets link more object files in release builds
and to avoid this, this CL introduces a the GN template "rtc_library" that
expands to static_library during release builds and to source_set during
component builds.
See: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_source_set
Bug: webrtc:9419
Change-Id: I4667e820c2b3fcec417becbd2034acc13e4f04fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157168
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29525}
This reverts commit 7dd83e2bf7.
Reason for revert: This wasn't the cause of the break.
Original change's description:
> Revert "Refactor FrameDecryptorInterface::Decrypt to use new API."
>
> This reverts commit 642aa81f7d.
>
> Reason for revert: Speculative revert. The chromium roll is failing:
> https://ci.chromium.org/p/chromium/builders/try/linux-rel/64388
> But I can't figure out exactly what is failing, this looks suspecious.
>
> Original change's description:
> > Refactor FrameDecryptorInterface::Decrypt to use new API.
> >
> > This change refactors the FrameDecryptorInterface to use the new API. The new
> > API surface simply moves bytes_written to the return type and implements a
> > simple Status type.
> >
> > Bug: webrtc:10512
> > Change-Id: I622c5d344d58e618853c94c2f691cf7c8fb73a36
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131460
> > Reviewed-by: Steve Anton <steveanton@webrtc.org>
> > Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Commit-Queue: Benjamin Wright <benwright@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27497}
>
> TBR=brandtr@webrtc.org,steveanton@webrtc.org,solenberg@webrtc.org,ossu@webrtc.org,stefan@webrtc.org,benwright@webrtc.org
>
> Change-Id: Ia9ec70263762c34671af13f0d519e636eb8473cd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10512
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132013
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27510}
TBR=brandtr@webrtc.org,steveanton@webrtc.org,solenberg@webrtc.org,hbos@webrtc.org,ossu@webrtc.org,stefan@webrtc.org,benwright@webrtc.org
Change-Id: I8e4b7965cf1d1a1554c3b46e6245f5ad0d2dcbb4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10512
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131982
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27529}
This reverts commit 642aa81f7d.
Reason for revert: Speculative revert. The chromium roll is failing:
https://ci.chromium.org/p/chromium/builders/try/linux-rel/64388
But I can't figure out exactly what is failing, this looks suspecious.
Original change's description:
> Refactor FrameDecryptorInterface::Decrypt to use new API.
>
> This change refactors the FrameDecryptorInterface to use the new API. The new
> API surface simply moves bytes_written to the return type and implements a
> simple Status type.
>
> Bug: webrtc:10512
> Change-Id: I622c5d344d58e618853c94c2f691cf7c8fb73a36
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131460
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Benjamin Wright <benwright@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27497}
TBR=brandtr@webrtc.org,steveanton@webrtc.org,solenberg@webrtc.org,ossu@webrtc.org,stefan@webrtc.org,benwright@webrtc.org
Change-Id: Ia9ec70263762c34671af13f0d519e636eb8473cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10512
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132013
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27510}
This change refactors the FrameDecryptorInterface to use the new API. The new
API surface simply moves bytes_written to the return type and implements a
simple Status type.
Bug: webrtc:10512
Change-Id: I622c5d344d58e618853c94c2f691cf7c8fb73a36
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131460
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27497}
This change adds FrameDecryptorInterface::Result to the FrameDecryptorInterface
API. Result contains a Status and bytes_written. This removes requiring out
parameters from the API and provides a simpler status return code for the
function. This is in response to comments suggested here:
https://webrtc-review.googlesource.com/c/src/+/131358
int FrameDecryptorInterface::Decrypt() will be removed in a follow up CL.
Bug: webrtc:10512
Change-Id: I47f19f154d1d8430acd6e4a6f433ab24c455fd51
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131362
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27470}
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.
bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
This change adds a new subcategory to the public native webrtc::CryptoOptions
structure: webrtc::CryptoOptions::Frame.
This new structure has a single off by default property:
crypto_options.frame.require_frame_encryption.
This new flag if set prevents RtpSenders from sending outgoing payloads unless
a frame_encryptor_ is attached and prevents RtpReceivers from receiving
incoming payloads unless a frame_decryptor_ is attached.
This option is important to enforce no unencrypted data can ever leave the
device or be received.
I have also attached bindings for Java and Objective-C.
I have implemented this functionality for E2EE audio but not E2EE video
since the changes are still in review.
Bug: webrtc:9681
Change-Id: Ie184711190e0cdf5ac781f69e9489ceec904736f
Reviewed-on: https://webrtc-review.googlesource.com/c/105540
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25238}
CryptoOptions provided top level optional fields to support Chromium and
internal use cases. These locations have been updated to use the new API and
this CL removes these legacy compatability options.
This CL will be checked in after the chromium CL lands:
https://chromium-review.googlesource.com/c/chromium/src/+/1275025
Bug: webrtc:9860
Change-Id: I2790b42c91c49b83e5380a5271df2ceda556c53f
Reviewed-on: https://webrtc-review.googlesource.com/c/105644
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25148}
Promotes rtc::CryptoOptions to webrtc::CryptoOptions converting it from class
that only handles SRTP configuration to a more generic structure that can be
used and extended for all per peer connection CryptoOptions that can be on a
given PeerConnection.
Now all SRTP related options are under webrtc::CryptoOptions::Srtp and can be
accessed as crypto_options.srtp.whatever_option_name. This is more inline with
other structures we have in WebRTC such as VideoConfig. As additional features
are added over time this will allow the structure to remain compartmentalized
and concerned components can only request a subset of the overall configuration
structure e.g:
void MySrtpFunction(const webrtc::CryptoOptions::Srtp& srtp_config);
In addition to this it made little sense for sslstreamadapter.h to hold all
Srtp related configuration options. The header has become loo large and takes on
too many responsibilities and spilting this up will lead to more maintainable
code going forward.
This will be used in a future CL to enable configuration options for the newly
supported Frame Crypto.
Reland Fix:
- cryptooptions.h - now has enable_aes128_sha1_32_crypto_cipher as an optional
root level configuration.
- peerconnectionfactory - If this optional is set will now overwrite the
underyling value.
This along with the other field will be deprecated once dependent projects
are updated.
TBR=sakal@webrtc.org,kthelgason@webrtc.org,emadomara@webrtc.org,qingsi@webrtc.org
Bug: webrtc:9681
Change-Id: Iaa6b741baafb85d352e42f54226119f19d97151d
Reviewed-on: https://webrtc-review.googlesource.com/c/105560
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Emad Omara <emadomara@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25135}
This reverts commit ac2f3d14e4.
Reason for revert: Breaks downstream project
Original change's description:
> Move CryptoOptions to api/crypto from rtc_base/sslstreamadapter.h
>
> Promotes rtc::CryptoOptions to webrtc::CryptoOptions converting it from class
> that only handles SRTP configuration to a more generic structure that can be
> used and extended for all per peer connection CryptoOptions that can be on a
> given PeerConnection.
>
> Now all SRTP related options are under webrtc::CryptoOptions::Srtp and can be
> accessed as crypto_options.srtp.whatever_option_name. This is more inline with
> other structures we have in WebRTC such as VideoConfig. As additional features
> are added over time this will allow the structure to remain compartmentalized
> and concerned components can only request a subset of the overall configuration
> structure e.g:
>
> void MySrtpFunction(const webrtc::CryptoOptions::Srtp& srtp_config);
>
> In addition to this it made little sense for sslstreamadapter.h to hold all
> Srtp related configuration options. The header has become loo large and takes on
> too many responsibilities and spilting this up will lead to more maintainable
> code going forward.
>
> This will be used in a future CL to enable configuration options for the newly
> supported Frame Crypto.
>
> Change-Id: I99d1be36740c59548c8e62db52d68d738649707f
> Bug: webrtc:9681
> Reviewed-on: https://webrtc-review.googlesource.com/c/105180
> Reviewed-by: Emad Omara <emadomara@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Commit-Queue: Benjamin Wright <benwright@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25130}
TBR=steveanton@webrtc.org,sakal@webrtc.org,kthelgason@webrtc.org,emadomara@webrtc.org,qingsi@webrtc.org,benwright@webrtc.org
Bug: webrtc:9681
Change-Id: Ib0075c477c951b540d4deecb3b0cf8cf86ba0fff
Reviewed-on: https://webrtc-review.googlesource.com/c/105541
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25133}
Promotes rtc::CryptoOptions to webrtc::CryptoOptions converting it from class
that only handles SRTP configuration to a more generic structure that can be
used and extended for all per peer connection CryptoOptions that can be on a
given PeerConnection.
Now all SRTP related options are under webrtc::CryptoOptions::Srtp and can be
accessed as crypto_options.srtp.whatever_option_name. This is more inline with
other structures we have in WebRTC such as VideoConfig. As additional features
are added over time this will allow the structure to remain compartmentalized
and concerned components can only request a subset of the overall configuration
structure e.g:
void MySrtpFunction(const webrtc::CryptoOptions::Srtp& srtp_config);
In addition to this it made little sense for sslstreamadapter.h to hold all
Srtp related configuration options. The header has become loo large and takes on
too many responsibilities and spilting this up will lead to more maintainable
code going forward.
This will be used in a future CL to enable configuration options for the newly
supported Frame Crypto.
Change-Id: I99d1be36740c59548c8e62db52d68d738649707f
Bug: webrtc:9681
Reviewed-on: https://webrtc-review.googlesource.com/c/105180
Reviewed-by: Emad Omara <emadomara@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25130}
This change allows supporting additional data for authentication and adds a
requirement for the contributing source to be provided during decryption.
Change-Id: Ifc19cb2d8a7d6c3715c83c95cf12f64df0bca454
Bug: webrtc:9681
Reviewed-on: https://webrtc-review.googlesource.com/100001
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24712}
This change allows an implementer to provide a custom error code to be returned
on failure with 0 being reserved for success. It also modifies the output size
APIs to be more specific and requests the number of bytes written to be returned
so we can determine how many bytes we need to send.
Bug: webrtc:9681
Change-Id: I13d34861bf851527fcbb350d0cfb480c0f95a6b3
Reviewed-on: https://webrtc-review.googlesource.com/98720
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24613}
This change injects the FrameEncryptorInterface and the FrameDecryptorInterface
into the RtpSenderInterface and RtpReceiverInterface respectively. This is the
second stage of the injection. In a follow up CL non owning pointers to these
values will be passed down into the media channel.
This change also updates the corresponding mock files.
Bug: webrtc:9681
Change-Id: I964084fc270e10af9d1127979e713493e6fbba7d
Reviewed-on: https://webrtc-review.googlesource.com/96625
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24489}
FrameDecryptorInterface into the public WebRTC API surface.
This change just addresses the headers and not the internal changes.
Bug: webrtc:9681
Change-Id: I1db0172fe55ba378f62e7781c2b7dcdb93d63239
Reviewed-on: https://webrtc-review.googlesource.com/96622
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24488}