Commit graph

51 commits

Author SHA1 Message Date
Mirko Bonadei
405ac4e840 Add objc_class_prefix to the Audio Network Adaptor proto.
WANA: WebRTC Audio Network Adaptor

No-Try: True
Bug: None
Change-Id: I291e02ab70323ecc45d87cea0ea8d7e8cb62db9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249784
Reviewed-by: Minyue Li <minyue@google.com>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35998}
2022-02-14 21:04:20 +00:00
Artem Titov
6cae2d5513 Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
This reverts commit 3f87250a4f.

Reason for revert: Downstream is fixed

Original change's description:
> Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
>
> This reverts commit 5f0eb93d2a.
>
> Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after.
>
> Original change's description:
> > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
> >
> > Bug: webrtc:13555, webrtc:13082
> > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Artem Titov <titovartem@webrtc.org>
> > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
> > Cr-Commit-Position: refs/heads/main@{#35805}
>
> TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:13555, webrtc:13082
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Owners-Override: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35807}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:13555, webrtc:13082
Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35814}
2022-01-27 12:55:44 +00:00
Artem Titov
3f87250a4f Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
This reverts commit 5f0eb93d2a.

Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after.

Original change's description:
> Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
>
> Bug: webrtc:13555, webrtc:13082
> Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
> Cr-Commit-Position: refs/heads/main@{#35805}

TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:13555, webrtc:13082
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35807}
2022-01-26 14:56:14 +00:00
Byoungchan Lee
5f0eb93d2a Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
Bug: webrtc:13555, webrtc:13082
Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35805}
2022-01-26 14:22:16 +00:00
Byoungchan Lee
604fd2f1ab Remove RTC_DISALLOW_COPY_AND_ASSIGN from modules/
Bug: webrtc:13555, webrtc:13082
Change-Id: I2c2cbcbd918f0cfa970c1a964893220ba11d4b41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247960
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35771}
2022-01-24 11:50:20 +00:00
Artem Titov
d3251968d1 Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.

Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
2021-11-15 21:44:59 +00:00
Artem Titov
cfea2182f8 Use backticks not vertical bars to denote variables in comments
Bug: webrtc:12338
Change-Id: I89c8b3a328d04203177522cbdfd9e606fd4bce4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228246
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34696}
2021-08-10 10:40:03 +00:00
Artem Titov
d00ce747c7 Use backticks not vertical bars to denote variables in comments for /modules/audio_coding
Bug: webrtc:12338
Change-Id: I02613d9fca45d00e2477f334b7a0416e7912e26b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227037
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34621}
2021-08-02 10:45:40 +00:00
Jakob Ivarsson
1f99551775 Remove check for WebRTC-SendSideBwe-WithOverhead in bitrate controller.
This was default enabled in:
https://webrtc-review.googlesource.com/c/src/+/191221

Bug: webrtc:6762
Change-Id: Ic8054136ed854866c0fdc71f9d747b8abcd9200e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/192381
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32570}
2020-11-09 23:11:26 +00:00
Mirko Bonadei
8cc6695652 Reformat python files checked by pylint (part 1/2).
After recently changing .pylintrc (see [1]) we discovered that
the presubmit check always checks all the python files when just
one python file gets updated.

This CL moves all these files one step closer to what the linter
wants.

Autogenerated with:

# Added all the files under pylint control to ~/Desktop/to-reformat
cat ~/Desktop/to-reformat | xargs sed -i '1i\\'
git cl format --python --full

This is part 1 out of 2. The second part will fix function names and
will not be automated.

[1] - https://webrtc-review.googlesource.com/c/src/+/186664

No-Presubmit: True
Bug: webrtc:12114
Change-Id: Idfec4d759f209a2090440d0af2413a1ddc01b841
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190980
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32530}
2020-10-30 10:13:11 +00:00
Jakob Ivarsson
f46902c540 Add a simple frame length controller.
This will be used when adaptivePtime is enabled.

Bug: chromium:1086942
Change-Id: I63c947c53a8c5b8e0825b78b847c3f7900197d6c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177421
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31544}
2020-06-18 15:21:48 +00:00
Danil Chapovalov
704fb55255 In common_audio/ and modules/audio_* replace mock macros with unified MOCK_METHOD macro
Bug: webrtc:11564
Change-Id: Ib0ffce4de50a13b018926f6ea2865a2ec2fb2ec7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175621
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31333}
2020-05-20 13:17:31 +00:00
Tommi
909f3a5339 Rename several more tests that use EXPECT_DEATH to *DeathTest.
Bug: webrtc:11577
Change-Id: I0397ee933464496e4885bb0f8030f3d669e5e612
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175641
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31309}
2020-05-18 16:10:04 +00:00
Danil Chapovalov
5528402ef8 Use newer version of TimeDelta and TimeStamp factories in modules/
This change generated with following commands:
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g"
git cl format

Bug: None
Change-Id: I117d64a54950be040d996035c54bc0043310943a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168340
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30489}
2020-02-10 11:49:57 +00:00
Sebastian Jansson
cd2a92f8e0 Removes RPLR based FEC controller.
This is not used and adds a lot of maintenance overhead to
the code since it requires that the transport feedback adapter
communicates directly with audio send stream.

This also means that the packet loss tracker used as input for
this can be removed and a lot of wiring up code overall.

Bug: webrtc:9883
Change-Id: I25689fb622ed89cbb378c27212a159485f5f53be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156502
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29667}
2019-10-31 13:56:44 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Danil Chapovalov
16cb1f61c0 Stop using rtc_event.h forward header
Bug: webrtc:10206
Change-Id: I16905ec745673178195d6715fda6175c31500163
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151601
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29149}
2019-09-11 08:20:29 +00:00
Ying Wang
0e1a558fb3 Allowing 40ms audio frame length.
Currently 20ms, 60ms and 120ms frame length are supported. The motivation is to better adapt audio bit rate to network conditions with more frame length choices.

This is continuation of https://webrtc-review.googlesource.com/c/src/+/146206, since crodbro is out of office, I created this commit for continuing the code review.

Bug: webrtc:10820
Change-Id: I0e35e91b524f63686bfdf767b7a95c51aeb24716
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146780
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28882}
2019-08-16 20:24:18 +00:00
Minyue Li
9b29d69650 Make ANA frame length controller more robust to encoder frame lengths.
Bug: webrtc:10820
Change-Id: Ic3a30976d0181de9cdd35e44d4c5439cadad4812
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149163
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28873}
2019-08-16 10:55:39 +00:00
Danil Chapovalov
83bbe91398 Delete deprecated rtc_event_log header
Bug: webrtc:10206
Change-Id: I9ed3148843c647372993729b87c0e74741ab540b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147870
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28791}
2019-08-07 10:58:17 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Bjorn A Mellem
413ccc49ec Stop DCHECK which occurs in ANA BitrateController when overhead is zero.
https://webrtc-review.googlesource.com/c/src/+/119121 added two calls to set the observed overhead.  Both SetupSendCodec() and ReconfigureSendCodec() update the encoder's overhead.  However, these calls happen before RTP has issued any callbacks to set the overhead, so they tell the encoder that the overhead is zero.

This change checks whether the overhead has been set to a non-zero value before each of the new calls and adds a DCHECK to quickly catch future cases which attempt to set overhead to zero.

Bug: webrtc:10150
Change-Id: Ieb3345ecfcda1cf25538d5d424383df17a71b4a2
TBR: solenberg@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134260
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27793}
2019-04-27 00:20:37 +00:00
Mirko Bonadei
6a489f22c7 Fully qualify googletest symbols.
Semi-automatically created with:

git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format

After this, two .cc files failed to compile and I have fixed them
manually.

Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
2019-04-09 17:18:20 +00:00
Nico Weber
22f9925b3e webrtc: Remove semicolons.
Bug: chromium:926235
Change-Id: I66c10ab3df38adf87152d1f18cc8162afedca7e4
Reviewed-on: https://webrtc-review.googlesource.com/c/123560
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26780}
2019-02-20 16:02:59 +00:00
Mirko Bonadei
e45c688e67 Remove webrtc::ProtoString.
Bug: None
Change-Id: If99a977532eda41eada25f57ff0ff6fe17085986
Reviewed-on: https://webrtc-review.googlesource.com/c/122581
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26726}
2019-02-16 11:11:45 +00:00
Mirko Bonadei
739baf097b [clang-tidy] Apply performance-for-range-copy fixes.
This CL applies clang-tidy's performance-for-range-copy [1] on the
WebRTC codebase.

All changes in this CL are automatically generated by both clang-tidy
and 'git cl format'.

[1] - https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html

Bug: webrtc:10215
Change-Id: I7c83290b8866d76129bbec4e24e6701f5014102e
Reviewed-on: https://webrtc-review.googlesource.com/c/120043
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26420}
2019-01-28 09:53:50 +00:00
Niels Möller
5a6ae02e90 Reland "Trim down FileWrapper class to be merely a wrapper owning a FILE*"
This is a reland of 80b95de765

Original change's description:
> Trim down FileWrapper class to be merely a wrapper owning a FILE*
> 
> Bug: webrtc:6463
> Change-Id: If71e2f3a75dc1863bc805ab71de1e2d33294f805
> Reviewed-on: https://webrtc-review.googlesource.com/c/117881
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26311}

Bug: webrtc:6463
Change-Id: I12154ef65744c1b7811974a1d871e05ed3fbbc27
Reviewed-on: https://webrtc-review.googlesource.com/c/118660
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26337}
2019-01-21 12:46:25 +00:00
Bjorn Terelius
5c2f1f053f Add some missing includes and dependencies.
In particular, time_utils.h is currently pulled in via rtc_event.h
This CL is in preparation of moving parts of the RTC event log to api/.

Bug: webrtc:10206
Change-Id: Idd35aa9404afded4d29b1296344996c45b8c2e91
Reviewed-on: https://webrtc-review.googlesource.com/c/117921
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26326}
2019-01-18 15:30:26 +00:00
Niels Moller
466472796c Revert "Trim down FileWrapper class to be merely a wrapper owning a FILE*"
This reverts commit 80b95de765.

Reason for revert: Speculative revert for downstream breakage. Possibly FileAudioDevice broken?

Original change's description:
> Trim down FileWrapper class to be merely a wrapper owning a FILE*
> 
> Bug: webrtc:6463
> Change-Id: If71e2f3a75dc1863bc805ab71de1e2d33294f805
> Reviewed-on: https://webrtc-review.googlesource.com/c/117881
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26311}

TBR=aleloi@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,tommi@webrtc.org

Change-Id: I46d37afbf9acb5f62f04e09d944114c1da96eb36
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6463
Reviewed-on: https://webrtc-review.googlesource.com/c/118380
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26318}
2019-01-18 12:04:55 +00:00
Niels Möller
80b95de765 Trim down FileWrapper class to be merely a wrapper owning a FILE*
Bug: webrtc:6463
Change-Id: If71e2f3a75dc1863bc805ab71de1e2d33294f805
Reviewed-on: https://webrtc-review.googlesource.com/c/117881
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26311}
2019-01-18 07:25:30 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Minyue Li
8319e7f8ab Use ordered data structure for supported frame lengths in ANA.
The ANA frame length controller requires the provided frame lengths supported by the encoder to be ordered. A data structural guarantee of such was in an earlier version but was accidentally removed since https://codereview.webrtc.org/2429503002. This CL uses std::set to ensure that again.

Change-Id: Ia197dbf6a34f02506e81c9f49d6cd60e4cdacef4
BUG: webrtc:6303
Reviewed-on: https://webrtc-review.googlesource.com/c/115946
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26119}
2019-01-03 11:56:09 +00:00
Minyue Li
f40150d874 Removing ANA enabling field trials.
This is to let ANA config proto to fully control it.

Bug: b/119788974
Change-Id: Ib7842f784bdf879cb7d753c7077ce845f435a379
Reviewed-on: https://webrtc-review.googlesource.com/c/111741
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25764}
2018-11-22 22:26:28 +00:00
Elad Alon
0b1b5c1b2a Hide RtcEvent members behind accessors
Bug: webrtc:8111
Change-Id: I3d350a6e159330aed7362162006860ac86ed7c32
Reviewed-on: https://webrtc-review.googlesource.com/c/109881
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25590}
2018-11-10 23:34:07 +00:00
Yves Gerey
988cc0870b [Cleanup] Add missing #include. Remove useless ones.
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}
2018-10-23 11:32:56 +00:00
Artem Titov
5d7a4c6692 Fixing py lint errors
Bug: webrtc:9548
Change-Id: I0daf8dc06fdaac1637c32994ef6ad542ed52202a
Reviewed-on: https://webrtc-review.googlesource.com/90045
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24068}
2018-07-23 15:28:48 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Danil Chapovalov
b602123a5a Replace rtc::Optional with absl::optional in modules/audio_coding
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script with parameter 'modules/audio_coding'

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: Ic980ee605148fdb160666d4aa03cc87175e48fe8
Reviewed-on: https://webrtc-review.googlesource.com/84130
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23659}
2018-06-19 12:46:20 +00:00
Sebastian Jansson
5f83cf0c6d Replacing rtc::TimeDelta with webrtc::TimeDelta.
This removes the redundant type and replaces all usages. A slight change
in behavior is that we no longer get nanosecond resolution. This should
not matter since no current code requires nanosecond resolution.

Bug: webrtc:9155
Change-Id: I04334e08c686d95731621a6c8a7e40400d0ae3b2
Reviewed-on: https://webrtc-review.googlesource.com/71163
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23174}
2018-05-08 13:22:53 +00:00
Danil Chapovalov
4da18e89bd compare Optional<unsigned> only to unsigned integers
more standard optional<T> inlines compares instead of converting second argument to T.
that leads to warnings about comparing unsigned to signed integers.

Bug: webrtc:9078
Change-Id: I43cc729d3b85d789b0c394064dc7e11dc27a37aa
Reviewed-on: https://webrtc-review.googlesource.com/66782
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22779}
2018-04-07 10:07:47 +00:00
Karl Wiberg
6a4d411023 Move file_wrapper.h to rtc_base/system/
This moves it from an API directory (system_wrappers/include/) to a
non-API directory, which is exactly what we want for utilities like
this.

BUG=webrtc:8445

Change-Id: I440974da4d347b09ff042478720d7983056b62b9
Reviewed-on: https://webrtc-review.googlesource.com/21226
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22579}
2018-03-23 11:17:15 +00:00
Mirko Bonadei
5b86f0a24b Stop using ByteSize (deprecated) to get the size of a proto message.
The method ByteSize has been deprecated [1], this CL switches to
ByteSizeLong.

[1] - https://cs.chromium.org/chromium/src/third_party/protobuf/src/google/protobuf/message_lite.h?l=252&rcl=ac47edd22c481fcfe119769d6b7abf365abea8fa

Bug: None
Change-Id: I1ba622df52f47719a5beda6d230cb603a0163d43
Reviewed-on: https://webrtc-review.googlesource.com/27021
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20952}
2017-11-30 14:27:50 +00:00
Karl Wiberg
e40468ba3d Move some numeric utility code from rtc_base/ to rtc_base/numerics/
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}
2017-11-22 11:21:47 +00:00
Oskar Sundbom
12ab00b4d8 Optional: Use nullopt and implicit construction in /modules/audio_coding
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: I055411a3e521964c81100869a197dd92f5608f1b
Reviewed-on: https://webrtc-review.googlesource.com/23619
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20728}
2017-11-17 11:58:37 +00:00
Mirko Bonadei
737e073f8d Fixing warning C4267 on Win (more_configs).
This is a follow-up of https://webrtc-review.googlesource.com/c/src/+/12921.

Bug: chromium:759980
Change-Id: Ifd39adb6541c0c7e0337f587a8b34b84a07331ed
Reviewed-on: https://webrtc-review.googlesource.com/13122
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20341}
2017-10-19 07:39:22 +00:00
Elad Alon
4a87e1c211 Remove encoding code from RtcEventLogImpl and use RtcEventLogEncoder instead
RtcEventLogImpl no longer hard-codes the way encoding is done. It now relies on RtcEventEncoder for it. This gives two benefits:
1. We can decide between the current encoding and the new encoding (which is still WIP) without code duplication (no need for RtcEventLogImplNew).
2. Encoding is done only when the event needs to be written to a file. This both avoids unnecessary encoding of events which don't end up getting written to a file, as well as is useful for the new, delta-based encoding, which is stateful.

BUG=webrtc:8111

Change-Id: I9517132e5f96b8059002a66fde8d42d3a678c3bb
Reviewed-on: https://webrtc-review.googlesource.com/1365
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20118}
2017-10-03 15:26:56 +00:00
Elad Alon
1d87b0e40f Create RtcEventLogEncoderLegacy
We're moving to an RtcEventLog interface that accepts std::unique_ptr<EventLog> and stores the event for encoding when encoding becomes necessary, rather than before. This will be useful while we maintain the legacy (current) encoding alongside the new encoding on which we're working.

This CL introduces RtcEventLogEncoderLegacy, which takes provides the encoding currently done by RtcEventLogImpl. After this, we can modify RtcEventLogImpl to use a dynamically chosen encoding, allowing us to easily choose between the current encoding and the new one on which we're working.

BUG=webrtc:8111
TBR=stefan@webrtc.org

Change-Id: I3dde7e222a40a117549a094a59b04219467f490a
Reviewed-on: https://webrtc-review.googlesource.com/1364
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20116}
2017-10-03 13:51:59 +00:00
ivoc
7e9c614648 Added configurable offsets to the per-packet overhead in the ANA frame length and bitrate controllers.
This adds four parameters to the protobuf that is used to configure the ANA controllers. These extra parameters allow for setting an offset to the per-packet overhead that is used when changing the frame length size and when changing bitrate.

BUG=webrtc:8179

Review-Url: https://codereview.webrtc.org/3013613002
Cr-Commit-Position: refs/heads/master@{#20011}
2017-09-28 08:11:16 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
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}
2017-09-15 05:02:56 +00:00