Commit graph

91 commits

Author SHA1 Message Date
Danil Chapovalov
151003d341 Deprecate RtcEventLogFactory constructor taking unused parameter
Bug: webrtc:15656
Change-Id: I22ed4cca4c0ce7ebf9c533ed7434617bf0a0f4a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330120
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41338}
2023-12-07 21:46:56 +00:00
Danil Chapovalov
554f7db01c Add EnableMediaWithDefaults to replace SetMediaEngineDefaults
Update most of the webrtc tests to use EnableMediaWithDefaults instead of SetMediaEngineDefaults

Bug: webrtc:15574
Change-Id: I489a09e4ea3479dc26829ee0c1235e67bcbca7c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325485
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41059}
2023-11-01 11:47:59 +00:00
Ilya Nikolaevskiy
3af8bfb34a Disable flaky test
Bug: webrtc:15537
Change-Id: I286012535b869e43b9d21ec899dbb05387a90ab8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322520
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40872}
2023-10-05 11:39:04 +00:00
Yaowen Guo
6fc700ec3d Rland "Revert "Reland "Reland "Delete old Android ADM.""""
This reverts commit 7534ebd2bf.

Reason for revert: Downstream projects have been updated, try it again.

R=perkj@webrtc.org

Bug: webrtc:7452
Change-Id: Ice48a563a6da499b6050b6f6e21bb0a18cd34f57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271841
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40386}
2023-06-30 13:10:12 +00:00
Jared Siskin
6f86f6af00 Format /sdk
git ls-files | grep -e  "\(\.h\|\.cc\)$" | grep -e  "^sdk/" | xargs clang-format -i ; git cl format
after landing: add to .git-blame-ignore-revs

Bug: webrtc:15082
Change-Id: If05d3c7555c4f2bf25e387249932787a93aa39c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302060
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39913}
2023-04-21 04:30:57 +00:00
Jonas Oreland
c0c65387ae AndroidNetworkMonitor - loosen assumptions even more
This cl/ attempts to fix (rather) rare crashes in
OnNetworkConnected_n by loosening the assumptions
that a network handle will keep it's network name.

With this cl/ it is possible that a NetworkHandle
can call OnNetworkConnected_n with one interface name
and then directly afterwards call it with another (
w/o an OnNetworkDisconnected_n inbetween).

This is the only scenario in which I could see the previous
crash occurring.

i.e
OnNetworkConnected(handle, "some-if-name")
OnNetworkConnected(handle, "some-other-name")

- previously this caused crash,
- now this is treated as if there was an OnNetworkDisconnected(handle) in between.

---

Also 1: shamelessly copy TYPE_MOBILE_DUN & TYPE_MOBILE_HIPRI from chromium: 87987f0e76

Also 2: Modify testcase not to use real interface names, so I can ran them on personal test phone w/o the real networks interfering.

Bug: webrtc:13741
Change-Id: I5480d5ce7031c2b5c09b958064076d02b3db1248
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285980
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38808}
2022-12-05 10:01:01 +00:00
Byoungchan Lee
a639528a43 Fix AndroidNetworkMonitorTests crash due to DCHECK failure
AndroidNetworkMonitor::SetNetworkInfos assumes this method is called
only once, but unittests calls it twice.
One is called by the startMonitoring Java method, and the other is
called by each test.
Because of this, these tests will not succeed if dcheck_always_on is true.

To solve this problem, use OnNetworkConnected_n
instead of SetNetworkInfos in each test.

Bug: None
Change-Id: I027706ad5ccd597a91e3a66f15e181ee22d4aaa9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285861
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#38798}
2022-12-02 13:37:27 +00:00
Markus Handell
0cd0dd3b07 rtc::Event: Finalize migration to TimeDelta.
Bug: webrtc:14366
Change-Id: Icd8792a2f9efa5609dd13da2e175042fac101d36
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272101
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Auto-Submit: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37844}
2022-08-19 13:44:57 +00:00
Björn Terelius
7534ebd2bf Revert "Reland "Reland "Delete old Android ADM."""
This reverts commit db30009304.

Reason for revert: ... and it's out again :(
 
Original change's description:
> Reland "Reland "Delete old Android ADM.""
>
> This reverts commit 38a28603fd.
>
> Reason for revert: Attempt to reland, now that WebRTC dependency cycle has been broken.
>
> Original change's description:
> > Revert "Reland "Delete old Android ADM.""
> >
> > This reverts commit 6e4d7e606c.
> >
> > Reason for revert: Still breaks downstream build (though in a different way this time)
> >
> > Original change's description:
> > > Reland "Delete old Android ADM."
> > >
> > > This is a reland of commit 4ec3e9c988
> > >
> > > Original change's description:
> > > > Delete old Android ADM.
> > > >
> > > > The schedule move Android ADM code to sdk directory have been around
> > > > for several years, but the old code still not delete.
> > > >
> > > > Bug: webrtc:7452
> > > > Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> > > > Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> > > > Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> > > > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/main@{#37174}
> > >
> > > Bug: webrtc:7452
> > > Change-Id: Icabad23e72c8258a854b7809a93811161517266c
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265872
> > > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > > Cr-Commit-Position: refs/heads/main@{#37236}
> >
> > Bug: webrtc:7452
> > Change-Id: Ide8fbd55fadd7aed9989053afff7c63c04f1320f
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266023
> > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > Owners-Override: Björn Terelius <terelius@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37242}
>
> Bug: webrtc:7452
> Change-Id: I6946d0fc28cf4c08387e451e6a07765f7410ce7c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266980
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37356}

Bug: webrtc:7452
Change-Id: I1ef4004e89c8bea322bda0dc697a7ba45abeffcc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267067
Owners-Override: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37359}
2022-06-28 14:37:43 +00:00
Björn Terelius
db30009304 Reland "Reland "Delete old Android ADM.""
This reverts commit 38a28603fd.

Reason for revert: Attempt to reland, now that WebRTC dependency cycle has been broken.

Original change's description:
> Revert "Reland "Delete old Android ADM.""
>
> This reverts commit 6e4d7e606c.
>
> Reason for revert: Still breaks downstream build (though in a different way this time)
>
> Original change's description:
> > Reland "Delete old Android ADM."
> >
> > This is a reland of commit 4ec3e9c988
> >
> > Original change's description:
> > > Delete old Android ADM.
> > >
> > > The schedule move Android ADM code to sdk directory have been around
> > > for several years, but the old code still not delete.
> > >
> > > Bug: webrtc:7452
> > > Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> > > Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> > > Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> > > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > > Cr-Commit-Position: refs/heads/main@{#37174}
> >
> > Bug: webrtc:7452
> > Change-Id: Icabad23e72c8258a854b7809a93811161517266c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265872
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37236}
>
> Bug: webrtc:7452
> Change-Id: Ide8fbd55fadd7aed9989053afff7c63c04f1320f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266023
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Owners-Override: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37242}

Bug: webrtc:7452
Change-Id: I6946d0fc28cf4c08387e451e6a07765f7410ce7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266980
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37356}
2022-06-28 12:58:23 +00:00
Björn Terelius
38a28603fd Revert "Reland "Delete old Android ADM.""
This reverts commit 6e4d7e606c.

Reason for revert: Still breaks downstream build (though in a different way this time)

Original change's description:
> Reland "Delete old Android ADM."
>
> This is a reland of commit 4ec3e9c988
>
> Original change's description:
> > Delete old Android ADM.
> >
> > The schedule move Android ADM code to sdk directory have been around
> > for several years, but the old code still not delete.
> >
> > Bug: webrtc:7452
> > Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> > Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> > Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37174}
>
> Bug: webrtc:7452
> Change-Id: Icabad23e72c8258a854b7809a93811161517266c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265872
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37236}

Bug: webrtc:7452
Change-Id: Ide8fbd55fadd7aed9989053afff7c63c04f1320f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266023
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37242}
2022-06-16 16:07:49 +00:00
Yaowen Guo
6e4d7e606c Reland "Delete old Android ADM."
This is a reland of commit 4ec3e9c988

Original change's description:
> Delete old Android ADM.
>
> The schedule move Android ADM code to sdk directory have been around
> for several years, but the old code still not delete.
>
> Bug: webrtc:7452
> Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37174}

Bug: webrtc:7452
Change-Id: Icabad23e72c8258a854b7809a93811161517266c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265872
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37236}
2022-06-16 13:22:29 +00:00
Erik Språng
7dbfad613c Revert "Delete old Android ADM."
This reverts commit 4ec3e9c988.

Reason for revert: Causes downstream build error.

Original change's description:
> Delete old Android ADM.
>
> The schedule move Android ADM code to sdk directory have been around
> for several years, but the old code still not delete.
>
> Bug: webrtc:7452
> Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37174}

Bug: webrtc:7452
Change-Id: If094e0a3ef5a3d340cbd5dfa0a8a88c3e97ba0bf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265393
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37180}
2022-06-10 15:10:04 +00:00
Yaowen Guo
4ec3e9c988 Delete old Android ADM.
The schedule move Android ADM code to sdk directory have been around
for several years, but the old code still not delete.

Bug: webrtc:7452
Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37174}
2022-06-10 08:55:04 +00:00
Jonas Oreland
61dbcd115a Rewrite "Reset all maps in AndroidNetworkMonitor Start()/Stop()"
This reverts commit 8cd7b0a7ba.

The assumption in AndroidNetworkMonitor that an interface name
is unique has turned out to be incorrect :( for some (weird) devices,
i.e ccmni0.
It is unclear if it is a permanent setup or a transient state.

This cl/ changes the impl. to cope with that, the last
OnNetworkConnected_n "owns" the interface name, and when
OnNetworkDisconnected_n runs, we check if we're "owner"
and maybe set a new "owner" (if we're not "owner" we do nothing).

New testcases added.

I also
1) change NetworkMonitorInterface to return a struct
with all the information that is requested with interface name
as key.
2) Change Network.cc adding (debug) assertions that network
properties can't change inside a loop (in one thread).

Original change's description:
> Revert "Reset all maps in AndroidNetworkMonitor Start()/Stop()"
>
> This reverts commit 02293096f9.
>
> Reason for revert: mysterious crashes in android_network_monitor.cc
>
> Original change's description:
> > Reset all maps in AndroidNetworkMonitor Start()/Stop()
> >
> > This cl/ fixes another race condition with the recent additions
> > to NetworkMonitorAutoDetect (getAllNetworksFromCache).
> >
> > The getAllNetworksFromCache-feature uses the by the Android team
> > preferred way of enumerating networks, i.e to register network listeners.
> >
> > Th recent fix to add IsAdapterAvailable, https://webrtc-review.googlesource.com/c/src/+/257400
> > contained a bug in that the adapter_type_by_name_ map was not
> > reset either on disconnect or Start/Stop.
> >
> > This cl/ addresses that including unit test.
> > It also de-obfuscates NetworkMonitor so that it always
> > calls NotifyOfActiveNetworkList on startMonitoring even
> > if list.size() == 0. This should not matter but makes
> > code easier to understand.
> >
> > Bug: webrtc:13741
> > Change-Id: I438b877eebf769a8b2e7292b697ef1c0a349b24f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258721
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36530}
>
> Bug: webrtc:13741
> Change-Id: I36fbf63f658d3e8048e13959cbebfbd14df12b14
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264146
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37016}

Bug: webrtc:13741
Change-Id: Ib4eb072b775e493b564528f0be94c685b70ec20f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264421
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37056}
2022-05-31 10:49:55 +00:00
Jonas Oreland
8cd7b0a7ba Revert "Reset all maps in AndroidNetworkMonitor Start()/Stop()"
This reverts commit 02293096f9.

Reason for revert: mysterious crashes in android_network_monitor.cc

Original change's description:
> Reset all maps in AndroidNetworkMonitor Start()/Stop()
>
> This cl/ fixes another race condition with the recent additions
> to NetworkMonitorAutoDetect (getAllNetworksFromCache).
>
> The getAllNetworksFromCache-feature uses the by the Android team
> preferred way of enumerating networks, i.e to register network listeners.
>
> Th recent fix to add IsAdapterAvailable, https://webrtc-review.googlesource.com/c/src/+/257400
> contained a bug in that the adapter_type_by_name_ map was not
> reset either on disconnect or Start/Stop.
>
> This cl/ addresses that including unit test.
> It also de-obfuscates NetworkMonitor so that it always
> calls NotifyOfActiveNetworkList on startMonitoring even
> if list.size() == 0. This should not matter but makes
> code easier to understand.
>
> Bug: webrtc:13741
> Change-Id: I438b877eebf769a8b2e7292b697ef1c0a349b24f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258721
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36530}

Bug: webrtc:13741
Change-Id: I36fbf63f658d3e8048e13959cbebfbd14df12b14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264146
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37016}
2022-05-27 12:17:54 +00:00
Niels Möller
83830f316e Delete TestListener and top-level thread wrapping.
Instead use rtc::AutoThread in tests that need that.

Bug: webrtc:9714
Change-Id: I1f33b1b2d321770d062504dd9ef86d66a345dd42
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254681
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36950}
2022-05-20 15:21:21 +00:00
Niels Möller
ea1e6f44f8 Delete rtc_base/format_macros.h
It defined RTC_PRIuS, which was needed for compatibility with MSVC
prior to version 2015.

Bug: webrtc:6424
Change-Id: I5668d473376201cad3e8da65927c967fc397804b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261314
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36814}
2022-05-09 12:03:21 +00:00
Niels Möller
03486fc197 Update sdk/ to not use implicit conversion from scoped_refptr<T> to T*.
Bug: webrtc:13464
Change-Id: I6944106ddc99c043825fad077bfcedc051c67d8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259772
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36682}
2022-04-28 08:10:15 +00:00
Jonas Oreland
02293096f9 Reset all maps in AndroidNetworkMonitor Start()/Stop()
This cl/ fixes another race condition with the recent additions
to NetworkMonitorAutoDetect (getAllNetworksFromCache).

The getAllNetworksFromCache-feature uses the by the Android team
preferred way of enumerating networks, i.e to register network listeners.

Th recent fix to add IsAdapterAvailable, https://webrtc-review.googlesource.com/c/src/+/257400
contained a bug in that the adapter_type_by_name_ map was not
reset either on disconnect or Start/Stop.

This cl/ addresses that including unit test.
It also de-obfuscates NetworkMonitor so that it always
calls NotifyOfActiveNetworkList on startMonitoring even
if list.size() == 0. This should not matter but makes
code easier to understand.

Bug: webrtc:13741
Change-Id: I438b877eebf769a8b2e7292b697ef1c0a349b24f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258721
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36530}
2022-04-12 09:28:57 +00:00
Jonas Oreland
4bc12200b6 Reland WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 14/inf
Modify cl/ a bit and add fieldtrialsstring on observer
not to break downstream projects.

---

WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 14/inf

This cl/ passes field trials all the way from c++
to the android NetworkMonitorAutoDetect.java

Bug: webrtc:10335
Change-Id: Ic6842612eed36b684340f0f78f4087bee249cc50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257081
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36498}

---

Bug: webrtc:10335
Change-Id: Ied43770977465a0042541a61d29a9015c0b9cdc8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258622
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36520}
2022-04-11 12:01:38 +00:00
Artem Titov
54714779b2 Revert "WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 14/inf"
This reverts commit f177081eee.

Reason for revert: breaks downstream project

Original change's description:
> WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 14/inf
>
> This cl/ passes field trials all the way from c++
> to the android NetworkMonitorAutoDetect.java
>
> Bug: webrtc:10335
> Change-Id: Ic6842612eed36b684340f0f78f4087bee249cc50
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257081
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36498}

Bug: webrtc:10335
Change-Id: I8d881ea3f50cf4affde65800d759885b2581c6be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258482
Reviewed-by: Jonas Oreland <jonaso@google.com>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36500}
2022-04-08 15:10:14 +00:00
Jonas Oreland
f177081eee WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 14/inf
This cl/ passes field trials all the way from c++
to the android NetworkMonitorAutoDetect.java

Bug: webrtc:10335
Change-Id: Ic6842612eed36b684340f0f78f4087bee249cc50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257081
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36498}
2022-04-08 14:08:25 +00:00
Ali Tofigh
6364d0899e Adopt absl::string_view in rtc_base/log_sinks
This is part of a large scale effort to increase adoption of
absl::string_view across the WebRTC code base.

This CL adds absl::string_view versions of the OnLogMessage functions in
rtc::LogSink. The const std::string& versions are kept for now since
downstream clients use subclasses of LogSink and need to be migrated
before these are removed.

Bug: webrtc:13579
Change-Id: I57bb72ad503805ff0ca16f1d7aece2d44c65cb73
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253980
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Owners-Override: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36189}
2022-03-14 12:47:55 +00:00
Olov Brändström
b732bd5fb5 Add timestamps to AudioDeviceBuffer::SetRecordedBuffer
Add timestamps to the function AudioDeviceBuffer::SetRecordedBuffer. This will
be used to store audio timestaps in future changes.

This is a part of the A/V sync metric metric feature for mobile. The metric
have already launched for web clients.

Bug: webrtc:13609
Change-Id: I0031843476ff1b573b262308fca52d587fae30b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249085
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Minyue Li <minyue@google.com>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#35851}
2022-01-31 12:32:58 +00:00
Daniel.L (Byoungchan Lee)
c561d0abbb Re-enable Stacktrace Unittest on Android
After changing the way libunwind is built in https://crrev.com/c/3297439,
this test should work fine.

Bug: webrtc:13383
Change-Id: I5da7bf27ce3041c934d4ab91367a26c076fac0c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/241700
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35558}
2021-12-20 13:21:11 +00:00
Mirko Bonadei
f5ea3b96cd Roll chromium_revision 867b87eb29..b56d8868f3 (933713:941610)
Change log: 867b87eb29..b56d8868f3
Full diff: 867b87eb29..b56d8868f3

Changed dependencies
* src/base: 14c89123e6..b367343820
* src/build: a0368daa25..d134d68f00
* src/buildtools: aa2fb0187c..b138e6ce86
* src/buildtools/linux64: git_revision:693f9fb87e4febdd4299db9f73d8d2c958e63148..git_revision:90294ccdcf9334ed25a76ac9b67689468e506342
* src/buildtools/mac: git_revision:693f9fb87e4febdd4299db9f73d8d2c958e63148..git_revision:90294ccdcf9334ed25a76ac9b67689468e506342
* src/buildtools/third_party/libc++abi/trunk: 4c834abe6f..707d75f53e
* src/buildtools/third_party/libunwind/trunk: 10f4e4a5b5..51ffc5ed5c
* src/buildtools/win: git_revision:693f9fb87e4febdd4299db9f73d8d2c958e63148..git_revision:90294ccdcf9334ed25a76ac9b67689468e506342
* src/ios: eb1001b206..af72ede971
* src/testing: 650a2f9467..619bca0ef9
* src/third_party: bc52b47596..5f94f37f8c
* src/third_party/android_build_tools/aapt2: oJ_fhfmT6sLorimH6Eo6hwWS2R2gU0c4ZUQfXvzae1UC..GlCdqxHxlg-8YkDGgj5cie-6COsEAZga9jyq-LAYxY4C
* src/third_party/android_build_tools/bundletool: OZ4is33usuZy-deP3FpWCtbKXaIY0qBLsElWte7556YC..2ZcLVDxyRwp8FzpeYLtLT0TfSRweZxvwh1-Kx1jZ_FoC
* src/third_party/android_deps/libs/com_google_android_material_material: version:2@1.5.0-alpha02.cr0..version:2@1.5.0-alpha05.cr0
* src/third_party/android_deps/libs/com_google_errorprone_error_prone_annotation: version:2@2.9.0.cr0..version:2@2.10.0.cr0
* src/third_party/android_deps/libs/com_google_errorprone_error_prone_annotations: version:2@2.9.0.cr0..version:2@2.10.0.cr0
* src/third_party/android_deps/libs/com_google_errorprone_error_prone_check_api: version:2@2.9.0.cr0..version:2@2.10.0.cr0
* src/third_party/android_deps/libs/com_google_errorprone_error_prone_core: version:2@2.9.0.cr0..version:2@2.10.0.cr0
* src/third_party/android_deps/libs/com_google_errorprone_error_prone_type_annotations: version:2@2.9.0.cr0..version:2@2.10.0.cr0
* src/third_party/androidx: Dewv4glpYqPtnvaOzHgVF6074yDsYzzDFiv0dO1ijwgC..nCX115noKlFOaRMhmFKd1v01hnVpUAaKg2SyLFZaYZgC
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/45c8be91f3..69030a0cea
* src/third_party/breakpad/breakpad: ff5892c5da..ee2ad61263
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/2d036344bd..a7ad5b5c96
* src/third_party/depot_tools: 5cffc195c9..9fcfde2499
* src/third_party/freetype/src: fde91ab8f1..d31bafcb9c
* src/third_party/googletest/src: 16f637fbf4..1b18723e87
* src/third_party/icu: eedbaf76e4..3e05d9daa9
* src/third_party/libvpx/source/libvpx: 7aabd69682..e259e6951d
* src/third_party/perfetto: 844b8662e9..5ed467a290
* src/third_party/r8: EU82Aqeu2B1PZzAmebHXfyOgeL2UZifcIJ1LPyoThw0C..nqWomZTwNDoogX26WeCSoFGg6aQN1FrwzoU4hCS0duEC
* src/third_party/turbine: 6QYCyqU5yXkAT7T-_K3sCPvfISI8ACXF_cW4OM5v9BgC..KbLQUR_KFiUEzVt1lMTORY96bz_PbMwC3GwIb1oGJmAC
* src/tools: f4333a2a39..a182115705
* src/tools/luci-go: git_revision:d1c03082ecda0148d8096f1fd8bf5491eafc7323..git_revision:0e76392e6557cc3ff8d95c3bc012540e0dbc128a
* src/tools/luci-go: git_revision:d1c03082ecda0148d8096f1fd8bf5491eafc7323..git_revision:0e76392e6557cc3ff8d95c3bc012540e0dbc128a
Added dependency
* src/third_party/android_deps/libs/com_google_flatbuffers_flatbuffers_java
DEPS diff: 867b87eb29..b56d8868f3/DEPS

Clang version changed llvmorg-14-init-6722-g0fbd3aad:llvmorg-14-init-8564-g34b903d8
Details: 867b87eb29..b56d8868f3/tools/clang/scripts/update.py

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,marpan@webrtc.org, jianj@chromium.org,
BUG=None

No-Presubmit: True
Change-Id: I721d681c6c0a687c782fa1f34ea6cea3fba6ce02
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237761
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35347}
2021-11-15 17:34:08 +00:00
Harald Alvestrand
97597c0f51 Remove usage of INFO alias for LS_INFO in log messages
Bug: webrtc:13362
Change-Id: Ifda893861a036a85c045cd366f9eab33c62ebde0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237221
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35310}
2021-11-04 13:46:17 +00:00
Jiwon Jung
5a79d28eba Require 16x16 alignment when using HardwareVideoEncoder for encoding.
It seems the Android CTS tests only verify that 16x16 aligned resolutions
are supported.

This change checks the validity of input frame's size when initialing
or encoding processes are about to start using H/W MediaCodec.

This change has additional APIs to retrieve
|requested_resolution_alignment| and |apply_alignment_to_all_simulcast_layers|
from JAVA VideoEncoder class and its inherited classes. HardwareVideoEncoder
using MediaCodec has values of 16 and true for above variables.

Bug: webrtc:13089
Change-Id: I0c4ebf94eb36da29c2e384a3edf85b82e779b7f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229460
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35169}
2021-10-08 13:15:12 +00:00
Niels Möller
e7c77ecd32 Add rtc:SocketFactory as member of jni OwnedFactoryAndThreads
Bug: webrtc:13145
Change-Id: Iff1b59d291b1a36d474cf3fb6fafa4e9ff007aa0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232060
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35051}
2021-09-21 11:15:30 +00:00
Artem Titov
d7ac581045 Use backticks not vertical bars to denote variables in comments for /sdk
Bug: webrtc:12338
Change-Id: Ifaad29ccb63b0f2f3aeefb77dae061ebc7f87e6c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227024
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34561}
2021-07-27 14:39:06 +00:00
Markus Handell
ad5037b4a8 Reland "Refactor the PlatformThread API."
This reverts commit 793bac569f.

Reason for revert: rare compilation error fixed

Original change's description:
> Revert "Refactor the PlatformThread API."
>
> This reverts commit c89fdd716c.
>
> Reason for revert: Causes rare compilation error on win-libfuzzer-asan trybot.
> See https://ci.chromium.org/p/chromium/builders/try/win-libfuzzer-asan-rel/713745?
>
> Original change's description:
> > Refactor the PlatformThread API.
> >
> > PlatformThread's API is using old style function pointers, causes
> > casting, is unintuitive and forces artificial call sequences, and
> > is additionally possible to misuse in release mode.
> >
> > Fix this by an API face lift:
> > 1. The class is turned into a handle, which can be empty.
> > 2. The only way of getting a non-empty PlatformThread is by calling
> > SpawnJoinable or SpawnDetached, clearly conveying the semantics to the
> > code reader.
> > 3. Handles can be Finalized, which works differently for joinable and
> > detached threads:
> >   a) Handles for detached threads are simply closed where applicable.
> >   b) Joinable threads are joined before handles are closed.
> > 4. The destructor finalizes handles. No explicit call is needed.
> >
> > Fixed: webrtc:12727
> > Change-Id: Id00a0464edf4fc9e552b6a1fbb5d2e1280e88811
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215075
> > Commit-Queue: Markus Handell <handellm@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Tommi <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33923}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> TBR=handellm@webrtc.org
>
> Bug: webrtc:12727
> Change-Id: Ic0146be8866f6dd3ad9c364fb8646650b8e07419
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217583
> Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33936}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:12727
Change-Id: Ifd6f44eac72fed84474277a1be03eb84d2f4376e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217881
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33950}
2021-05-07 14:14:43 +00:00
Jonas Oreland
b5274ef8b9 Enable WebRTC-BindUsingInterfaceName by default
But keep option to disable it.
The fix has been tested using A/B experiment with Duo
with positive results.

Bug: webrtc:10707
Change-Id: Iaac72430bc52026ab5db9dd042c5fdc3832fdce5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217380
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33941}
2021-05-07 06:33:44 +00:00
Guido Urdaneta
793bac569f Revert "Refactor the PlatformThread API."
This reverts commit c89fdd716c.

Reason for revert: Causes rare compilation error on win-libfuzzer-asan trybot.
See https://ci.chromium.org/p/chromium/builders/try/win-libfuzzer-asan-rel/713745?

Original change's description:
> Refactor the PlatformThread API.
>
> PlatformThread's API is using old style function pointers, causes
> casting, is unintuitive and forces artificial call sequences, and
> is additionally possible to misuse in release mode.
>
> Fix this by an API face lift:
> 1. The class is turned into a handle, which can be empty.
> 2. The only way of getting a non-empty PlatformThread is by calling
> SpawnJoinable or SpawnDetached, clearly conveying the semantics to the
> code reader.
> 3. Handles can be Finalized, which works differently for joinable and
> detached threads:
>   a) Handles for detached threads are simply closed where applicable.
>   b) Joinable threads are joined before handles are closed.
> 4. The destructor finalizes handles. No explicit call is needed.
>
> Fixed: webrtc:12727
> Change-Id: Id00a0464edf4fc9e552b6a1fbb5d2e1280e88811
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215075
> Commit-Queue: Markus Handell <handellm@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33923}

# Not skipping CQ checks because original CL landed > 1 day ago.

TBR=handellm@webrtc.org

Bug: webrtc:12727
Change-Id: Ic0146be8866f6dd3ad9c364fb8646650b8e07419
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217583
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33936}
2021-05-06 14:22:57 +00:00
Markus Handell
c89fdd716c Refactor the PlatformThread API.
PlatformThread's API is using old style function pointers, causes
casting, is unintuitive and forces artificial call sequences, and
is additionally possible to misuse in release mode.

Fix this by an API face lift:
1. The class is turned into a handle, which can be empty.
2. The only way of getting a non-empty PlatformThread is by calling
SpawnJoinable or SpawnDetached, clearly conveying the semantics to the
code reader.
3. Handles can be Finalized, which works differently for joinable and
detached threads:
  a) Handles for detached threads are simply closed where applicable.
  b) Joinable threads are joined before handles are closed.
4. The destructor finalizes handles. No explicit call is needed.

Fixed: webrtc:12727
Change-Id: Id00a0464edf4fc9e552b6a1fbb5d2e1280e88811
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215075
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33923}
2021-05-05 09:59:07 +00:00
Jonas Oreland
6ca955a1dd Reland "Fix problem with ipv4 over ipv6 on Android"
This reverts commit 1e60490ddb.

Reason for revert: Downstream project has been fixed (127.0.0.1 is not PII)

Original change's description:
> Revert "Fix problem with ipv4 over ipv6 on Android"
>
> This reverts commit da2fd2a2b2,
> as well as follow-up b7227a5a10,
> "Fix handling of partial match for GetVpnUnderlyingAdapterType".
>
> Reason for revert: Breaks downstream test.
>
> First change's description:
> > Fix problem with ipv4 over ipv6 on Android
> >
> > This patch fixes a problem with using ipv4 over ipv6
> > addresses on Android. These addresses are discovered
> > using 'getifaddr' with interfaces called 'v4-wlan0' or
> > 'v4-rmnet' but the Android API does not report them.
> >
> > This leads to failure when BasicPortAllocator tries
> > to bind a socket to the ip-address, making the ipv4
> > address unusable.
> >
> > This solution does the following
> > 1) Insert BasicNetworkManager as NetworkBinderInterface
> > rather than AndroidNetworkManager.
> >
> > 2) When SocketServer calls BindSocketToNetwork,
> > BasicNetworkManager first lookup the interface name,
> > and then calls AndroidNetworkManager.
> >
> > 3) AndroidNetworkManager will then first try to bind
> > using the known ip-addresses, and if it can't find the network
> > it will instead match the interface names.
> >
> > The patch has been tested on real android devices, and works fine.
> > And everything is disabled by default, and is enabled by field trial.
> >
> > My plan is to rollout the feature, checking that it does not introduce
> > any problems, and if so, enabled for all.
> >
> > Bug: webrtc:10707
> > Change-Id: I7081ba43d4ce17077acfa5fbab44eda127ac3971
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211003
> > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33422}
>
> Second change's description:
> > Fix handling of partial match for GetVpnUnderlyingAdapterType
> >
> > This is a followup to https://webrtc-review.googlesource.com/c/src/+/211003
> > and fixes the problem pointed out by deadbeef@, thanks!
> >
> > Bug: webrtc:10707
> > Change-Id: I8dea842b25ba15416353ce4002356183087873c7
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211344
> > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33436}
>
> TBR=hta@webrtc.org,jonaso@webrtc.org
> NOTRY=True
>
> Bug: webrtc:10707
> Change-Id: Ib13127fbf087c7f34ca0ccc6ce1805706f01d19d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211740
> Reviewed-by: Taylor <deadbeef@webrtc.org>
> Commit-Queue: Taylor <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33453}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10707
Change-Id: I0a11025c366c3127e2f57cd2cd2c33cc3877d1e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211862
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33460}
2021-03-15 10:50:31 +00:00
Taylor Brandstetter
1e60490ddb Revert "Fix problem with ipv4 over ipv6 on Android"
This reverts commit da2fd2a2b2,
as well as follow-up b7227a5a10,
"Fix handling of partial match for GetVpnUnderlyingAdapterType".

Reason for revert: Breaks downstream test.

First change's description:
> Fix problem with ipv4 over ipv6 on Android
>
> This patch fixes a problem with using ipv4 over ipv6
> addresses on Android. These addresses are discovered
> using 'getifaddr' with interfaces called 'v4-wlan0' or
> 'v4-rmnet' but the Android API does not report them.
>
> This leads to failure when BasicPortAllocator tries
> to bind a socket to the ip-address, making the ipv4
> address unusable.
>
> This solution does the following
> 1) Insert BasicNetworkManager as NetworkBinderInterface
> rather than AndroidNetworkManager.
>
> 2) When SocketServer calls BindSocketToNetwork,
> BasicNetworkManager first lookup the interface name,
> and then calls AndroidNetworkManager.
>
> 3) AndroidNetworkManager will then first try to bind
> using the known ip-addresses, and if it can't find the network
> it will instead match the interface names.
>
> The patch has been tested on real android devices, and works fine.
> And everything is disabled by default, and is enabled by field trial.
>
> My plan is to rollout the feature, checking that it does not introduce
> any problems, and if so, enabled for all.
>
> Bug: webrtc:10707
> Change-Id: I7081ba43d4ce17077acfa5fbab44eda127ac3971
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211003
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33422}

Second change's description:
> Fix handling of partial match for GetVpnUnderlyingAdapterType
>
> This is a followup to https://webrtc-review.googlesource.com/c/src/+/211003
> and fixes the problem pointed out by deadbeef@, thanks!
>
> Bug: webrtc:10707
> Change-Id: I8dea842b25ba15416353ce4002356183087873c7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211344
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33436}

TBR=hta@webrtc.org,jonaso@webrtc.org
NOTRY=True

Bug: webrtc:10707
Change-Id: Ib13127fbf087c7f34ca0ccc6ce1805706f01d19d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211740
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33453}
2021-03-13 00:20:14 +00:00
Niels Möller
662b306bae Replace blocking invokes with PostTask in AndroidNetworkMonitor
Use PendingTaskSafetyFlag for safe Stop. Followup to
https://webrtc-review.googlesource.com/c/src/+/209181.

Also fix rtc::scoped_refptr to work with RTC_PT_GUARDED_BY.

Bug: webrtc:12339
Change-Id: Ic0e3ecb17049f1a0e6af887ba5f97a5b48a32d98
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211351
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33447}
2021-03-12 14:52:25 +00:00
Jonas Oreland
b7227a5a10 Fix handling of partial match for GetVpnUnderlyingAdapterType
This is a followup to https://webrtc-review.googlesource.com/c/src/+/211003
and fixes the problem pointed out by deadbeef@, thanks!

Bug: webrtc:10707
Change-Id: I8dea842b25ba15416353ce4002356183087873c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211344
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33436}
2021-03-11 12:41:31 +00:00
Jonas Oreland
da2fd2a2b2 Fix problem with ipv4 over ipv6 on Android
This patch fixes a problem with using ipv4 over ipv6
addresses on Android. These addresses are discovered
using 'getifaddr' with interfaces called 'v4-wlan0' or
'v4-rmnet' but the Android API does not report them.

This leads to failure when BasicPortAllocator tries
to bind a socket to the ip-address, making the ipv4
address unusable.

This solution does the following
1) Insert BasicNetworkManager as NetworkBinderInterface
rather than AndroidNetworkManager.

2) When SocketServer calls BindSocketToNetwork,
BasicNetworkManager first lookup the interface name,
and then calls AndroidNetworkManager.

3) AndroidNetworkManager will then first try to bind
using the known ip-addresses, and if it can't find the network
it will instead match the interface names.

The patch has been tested on real android devices, and works fine.
And everything is disabled by default, and is enabled by field trial.

My plan is to rollout the feature, checking that it does not introduce
any problems, and if so, enabled for all.

Bug: webrtc:10707
Change-Id: I7081ba43d4ce17077acfa5fbab44eda127ac3971
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211003
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33422}
2021-03-10 16:08:18 +00:00
Taylor Brandstetter
239ac8a4e2 Reland "Pass NetworkMonitorFactory through PeerConnectionFactory."
This is a reland of 003c9be817

Found some downstream code that relies on
NetworkMonitorFactory::SetFactory, so I'm adding those methods back
temporarily. BasicNetworkManager will fall back to the static factory
if the one passed into PeerConnectionFactory is null.

Original change's description:
> Pass NetworkMonitorFactory through PeerConnectionFactory.
>
> Previously the instance was set through a static method, which was
> really only done because it was difficult to add new
> PeerConnectionFactory construction arguments at the time.
>
> Now that we have PeerConnectionFactoryDependencies it's easy to clean
> this up.
>
> I'm doing this because I plan to add a NetworkMonitor implementation
> for iOS, and don't want to inherit this ugliness.
>
> Bug: webrtc:9883
> Change-Id: Id94dc061ab1c7186b81af8547393a6e336ff04c2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180241
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Commit-Queue: Taylor <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31815}

TBR=hta@webrtc.org, sakal@webrtc.org

Bug: webrtc:9883
Change-Id: I2e817c423f21936f87532a9694eb9a0a1b70c212
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180722
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31824}
2020-08-01 00:36:27 +00:00
Taylor
cfba4ffe31 Revert "Reland "Pass NetworkMonitorFactory through PeerConnectionFactory.""
This reverts commit 7ded733518.

Reason for revert: Found more code calling NetworkMonitorFactory::SetFactory...

Original change's description:
> Reland "Pass NetworkMonitorFactory through PeerConnectionFactory."
> 
> This is a reland of 003c9be817
> 
> Original change's description:
> > Pass NetworkMonitorFactory through PeerConnectionFactory.
> >
> > Previously the instance was set through a static method, which was
> > really only done because it was difficult to add new
> > PeerConnectionFactory construction arguments at the time.
> >
> > Now that we have PeerConnectionFactoryDependencies it's easy to clean
> > this up.
> >
> > I'm doing this because I plan to add a NetworkMonitor implementation
> > for iOS, and don't want to inherit this ugliness.
> >
> > Bug: webrtc:9883
> > Change-Id: Id94dc061ab1c7186b81af8547393a6e336ff04c2
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180241
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> > Commit-Queue: Taylor <deadbeef@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31815}
> 
> TBR=hta@webrtc.org, sakal@webrtc.org
> 
> Bug: webrtc:9883
> Change-Id: Ibf69a22e8f94226908636c7d50ff9eda65bd4129
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180720
> Reviewed-by: Taylor <deadbeef@webrtc.org>
> Commit-Queue: Taylor <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31822}

TBR=deadbeef@webrtc.org,sakal@webrtc.org,hta@webrtc.org

Change-Id: Iae51b94072cec9abc021eed4e51d1fbeee998adc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9883
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180721
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31823}
2020-07-31 22:44:39 +00:00
Taylor Brandstetter
7ded733518 Reland "Pass NetworkMonitorFactory through PeerConnectionFactory."
This is a reland of 003c9be817

Original change's description:
> Pass NetworkMonitorFactory through PeerConnectionFactory.
>
> Previously the instance was set through a static method, which was
> really only done because it was difficult to add new
> PeerConnectionFactory construction arguments at the time.
>
> Now that we have PeerConnectionFactoryDependencies it's easy to clean
> this up.
>
> I'm doing this because I plan to add a NetworkMonitor implementation
> for iOS, and don't want to inherit this ugliness.
>
> Bug: webrtc:9883
> Change-Id: Id94dc061ab1c7186b81af8547393a6e336ff04c2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180241
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Commit-Queue: Taylor <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31815}

TBR=hta@webrtc.org, sakal@webrtc.org

Bug: webrtc:9883
Change-Id: Ibf69a22e8f94226908636c7d50ff9eda65bd4129
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180720
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31822}
2020-07-31 22:05:02 +00:00
Taylor
7d627545cb Revert "Pass NetworkMonitorFactory through PeerConnectionFactory."
This reverts commit 003c9be817.

Reason for revert: Breaks downstream build which is still using
SetFactory/ReleaseFactory. Probably will need to update this in lockstep.

Original change's description:
> Pass NetworkMonitorFactory through PeerConnectionFactory.
> 
> Previously the instance was set through a static method, which was
> really only done because it was difficult to add new
> PeerConnectionFactory construction arguments at the time.
> 
> Now that we have PeerConnectionFactoryDependencies it's easy to clean
> this up.
> 
> I'm doing this because I plan to add a NetworkMonitor implementation
> for iOS, and don't want to inherit this ugliness.
> 
> Bug: webrtc:9883
> Change-Id: Id94dc061ab1c7186b81af8547393a6e336ff04c2
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180241
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Commit-Queue: Taylor <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31815}

TBR=deadbeef@webrtc.org,sakal@webrtc.org,hta@webrtc.org

Change-Id: I1f09df7be9c860017d515e5a87488340afa6eda6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9883
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180640
Reviewed-by: Taylor <deadbeef@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31818}
2020-07-31 07:34:42 +00:00
Taylor Brandstetter
003c9be817 Pass NetworkMonitorFactory through PeerConnectionFactory.
Previously the instance was set through a static method, which was
really only done because it was difficult to add new
PeerConnectionFactory construction arguments at the time.

Now that we have PeerConnectionFactoryDependencies it's easy to clean
this up.

I'm doing this because I plan to add a NetworkMonitor implementation
for iOS, and don't want to inherit this ugliness.

Bug: webrtc:9883
Change-Id: Id94dc061ab1c7186b81af8547393a6e336ff04c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180241
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31815}
2020-07-30 20:52:28 +00:00
Markus Handell
85585f4a52 Migrate rtc_tools/, sdk/, and system_wrappers/ to webrtc::Mutex.
Bug: webrtc:11567
Change-Id: Ia85cf457ac16ebec0a70d319506415e4dec46f30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178903
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31693}
2020-07-10 08:02:05 +00:00
Jonas Olsson
b2b2031457 Concatenate string literals at compile time.
This CL was generated by running:
git ls-files | grep ".cc" | xargs perl -i -ne 'BEGIN {undef $/}; s/("[\s\n]*<<[\s\n]*")/" "/g; print;'; git cl format

After that I manually edited modules/audio_processing/gain_controller2.cc to preserve its original
formatting.

This primary benefit of this change is a small reduction in binary size.

Bug: None
Change-Id: I689fa7ba9c717c314bb167e5d592c3c4e0871e29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165961
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30251}
2020-01-14 14:47:48 +00:00
Mirko Bonadei
9f9e20a3dc Fix errorprone issues preventing Chromium Roll.
Some ErrorProne warnings have been enabled by [1], that broke the
Chromium Roll into WebRTC, this CL should have taken care of all the
problems.

[1] - https://chromium-review.googlesource.com/c/chromium/src/+/1935889

Bug: None
Change-Id: I2670e948c320984a122fdb774b891c98e05f582e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160862
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29933}
2019-11-27 12:52:48 +00:00
Honghai Zhang
3c0e86a87d Add a field trial to use only the higher 64 bits to find network handle from an ipv6 address.
Bug: webrtc:11067
Change-Id: Ib4f069981f7641f67436757a8592ab0f168a9a6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158800
Commit-Queue: Honghai Zhang <honghaiz@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29697}
2019-11-05 20:27:50 +00:00
Danil Chapovalov
b9f69028a0 Store logging streams in a manually linked list instead of std::list
LogMessage::streams_ is a global and thus should have trivial destructor

Bug: None
Change-Id: Ie6a8029602f50b2bc5bab546ffc0365ef0954024
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157042
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29552}
2019-10-21 09:02:52 +00:00