Add field trials to audio api.
It is added as a pointer with nullptr as default.
It is not (yet) used anywhere.
Usage of field trials comes in subsequent patches.
Bug: webrtc:10335
Change-Id: Icbe22d95c356a6fefde34590f11ea63f005ab09e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255521
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36213}
We should avoid creating codecs with invalid parameters, since this can
expose security issues. For many codecs the IsOk() method to check the
codec config is only called in DCHECKs. This CL ensures IsOk() is always
called, also in non-debug builds.
Bug: chromium:1265806
Change-Id: Ibd3c6c65d3bb547cd2603e11808ac40ac693a8b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238801
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35422}
And use it in a few places that were using RTC_CHECK(false) or FATAL()
to do the exact same job. There should be no change in behavior.
Bug: none
Change-Id: I36d5e6bcf35fd41534e08a8c879fa0811b4f1967
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191963
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32567}
Signal only uses the Opus codec. Therefore, not adding the other codecs
to the runtime list. Also disabling CN (comfort noise) since it is not
needed for Opus and telephone-events, since there is no DTMF in the
Signal clients.
The patch simply comments out some code sections.
`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}
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}
These things are no longer brand new, so it makes even less sense
than it once did to warn users that they may change at any time.
Bug: none
Change-Id: I43a6915d9e00fbfef30fdb89869873b129297c8d
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/106980
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25283}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameter 'api'
Then undo changes to optional target itself and optional_unittests
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I44093da213369d6a502e33792c694f620f53b779
Reviewed-on: https://webrtc-review.googlesource.com/84621
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23707}
Only specially taggged targets may transitively depend on poisonous
targets. We first apply it to audio codecs.
This makes it much clearer exactly what parts of the code still have
dependencies on the audio codecs (and we want to eventually get rid of
pretty much all of them).
Bug: webrtc:8396, webrtc:9121
Change-Id: Iba5c2e806c702b5cfe881022674705f647896d43
Reviewed-on: https://webrtc-review.googlesource.com/69520
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22979}
So that we can avoid dependency cycles.
Bug: none
Change-Id: I821d9f1319dff01403d6e4e310cbb2d4b2b125e8
Reviewed-on: https://webrtc-review.googlesource.com/60500
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22328}
None of the built-in codecs do anything with the ID, but callers will
soon require them to accept it.
Bug: webrtc:8941
Change-Id: I0eb77db82d72c7d34cff639fecb67c1e6ec421bf
Reviewed-on: https://webrtc-review.googlesource.com/58089
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22259}
This reverts commit c73e1f4378.
Reason for revert:
The problem with failed deps in chrome content/renderer had already been fixed in https://webrtc-review.googlesource.com/c/src/+/38660
Original change's description:
> Revert "GN rtc_* templates: Set default visibility to webrtc_root + "/*""
>
> This reverts commit 588c548657.
>
> Reason for revert:
>
> Breaks Chrome FYI:
>
> /b/c/b/Linux_Builder/src/buildtools/linux64/gn gen //out/Release --check
> -> returned 1
> ERROR at //build/split_static_library.gni:12:5: Dependency not allowed.
> static_library(target_name) {
> ^----------------------------
> The item //content/renderer:renderer
> can not depend on //third_party/webrtc/media:rtc_internal_video_codecs
> because it is not in //third_party/webrtc/media:rtc_internal_video_codecs's visibility list: [
> //third_party/webrtc/*
> //third_party/webrtc_overrides/*
> ]
>
> https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.webrtc.fyi%2FLinux_Builder%2F23560%2F%2B%2Frecipes%2Fsteps%2Fgenerate_build_files%2F0%2Fstdout
>
> Original change's description:
> > GN rtc_* templates: Set default visibility to webrtc_root + "/*"
> >
> > This means that by default, targets are visible to everything under
> > the WebRTC root, but not visible to anything else.
> >
> > API targets are manually tagged with visibility "*", so that targets
> > outside the WebRTC tree can see them.
> >
> > BUG=webrtc:8254
> >
> > Change-Id: Icdbee6e0d22d93240ff2fb530c8f9dc48e351509
> > Reviewed-on: https://webrtc-review.googlesource.com/24140
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#21548}
>
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org
>
> Change-Id: I06620ce3d6f67482935c22efa231dd6cab91625a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8254
> Reviewed-on: https://webrtc-review.googlesource.com/38760
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21555}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,perkj@webrtc.org
Change-Id: I6f720078ce21bd172e0a6471bae8c4c011e4a657
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8254
Reviewed-on: https://webrtc-review.googlesource.com/38860
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21558}
This reverts commit 588c548657.
Reason for revert:
Breaks Chrome FYI:
/b/c/b/Linux_Builder/src/buildtools/linux64/gn gen //out/Release --check
-> returned 1
ERROR at //build/split_static_library.gni:12:5: Dependency not allowed.
static_library(target_name) {
^----------------------------
The item //content/renderer:renderer
can not depend on //third_party/webrtc/media:rtc_internal_video_codecs
because it is not in //third_party/webrtc/media:rtc_internal_video_codecs's visibility list: [
//third_party/webrtc/*
//third_party/webrtc_overrides/*
]
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.webrtc.fyi%2FLinux_Builder%2F23560%2F%2B%2Frecipes%2Fsteps%2Fgenerate_build_files%2F0%2Fstdout
Original change's description:
> GN rtc_* templates: Set default visibility to webrtc_root + "/*"
>
> This means that by default, targets are visible to everything under
> the WebRTC root, but not visible to anything else.
>
> API targets are manually tagged with visibility "*", so that targets
> outside the WebRTC tree can see them.
>
> BUG=webrtc:8254
>
> Change-Id: Icdbee6e0d22d93240ff2fb530c8f9dc48e351509
> Reviewed-on: https://webrtc-review.googlesource.com/24140
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21548}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org
Change-Id: I06620ce3d6f67482935c22efa231dd6cab91625a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8254
Reviewed-on: https://webrtc-review.googlesource.com/38760
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21555}
This means that by default, targets are visible to everything under
the WebRTC root, but not visible to anything else.
API targets are manually tagged with visibility "*", so that targets
outside the WebRTC tree can see them.
BUG=webrtc:8254
Change-Id: Icdbee6e0d22d93240ff2fb530c8f9dc48e351509
Reviewed-on: https://webrtc-review.googlesource.com/24140
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21548}
For uniformity. Uniformity is nice.
Bug: none
Change-Id: I3156c4db1f6f261ba035cf95b632fd413c8afc2a
Reviewed-on: https://webrtc-review.googlesource.com/25482
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20937}
Specifically, I'm moving
safe_compare.h
safe_conversions.h
safe_minmax.h
They shouldn't be part of the API, and moving them to an appropriate
subdirectory of rtc_base/ is a good way to keep track of that.
BUG=webrtc:8445
Change-Id: I458531aeb30bcf4291c4bec3bf22a2fffbf054ff
Reviewed-on: https://webrtc-review.googlesource.com/20860
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20829}
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.
This CL was uploaded by git cl split.
R=kwiberg@webrtc.org
Bug: None
Change-Id: I30f47ec9b6dbef216ee061a96fad8ca14c041bb5
Reviewed-on: https://webrtc-review.googlesource.com/23566
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20711}
Now that we have moved WebRTC from src/webrtc to src/, common_types.h
and typedefs.h are triggering a cpplint error.
The cpplint complaint is:
Include the directory when naming .h files [build/include] [4]
This CL disables the error but we have to remove these two headers
from the root directory.
NOPRESUBMIT=true
Bug: webrtc:5876
Change-Id: I08e1b69aadcc4b28ab83bf25e3819d135d41d333
Reviewed-on: https://webrtc-review.googlesource.com/1577
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19859}
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
In order to eliminate the WebRTC Subtree mirror in Chromium,
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}