This reverts commit 4f3d660f4f.
Reason for revert: downstream still broken
Original change's description:
> Reland "Remove jni_zero type aliases in jni_generator_helper.h."
>
> This is a reland of commit 9fcaa034bc
>
> Original change's description:
> > Remove jni_zero type aliases in jni_generator_helper.h.
> >
> > This CL removes some type alias from
> > sdk/android/src/jni/jni_generator_helper.h and make sure all the
> > jni_zero types are referred to using the jni_zero:: namespace.
> >
> > The goal is to remove sdk/android/src/jni/jni_generator_helper.h
> > in future CLs.
> >
> > Bug: b/319078685, b/351773023
> > Change-Id: Ief60fce3e8f301f09ac5392d143aa5a82a445bcb
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356882
> > Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
> > Reviewed-by: Jeremy Leconte <jleconte@google.com>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42618}
>
> Bug: b/319078685, b/351773023
> Change-Id: I604b0842d220d76c36b73d2d49bcefe0ee7ae14f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356903
> Commit-Queue: Jeremy Leconte <jleconte@google.com>
> Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42626}
Bug: b/319078685, b/351773023
Change-Id: I9429789e44c82735305b2d0d90cbaa4891d79622
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357041
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Owners-Override: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42627}
This is a reland of commit 9fcaa034bc
Original change's description:
> Remove jni_zero type aliases in jni_generator_helper.h.
>
> This CL removes some type alias from
> sdk/android/src/jni/jni_generator_helper.h and make sure all the
> jni_zero types are referred to using the jni_zero:: namespace.
>
> The goal is to remove sdk/android/src/jni/jni_generator_helper.h
> in future CLs.
>
> Bug: b/319078685, b/351773023
> Change-Id: Ief60fce3e8f301f09ac5392d143aa5a82a445bcb
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356882
> Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
> Reviewed-by: Jeremy Leconte <jleconte@google.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42618}
Bug: b/319078685, b/351773023
Change-Id: I604b0842d220d76c36b73d2d49bcefe0ee7ae14f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356903
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42626}
This reverts commit 9fcaa034bc.
Reason for revert: Breaks downstream project.
Original change's description:
> Remove jni_zero type aliases in jni_generator_helper.h.
>
> This CL removes some type alias from
> sdk/android/src/jni/jni_generator_helper.h and make sure all the
> jni_zero types are referred to using the jni_zero:: namespace.
>
> The goal is to remove sdk/android/src/jni/jni_generator_helper.h
> in future CLs.
>
> Bug: b/319078685, b/351773023
> Change-Id: Ief60fce3e8f301f09ac5392d143aa5a82a445bcb
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356882
> Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
> Reviewed-by: Jeremy Leconte <jleconte@google.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42618}
Bug: b/319078685, b/351773023
Change-Id: I003acf68e2b84bd0a5cda7c7180a28bcd3ca3772
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356902
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#42619}
This CL removes some type alias from
sdk/android/src/jni/jni_generator_helper.h and make sure all the
jni_zero types are referred to using the jni_zero:: namespace.
The goal is to remove sdk/android/src/jni/jni_generator_helper.h
in future CLs.
Bug: b/319078685, b/351773023
Change-Id: Ief60fce3e8f301f09ac5392d143aa5a82a445bcb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356882
Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42618}
This CL modifies RtpTransceiver.setCodecPreferences to return RtcError
instead of void, making it easier to handle errors when setting
codec preferences. To achieve this, new RtcException and RtcError
classes are introduced to represent errors in WebRTC,
mimicking api/rtc_error.h in C++.
Bug: webrtc:42225493
Change-Id: I0f4c6e56f8f2af3353915a41084f6b7b46d793d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352900
Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
Commit-Queue: Zoé Lepaul <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42476}
and move usages to webrtc::RefCountInterface
This CL also moves more stuff to webrtc:: and adds backwards
compatible aliases for them.
Bug: webrtc:42225969
Change-Id: Iefb8542cff793bd8aa46bef8f2f3c66a1e979d07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353720
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42446}
with an intermediate step since Chromium depends on the openssl_stream_adapter.h which will move to the new target.
BUG=webrtc:339300437
Change-Id: Iea163e0a6e3923ce8a741a2e11e9a2a1e3f3e7a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350887
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42362}
There is a race condition in NetworkMonitor where native observers may be removed concurrently with a notification being dispatched, leading to a dangling pointer dereference (trying to dispatch an observer that was already removed and destroyed), and from there a crash with access violation.
By ensuring dispatching to native observers is done within the synchronization lock that guards additions/removals of native observers protects against this race condition.
Since native observers callbacks are posted to the networking thread in the C++ side anyway, there should be no risk of deadlock/starvation due to long-running observers.
Bug: webrtc:15837
Change-Id: Id2b788f102dbd25de76ceed434c4cd68aa9a569e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338643
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42256}
And add PORTALLOCATOR_ENABLE_ANY_ADDRESS_PORTS
which makes WebRTC allocate an unbound port.
BUG=None
Tested: Manually (not the flag, but that it doesn't break anything)
Change-Id: Iba541eb366f111e5ab7844bb3a2dc25ca0838cfe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347881
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42119}
Also remove all dependencies on rtc_media_base except for a few
that are suspected of being linker directives.
Bug: webrtc:14775
Change-Id: Ic0daf88b5422047d3ed7079ee6af9e689853310c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341461
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41886}
Left in target are just .cc files with .h files used externally.
Bug: webrtc:14775
Change-Id: I264f69bb29147fc0f8db877e3def8b21ed42181d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341420
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41835}
Opening the visibility of a few methods from this utils class to allow
it to be used by other implementations of `AudioDeviceModule`.
Also updating a few methods, like adding new audio device types from
recent Android SDKs, and updating the definition of an emulator.
Bug: b/287409066
Change-Id: I1473fa0342252347ce92ee2319380ebb14e9885b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339905
Commit-Queue: Zoé Lepaul <xalep@webrtc.org>
Reviewed-by: Ranveer Aggarwal <ranvr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41778}
This way VP8Decoder and DecoderFallback would use propagated instead of global field trials.
Bug: webrtc:15791, webrtc:10335
Change-Id: I5ad5fae38f5b9379bc6376334562c154fbc56e39
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340040
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41763}
Force and thus guarantee VideoDecoder created through java wrappers get access to the webrtc::Environment
Bug: webrtc:15791
Change-Id: I3f145937c0b914c8e34b24e1ecc55da756551069
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338441
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41745}
This commit addresses an issue resulting from a change [1] in the
jni_zero project, where the format of classpath entries changed
(from using slashes 'org/webrtc/PeerConnectionFactory'
to dots 'org.webrtc.PeerConnectionFactory'). These changes led to
failures in the Chromium rolls in WebRTC, as the Class loader in JNI
was not designed to handle class names with dots.
This CL fixes this issue by changing webrtc::GetClass to convert class
paths to what JNI expects.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/5234469
Bug: chromium:1377351
Change-Id: I2f243bb4ed04136f86510fcd5472e9bfc2d4ba85
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337900
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#41666}
To help avoid future WebRTC importer problems. The .cc and the .h files
are spread out over multiple targets and the bots do not always detect
these issues.
Bug: webrtc:15164, b/320646178, webrtc:15781
Change-Id: I65b271e786c760b5ee024bec436b4cd4aef05d37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334840
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41549}
To unblock code cleanup, uses of Members() are replaced by
Attributes(). This will allow replacing RTCStatsMember<T> with
absl::optional<T> in a future CL.
Bug: webrtc:15164
Change-Id: Ic4ca0d333a9cdaa78739bd8dd4515d2ecfacffbc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334162
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41512}
It is not useful any more.
Bug: webrtc:13634, b/238176207
Change-Id: I3dd4ebca355bb828c6c3c30392333d9fe03a478c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267821
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41427}
This poison guards against accidental use of EnvironmentFactory and thus ensures low level WebRTC class would use utilities from propagated environment instead of accidentally using a default implementation.
This poison extends and thus replaces default task queue poison.
Bug: webrtc:15656
Change-Id: I577bef8af08b9c7dd649ad5a2284eb236e6f4a8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328380
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41247}
This makes it show up as an individual track in perfetto
allowing rendering to be more easily inspected.
https://screenshot.googleplex.com/3eyicjpxdKaG3oE
Bug: b/217863437
Change-Id: I2710a8709141fda50ec613390161ab9c6526b931
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328381
Auto-Submit: Linus Nilsson <lnilsson@webrtc.org>
Commit-Queue: Linus Nilsson <lnilsson@webrtc.org>
Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41222}