Commit graph

1472 commits

Author SHA1 Message Date
Ilya Nikolaevskiy
54f377308f Revert "Added support for H264 YUV444 (I444) decoding."
This reverts commit 7d8ed34372.

Reason for revert: Breaks internal builds

Original change's description:
> Added support for H264 YUV444 (I444) decoding.
>
> Added Nutanix Inc. to the AUTHORS file.
>
> Bug: chromium:1251096
> Change-Id: Ib47c2b1f94797afb6c5090f3c46eae6f13110992
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234540
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35200}

TBR=ilnik@webrtc.org,nisse@webrtc.org,stefan@webrtc.org,peterhanspers@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com,stefan.mitic@nutanix.com

Change-Id: I3048c353a2b6b4f3d4e5e53a88f48b456f1ce593
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1251096
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235203
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35207}
2021-10-14 12:59:29 +00:00
Stefan Mitic
7d8ed34372 Added support for H264 YUV444 (I444) decoding.
Added Nutanix Inc. to the AUTHORS file.

Bug: chromium:1251096
Change-Id: Ib47c2b1f94797afb6c5090f3c46eae6f13110992
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234540
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35200}
2021-10-14 11:06:55 +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
Nico Weber
b3c9d3da8f [ios] Fix two rtc_unittests that fail when using lld as linker
setExif: would create a CFDictionary using NULL for keyCallBacks and
valueCallBacks. This has the effect of comparing the keys of the
dictionary by pointer instead of by value. With ld64, this works
because it always dedupes identical constant CFSTR("foo") literal,
but lld currently doesn't do this.

Using kCFTypeDictionaryKeyCallBacks and kCFTypeDictionaryValueCallBacks
fixes the problem with lld and is "more correct" in general: Now the
dictionary would work with computed CFStrings too, it shows up better
in CFShow() output, etc.

While here, also fix a memory leak in setExif:.

Bug: chromium:1251763
Change-Id: I43c96d2189a4a77fe3bd0dfb3e33623925b0f900
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232760
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#35067}
2021-09-22 19:45:44 +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
Fabian Bergmark
f7a7698aaf Mark toI420 as Nullable
Bug: webrtc:12877
Change-Id: I1b52b46bc9208d20f1887bdc87497e4eb227ecaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232330
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Fabian Bergmark <fabianbergmark@google.com>
Cr-Commit-Position: refs/heads/main@{#35050}
2021-09-21 10:05:09 +00:00
Byoungchan Lee
0a54e7a101 Verify that locks are handled correctly on RTCAudioSession
This CL is for the same behavior as before [1], to emit the NSError
when an application is not using the RTCAudioSession lock correctly.

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

Bug: webrtc:13091
Change-Id: I031b0e963d33c92ce1af7a306edfa6be005e043d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229461
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35018}
2021-09-17 01:41:42 +00:00
Sergey Silkin
6b19d8273b Replace AV1X with AV1
* Replace "AV1X" with "AV1";
* Keep mapping of "AV1X" payload name to kVideoCodecAv1 to not break
support of injectable "AV1X".

Bug: webrtc:13166
Change-Id: I9a50481209209f3857bbf28f4ed529ee6972377e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231560
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34987}
2021-09-14 08:29:02 +00:00
Peter Hanspers
0bf94aaa7c Fix race condition in RTCNetworkMonitor/objc_network_monitor.
Bug: webrtc:13146
Change-Id: I74d645df8847f1e003d1dc8b64e79c6ef9bce285
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231138
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34917}
2021-09-03 12:44:17 +00:00
Tim Na
3c9f41d4ef Refactor network_monitor_java out of peerconnection_java.
This is continuation work from https://webrtc-review.googlesource.com/c/src/+/229322

Bug: webrtc:13117
Change-Id: I649147ab8f978926c2e00ad45b388fb400d6545f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230080
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Tim Na <natim@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34909}
2021-09-02 17:15:46 +00:00
Saúl Ibarra Corretgé
260400d37f Fix NPE when setting the camera2 stabilization mode
Fatal Exception: java.lang.NullPointerException: Attempt to get length of null array
       at org.webrtc.Camera2Session$CaptureSessionCallback.chooseStabilizationMode(Camera2Session.java:234)
       at org.webrtc.Camera2Session$CaptureSessionCallback.onConfigured(Camera2Session.java:172)
       at android.hardware.camera2.impl.CallbackProxies$SessionStateCallbackProxy.lambda$onConfigured$0(CallbackProxies.java:53)
       at android.hardware.camera2.impl.-$$Lambda$CallbackProxies$SessionStateCallbackProxy$soW0qC12Osypoky6AfL3P2-TeDw.run(-.java:4)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:193)
       at android.os.HandlerThread.run(HandlerThread.java:65)

Bug: webrtc:13032
Change-Id: Ifb6ef920b700ca03d37c64803c0b34230785846f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227292
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34874}
2021-08-30 12:25:15 +00:00
Saúl Ibarra Corretgé
424b420a22 Fix NPE when accessing Android camera focus modes
Looks like getSupportedFocusModes() may return null, despite the documentation stating otherwise.

Bug: webrtc:13032
Change-Id: I0119b8a97be9ef4340c3e93f16e2dcaa899f2f3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227288
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34873}
2021-08-30 12:21:35 +00:00
Saúl Ibarra Corretgé
1460e15a45 Fix NPE when converting camera2 supported sizes
StreamConfigurationMap.getOutputSizes() may return null:
https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap#getOutputSizes(java.lang.Class%3CT%3E)

Fixes:

Fatal Exception: java.lang.NullPointerException: Attempt to get length of null array
       at org.webrtc.Camera2Enumerator.convertSizes(Camera2Enumerator.java:234)
       at org.webrtc.Camera2Enumerator.getSupportedSizes(Camera2Enumerator.java:147)
       at org.webrtc.Camera2Session.findCaptureFormat(Camera2Session.java:325)
       at org.webrtc.Camera2Session.start(Camera2Session.java:313)
       at org.webrtc.Camera2Session.<init>(Camera2Session.java:296)
       at org.webrtc.Camera2Session.create(Camera2Session.java:274)
       at org.webrtc.Camera2Capturer.createCameraSession(Camera2Capturer.java:35)
       at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:272)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:237)
       at android.os.HandlerThread.run(HandlerThread.java:67)

Bug: webrtc:13032
Change-Id: I9154be567cd12c066087818ba22e9cd69e75a22f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227291
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34872}
2021-08-30 12:18:45 +00:00
Saúl Ibarra Corretgé
cd0a4f5ff5 Handle camera2 session creation errors
openCamera may throw IllegalArgumentException:
    https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)

Bug: webrtc:13032
Change-Id: I9d094691ca38f9baf312168cd67c323fd4ed5d37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227293
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34871}
2021-08-30 10:52:55 +00:00
Johannes Kron
3cd7a0ffdd Remove media/base/h264_profile_level_id.* and media/base/vp9_profile.h
The content of these files was moved to api/video_codecs in
https://webrtc.googlesource.com/src.git/+/c3fcee7c3a7714afc3e37d4753b40f4fdbc3653e
but the original files could not be removed due to dependencies
in downstream projects.

Bug: chromium:1187565
Change-Id: I414efa22102bfdea0765fa72a8cf8b0bd5c090db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229303
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34869}
2021-08-30 10:31:08 +00:00
Byoungchan Lee
44b919c10a Remove use of UiThreadTestRule and migrate to UiThreadTest in chromium
Remove android.support.test.rule.UiThreadTestRule as chromium did in [1] and
Replace android.support.test.annotation.UiThreadTest
with org.chromium.base.test.UiThreadTest.

Also remove unused uiThreadHandler from NetworkMonitorTest.

[1] https://crrev.com/c/2332301

Bug: webrtc:11962
Change-Id: I8f3781d43d4d53d8158c39c81568d8b09b2bec6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230220
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#34864}
2021-08-30 10:01:16 +00:00
Peter Hanspers
e5b4e941a0 Surface audio unit errors.
With this change, we catch audio unit start errors and pipe them to the
audio session. The audio session notifies its delegate, which can then
take appropriate action based on the error code.
The signal follows the same path as the playout glitch detection.

Bug: webrtc:13119
Change-Id: I8c9f9d2a1e3457447d0ce61ad197f7e1c6392837
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230240
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34862}
2021-08-30 09:06:25 +00:00
Saúl Ibarra Corretgé
27edde3182 Handle camera1 session creation errors more gracefully
Specifically, defer getting the camera index so the error can be
reported instead of crashing:

Fatal Exception: java.lang.IllegalArgumentException: No such camera: Camera 1, Facing front, Orientation 270
       at org.webrtc.Camera1Enumerator.getCameraIndex(Camera1Enumerator.java:170)
       at org.webrtc.Camera1Capturer.createCameraSession(Camera1Capturer.java:31)
       at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:272)
       at android.os.Handler.handleCallback(Handler.java:790)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:214)
       at android.os.HandlerThread.run(HandlerThread.java:65)

Bug: webrtc:13032
Change-Id: Ida6bc65046770c11c2b3ee832906e8454cec10df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227290
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34855}
2021-08-25 17:04:40 +00:00
Saúl Ibarra Corretgé
68952fed31 Handle camera2 session start error
getCameraCharacteristics() may throw IllegalArgumentException:

Fatal Exception: java.lang.IllegalArgumentException: supportsCameraApi:2569: Unknown camera ID 1
       at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1119)
       at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:531)
       at org.webrtc.Camera2Session.start(Camera2Session.java:304)
       at org.webrtc.Camera2Session.<init>(Camera2Session.java:296)
       at org.webrtc.Camera2Session.create(Camera2Session.java:274)
       at org.webrtc.Camera2Capturer.createCameraSession(Camera2Capturer.java:35)
       at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:272)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:237)
       at android.os.HandlerThread.run(HandlerThread.java:67)

Bug: webrtc:13032
Change-Id: I30b6d6da40bc90a94c0c3c79f9dff523182d3da4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227289
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34854}
2021-08-25 17:01:51 +00:00
Saúl Ibarra Corretgé
0f549f908c Catch RuntimeException on Camera.setDisplayOrientation
Bug: webrtc:13032
Change-Id: I3736e61b8f49ae058851d7f5d60858454e5d5b09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227287
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34853}
2021-08-25 15:30:51 +00:00
Saúl Ibarra Corretgé
c5cb7f1fad Fix NPE if no compatible capture format was found
Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'int org.webrtc.CameraEnumerationAndroid$CaptureFormat.width' on a null object reference
       at org.webrtc.Camera2Session$CameraStateCallback.onOpened(Camera2Session.java:122)
       at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:151)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:246)
       at android.os.HandlerThread.run(HandlerThread.java:67)


Fix NPE when setting the camera2 stabilization mode

Fatal Exception: java.lang.NullPointerException: Attempt to get length of null array
       at org.webrtc.Camera2Session$CaptureSessionCallback.chooseStabilizationMode(Camera2Session.java:234)
       at org.webrtc.Camera2Session$CaptureSessionCallback.onConfigured(Camera2Session.java:172)
       at android.hardware.camera2.impl.CallbackProxies$SessionStateCallbackProxy.lambda$onConfigured$0(CallbackProxies.java:53)
       at android.hardware.camera2.impl.-$$Lambda$CallbackProxies$SessionStateCallbackProxy$soW0qC12Osypoky6AfL3P2-TeDw.run(-.java:4)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:193)
       at android.os.HandlerThread.run(HandlerThread.java:65)

Bug: webrtc:13032
Change-Id: I6edd9f0061c445f90ab0881d78183077f89e391f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227294
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34851}
2021-08-25 13:35:11 +00:00
Byoungchan Lee
02334e07c5 Replace the android support annotation library with androidx's one.
This change does not affect downstream dependencies as androidx.annotation
is fully compatible with android.support.annotation.

Bug: webrtc:11962
Change-Id: I714b473df8d0fee8000ddf3a9beca7c5613db5ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226881
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34839}
2021-08-24 16:02:17 +00:00
Tim Na
2c8567b87a Adding a flag for enabling directWifiManger instead of using
PeerConnectionFactory to break off the dependency.

- This is required so that Android app that doesn't use the
  peerconnection_java as dependency can include android monitor
  directly without incurring size bloat.

Bug: None
Change-Id: I7b3453f268467550c0a4b3a0bbf858d55d2fd8a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229322
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Tim Na <natim@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34829}
2021-08-23 17:30:25 +00:00
Danil Chapovalov
b74b2b5a99 Migrate objc video decoder wrapper from InitDecode to Configure
Bug: webrtc:13045
Change-Id: Iff00489a91379298ac90cd48eb1aea109abd9906
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228945
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34825}
2021-08-23 14:50:55 +00:00
Saúl Ibarra Corretgé
4d0760e7f9 Add ability to mark video sources for screen casting in ObjC
Bug: webrtc:13033
Change-Id: If30a4889cd2cb0ecc5ee91eed2ee9b496a40c852
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227295
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34818}
2021-08-21 08:19:12 +00:00
Sergey Silkin
1db921e6f3 Non-integer frame rate in Android HW encoder
Bug: webrtc:10812
Change-Id: I4443dcfea851114bd5fbb10f11ca8a51cda12da8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229025
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34813}
2021-08-19 21:54:22 +00:00
Sergey Silkin
c68796e260 Calculate frame timestamps based on target frame rate
Before this change HardwareVideoEncoder used capture time as frame
timestamp passed to HW encoder. That led to buffer overshoots with
HW encoders which infer frame rate from timestamps when frames were
dropped before encoding (i.e., frame rate decreases according to frame
timestamps) or when FramerateBitrateAdjuster was used.

Fixed this by using synthetic monotonically increasing timestamps
calculated based on target frame rate provided by bitrate adjuster.

Bug: webrtc:12982
Change-Id: I2454cd4e574bbea1cb9855ced4d998104845415c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228902
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34810}
2021-08-19 19:10:32 +00:00
Danil Chapovalov
ffce8e3ea0 Migrate android video decoder wrapper from InitDecode to Configure
Bug: webrtc:13045
Change-Id: Idb6d83d5cde659876ea3a106a85f177191f8074c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228941
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34769}
2021-08-16 12:43:17 +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
Peter Hanspers
7f854bce1f Add supportsNativeHandle to the RTCVideoEncoder protocol.
The simulcast_encoder_adapter expects codecs that specify
supports_native_handle to perform resampling/scaling (through
GetEncoderInfo).
This change adds a method to the RTCVideoEncoder to let objc encoders
specify this rather than relying on the default.

Bug: webrtc:13044
Change-Id: I2efcbd42aa4f2048285f451c7b691fdeca111e62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227641
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34683}
2021-08-09 15:21:52 +00:00
Byoungchan Lee
8c487578f0 Fix crash of Objc SDK addIceCandidate with incorrect candidate.
RTCIceCandidate.nativeCandidate returns a unique_ptr that
can be null. As with the previous CL, this is used without checking
whether it is null or not, so it should be fixed.

Bug: None
Change-Id: I70a84f7a2a9a9d47b8cefa198204f9b6d63a7c7f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227620
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34649}
2021-08-04 21:42:07 +00:00
Byoungchan Lee
33728152ca Fix crash of ObjC SDK sLD / sRD with incorrect SDP.
There are two problems with setLocalDescription / setRemoteDescription
in ObjC SDK.
First, RTCSessionDescription.nativeDescription returns a raw
nullableSessionDescriptionInterface pointer, where sLD/sRD are calling
Clone() method unconditionally, so it might crash.
Second, unnecessary sLD/sRD calls Clone() of the raw pointer and
does not delete it, so this pointer will leak.

To solve these problems, I changed the return type of nativeDescription to
std::unique_ptr and removed the call to Clone() method.

Bug: webrtc:13022, webrtc:13035
Change-Id: Icbb87dda62d3a11af47ec74621cf64b8a6c05228
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227380
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/master@{#34647}
2021-08-04 20:39:00 +00:00
Mirko Bonadei
9ff450d0c4 [sigslot] - Remove sigslot from MediaStreamObserver.
Bug: webrtc:11943
Change-Id: Icf91ce850913c26e45dbca1940cafd600c235ad4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227340
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34632}
2021-08-03 06:53:59 +00:00
Mirko Bonadei
f48d3cfbab Revert "An RTCSessionDescription will now return nil from its initializer if the SDP passed to it is invalid."
This reverts commit 48cd9dbc50.

Reason for revert: Breaks downstream project.

Original change's description:
> An RTCSessionDescription will now return nil from its initializer if the SDP passed to it is invalid.
>
> Bug: webrtc:13022
> Change-Id: I2f2ad96884cf2f43f5ea95c1210470dd6aa5c919
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226980
> Commit-Queue: Jake Bromberg <jakebromberg@google.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34607}

TBR=peah@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com,jakebromberg@google.com

Change-Id: Iee05f747e472208f8776944df15d9206485b167e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:13022
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227341
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34615}
2021-07-31 09:53:46 +00:00
Mirko Bonadei
5f0784563c Allow export of Obj-C symbols without C++ ones.
This is useful when building the .framework which doesn't need to
export C++ symbols.

Bug: webrtc:12408
Change-Id: Ied775811a72a06b9ad678c9fb549bca286dd7f37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227089
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34613}
2021-07-30 22:54:59 +00:00
Jake Bromberg
48cd9dbc50 An RTCSessionDescription will now return nil from its initializer if the SDP passed to it is invalid.
Bug: webrtc:13022
Change-Id: I2f2ad96884cf2f43f5ea95c1210470dd6aa5c919
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226980
Commit-Queue: Jake Bromberg <jakebromberg@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34607}
2021-07-30 18:11:18 +00:00
Mirko Bonadei
2e6323e153 Fix OWNERS according to recent changes to path expressions.
See https://crbug.com/1231999#c7 and
https://chromium-review.googlesource.com/plugins/code-owners/Documentation/path-expressions.html#simplePathExpressions.

Bug: chromium:1231999
Change-Id: I8bce4f6e6bf53bf56b53b5bad54145727fd32389
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227090
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34602}
2021-07-30 13:36:20 +00:00
Mirko Bonadei
56c2406f8c Roll chromium_revision 03a29cf406..0549de0c2d (904346:907032)
This CL also includes the changes required to fix build errors on
Android builds.

Change log: 03a29cf406..0549de0c2d
Full diff: 03a29cf406..0549de0c2d

Changed dependencies
* src/base: 58887e6f2a..fe7fd7b2be
* src/build: 4638e26758..8aa210e09b
* src/buildtools/linux64: git_revision:d565aa3e72dd9e81da9595ee8c9d7b24cb45c48b..git_revision:c0a2d23c21e87f27f5af3e5dc2a99f2ef3480b9e
* src/buildtools/mac: git_revision:d565aa3e72dd9e81da9595ee8c9d7b24cb45c48b..git_revision:c0a2d23c21e87f27f5af3e5dc2a99f2ef3480b9e
* src/buildtools/third_party/libc++abi/trunk: e8bf577fbf..24e92c2bee
* src/buildtools/third_party/libunwind/trunk: d7b11d7989..cdb04dc77c
* src/buildtools/win: git_revision:d565aa3e72dd9e81da9595ee8c9d7b24cb45c48b..git_revision:c0a2d23c21e87f27f5af3e5dc2a99f2ef3480b9e
* src/ios: c172f6d55d..dafd1d1517
* src/testing: e6a8848e04..45ed21d9c9
* src/third_party: 43300033c5..be994fedb5
* src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib: version:2@1.5.10.cr0..version:2@1.5.21.cr0
* src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common: version:2@1.5.10.cr0..version:2@1.5.21.cr0
* src/third_party/android_sdk/public: 8LZujEmLjSh0g3JciDA3cslSptxKs9HOa_iUPXkOeYQC..tRoD45SCi7UleQqSV7MrMQO1_e5P8ysphkCcj6z_cCQC
* src/third_party/android_sdk/public: V__2Ycej-H2-6AcXX5A3gi7sIk74SuN44PBm2uC_N1sC..ZT3JmI6GMG4YVcZ1OtECRVMOLLJAWAdPbi-OclubJLMC
* src/third_party/android_sdk/public: A4EvXZUIuQho0QRDJopMUpgyp6NA3aiDQjGKPUKbowMC..gMHhUuoQRKfxr-MBn3fNNXZtkAVXtOwMwT7kfx8jkIgC
* src/third_party/android_sdk/public: 8tF0AOj7Dwlv4j7_nfkhxWB0jzrvWWYjEIpirt8FIWYC..qi_k82nm6j9nz4dQosOoqXew4_TFAy8rcGOHDLptx1sC
* src/third_party/android_sdk/public: YMUu9EHNZ__2Xcxl-KsaSf-dI5TMt_P62IseUVsxktMC..lL3IGexKjYlwjO_1Ga-xwxgwbE_w-lmi2Zi1uOlWUIAC
* src/third_party/android_sdk/public: 4gxhM8E62bvZpQs7Q3d0DinQaW0RLCIefhXrQBFkNy8C..n7svc8KYah-i4s8zwkVa85SI3_H0WFOniP0mpwNdFO0C
* src/third_party/androidx: hKpaz7h0NioWOEg8YP2hSuRaZ6uRCUEUcmNcvkxr9aYC..HHo3GgWHTJyTdX1eY15wQ40-pIfmMojudjRzMFoE8JoC
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/a10017c548..519c2986c7
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/9ac1fdf373..10f6e4b89b
* src/third_party/freetype/src: 801cd842e2..47b1a541cb
* src/third_party/googletest/src: 4ec4cd23f4..2d924d7a97
* src/third_party/libaom/source/libaom: https://aomedia.googlesource.com/aom.git/+log/aba245dde3..d80b8cecab
* src/third_party/libvpx/source/libvpx: eebc5cd487..977e77006e
* src/third_party/perfetto: 13482fe8f9..9edd589321
* src/tools: 2f3bb89f4e..f7be2d25c7
* src/tools/luci-go: git_revision:9ee8b1d719c0d3c268e0e19282351ca78024af2d..git_revision:63874080a20260642c8df82d4f4885ff30b33fb6
* src/tools/luci-go: git_revision:9ee8b1d719c0d3c268e0e19282351ca78024af2d..git_revision:63874080a20260642c8df82d4f4885ff30b33fb6
* src/tools/luci-go: git_revision:9ee8b1d719c0d3c268e0e19282351ca78024af2d..git_revision:63874080a20260642c8df82d4f4885ff30b33fb6
DEPS diff: 03a29cf406..0549de0c2d/DEPS

Clang version changed llvmorg-13-init-15163-g98033fdc:llvmorg-13-init-15561-gf98ed74f
Details: 03a29cf406..0549de0c2d/tools/clang/scripts/update.py

TBR=xalep@webrtc.org,marpan@webrtc.org, jianj@chromium.org,
BUG=None

No-Try: True
Change-Id: Iceca2600ab3aeff37d325ec68565c06f9db5b0fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227280
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34599}
2021-07-30 09:56:45 +00:00
Saúl Ibarra Corretgé
f7aa267dc0 Add missing header file in mac framework target
Bug: webrtc:13025
Change-Id: I16c31717dd8ffa4075386b403827729099b567da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227163
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34592}
2021-07-29 07:42:36 +00:00
Mirko Bonadei
3707793a57 [sigslot] - Remove sigslot form NetworkMonitorInterface.
Bug: webrtc:11943
Change-Id: Iddedb2840e437dfbffcb0d6cbf71a09b0030fbab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226869
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34573}
2021-07-27 19:27:52 +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
Sergey Silkin
00fd3e352a Fetch and update encoder info in ctor
This allows to get encoder implementation name and other properties
without the need of initializing encoder.

Bug: none
Change-Id: I263a358d562a65a31c420ddb7c4b195316fa5ec8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226867
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34559}
2021-07-27 13:48:49 +00:00
Sergey Silkin
ac1c984dc1 Add ssilkin to android/OWNERS
Need someone from video team devs to be in the list. Working on projects
related to Android media codecs for couple of years and have enough
experience to review the changes. A concrete short-term motivation is
the need to land https://webrtc-review.googlesource.com/c/src/+/226867

Bug: none
Change-Id: I1d0a672f6b497bbe1e2d446386284d568f84664a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226951
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34556}
2021-07-27 12:49:02 +00:00
Mirko Bonadei
7750d802a5 Rename rtc_base/ssl_stream_adapter.h constants.
Uppercase constants are more likely to conflict with macros (for
example rtc::SRTP_AES128_CM_SHA1_80 and OpenSSL SRTP_AES128_CM_SHA1_80).

This CL renames some constants and follows the C++ style guide.

Bug: webrtc:12997
Change-Id: I2398232568b352f88afed571a9b698040bb81c30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226564
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34553}
2021-07-26 16:33:54 +00:00
Byoungchan Lee
f740c252e7 Use the underlying type of Java Video Buffer on Java -> C++ Frame Buffer
Just like the C++ API, add a method in Java VideoFrame.Buffer that
describes the underlying implementation.
Use this method to properly select AndroidVideoBuffer
or AndroidVideoI420Buffer in Java -> C++ Video Frame Conversion.

Also, add a test case for WrappedNativeI420Buffer
in VideoFrameBufferTest for consistency.

Bug: webrtc:12602
Change-Id: I4c0444e8af6f6a1109bc514e7ab6c2214f1f6d60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223080
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34545}
2021-07-24 01:04:40 +00:00
Byoungchan Lee
d33d0e8765 Hide AndroidVideoBuffer class and use factory function
This is a step to ensure that the Java to C++ Video Frame Buffer
conversion respects its types.

Bug: webrtc:12602
Change-Id: I1b688b1f421f44474e022b433f9075e75744d86f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223082
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34487}
2021-07-16 13:54:45 +00:00
Byoungchan Lee
9fc2663712 Hide VideoCodecType from Android SDK
This has not been used since
https://webrtc-review.googlesource.com/c/src/+/172721 .

Bug: None
Change-Id: Id617b9f6770b342b324fe0da84bf402cea1e783c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223081
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/master@{#34480}
2021-07-15 18:33:47 +00:00
Mirko Bonadei
2bbbd6686e Remove backwards compatible build targets.
Introduced by https://webrtc-review.googlesource.com/c/src/+/224200,
they can be now removed.

Bug: webrtc:11516
Change-Id: Idee5925e1ab10eba1b7b5cf7e673758281ac1492
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225204
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34440}
2021-07-08 20:26:49 +00:00
Jordan Rose
53d3fc9b1c iOS: Get WebRTC building for Mac Catalyst
- Add an option for disabling the OpenGL renderer
- Change the build script to use correct header location
- Use Metal compatibility for h264 CoreVideo buffers

Bug: webrtc:11516
Change-Id: Ia34a9305648e75904ac36e69593ffefedd833bfb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224200
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34426}
2021-07-06 21:07:59 +00:00
Mirko Bonadei
6b09c451dc Silence OpenGLES deprecation warning.
The deprecation warning started to trigger after the iOS deployment
target has been updated from 10 to 12 by
https://webrtc-review.googlesource.com/c/src/+/224543.

This macro was not defined in tests because the relevant bots were
excluded from CQ when that happened.

Bug: webrtc:12928, webrtc:12937
Change-Id: I6e1891c5080b172cbd74649e0a115b25d6c87d56
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225020
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34417}
2021-07-05 15:50:18 +00:00
Björn Terelius
02768ae4f8 Increase iOS deployment target from 10 to 12.
TBR=kthelgason@webrtc.org

Bug: webrtc:12928
Change-Id: I50de09972bf012e78a9bc9f1d98d8d07aab4e180
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224543
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34409}
2021-07-02 17:02:27 +00:00
Jake Bromberg
fb7fd24b3d Removing RTC_SUPPORTS_METAL compilation flag. This flag is a holdover from before either macOS or the iOS Simulator supported Metal rendering.
Bug: webrtc:12638
Change-Id: Iced21bfac40192f609b65f5ea1dc3393ee1695fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222461
Commit-Queue: Jake Bromberg <jakebromberg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34347}
2021-06-21 22:47:44 +00:00
Xavier Lepaul
afb28116d3 Catch possible RuntimeException from getCameraCharacteristics
Also changed the logging of exceptions to give more details

Bug: webrtc:10804
Change-Id: Ifba6dee3d1c8ba4ecab408ca7715c3b792d9c004
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222641
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34325}
2021-06-17 15:32:42 +00:00
Fabian Bergmark
1bb36d2c77 Change YuvConverter.convert to catch GLExceptions and return null.
With https://webrtc-review.googlesource.com/c/src/+/222582,
I420 conversion is allowed to fail.

Bug: webrtc:12877
Change-Id: Iadae21ad889f084b8027206af4478223d7733d3e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222653
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Fabian Bergmark <fabianbergmark@google.com>
Cr-Commit-Position: refs/heads/master@{#34320}
2021-06-17 11:33:54 +00:00
Xavier Lepaul
72b79986a5 Remove the createDecoder(String) overload
This method has been deprecated since 2018-07:
https://webrtc-review.googlesource.com/c/src/+/88368/

It is never called by WebRTC itself.

Custom `VideoDecoderFactory` implementations overriding this method can
switch to the overload accepting a `VideoCodecInfo` object.

This is also adding a `toString()` implementation to `VideoCodecInfo`,
to make logging of the value more useful.

Bug: webrtc:7925
Change-Id: I70ec07a0cd4ffa07d165c9851e393439fcc5870b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221960
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34302}
2021-06-16 12:31:52 +00:00
Fabian Bergmark
c03d6e965e Support Java_Buffer_toI420 returning null
Bug: webrtc:12877
Change-Id: Ib9c8c62b350e644b17a3194e4208df6b06a4d9b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222582
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Fabian Bergmark <fabianbergmark@google.com>
Cr-Commit-Position: refs/heads/master@{#34296}
2021-06-16 07:27:47 +00:00
Peter Hanspers
74cc9eaca3 Don't register invalid encode complete callbacks.
Bug: webrtc:12866
Change-Id: Ia225b2f211155b4623ba07b61cee85366d822b29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221741
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34277}
2021-06-14 10:45:46 +00:00
Sergey Silkin
1b63db956f Move AV1X-AV1 mapping to VideoCodecTypeMime
AV1X->AV1 mapping added to SdpVideoFormatToVideoCodecInfo in
https://webrtc-review.googlesource.com/c/src/+/215586 results in
discrepancy of codec name between SDP and VideoCodecInfo. That violates
VideoCodecInfo design and breaks downstream projects.

This CL moves the mapping from VideoCodecInfoToSdpVideoFormat and
SdpVideoFormatToVideoCodecInfo to VideoCodecTypeMime.

Bug: b/181690054
Change-Id: I2a76524c29b082241f2ec72a60a209ce9b0c7c5f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221205
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34230}
2021-06-04 15:38:48 +00:00
Jesús Leganés-Combarro 'piranna
ffbfba979f Added PeerConnectionObserverJni::OnRemoveTrack()
Change-Id: I0880caa77a1097f56c560152e85c9ca29242f825

This PR add support for the `PeerConnectionObserverJni::OnRemoveTrack()`
event on Java, allowing to be notified when a remote track has been
removed. It's a very thing JNI wrapper on top of C++ API, being mostly
similar to other already available events like `track` and `addTrack`.

In Javascript API, tracks are not "removed" explicitly from the
PeerConnection, but instead receiver PeerConnection gets notified that
they have been removed from the streams they are associated to, and when
no `MediaStream` object has that track, it's considered that the track
has been removed from the PeerConnection. In Java and C++ APIs there's no
`MediaStreamObserver` class, so there's no way to listen to the
`removeTrack` event the same way happens in Javascript API, but instead
C++ API has a `removeTrack` event at PeerConnection level. This patchset
just only wraps and expose this `removeTrack` event from the C++ API to
the Java API.

This PR has been sponsored by Atos Research and Innovation
(https://atos.net/en/about-us/innovation-and-research).

Bug: webrtc:12850
Change-Id: I0880caa77a1097f56c560152e85c9ca29242f825
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218847
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34225}
2021-06-03 19:24:55 +00:00
Peter Hanspers
5981bf2eb6 Add resolution alignment properties to RTCVideoEncoder protocol.
With this change, RTCVideoEncoder can specify:
- requested_resolution_alignment,
- apply_alignment_to_all_simulcast_layers
in the same way scaling_settings is specified.

Change-Id: I3de79a2eabaae581d6a9f2ef3e39496b9545a4f5

Bug: webrtc:12829
Change-Id: I3de79a2eabaae581d6a9f2ef3e39496b9545a4f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220933
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Abby Yeh <abbyyeh@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34196}
2021-06-02 09:30:06 +00:00
Byoungchan Lee
cc84c980c2 Fix typo in a URL in the comment
Bug: None
Change-Id: I8ec4daa95e2602da7c1df747a6ddda193449eea1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220620
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34175}
2021-05-31 20:15:17 +00:00
Markus Handell
a1b8201009 Move proxies into pc/.
Bug: webrtc:12787
Change-Id: Ia244d9d22d35436a02cf5a448bd1520cb66ff352
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220321
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34141}
2021-05-27 09:56:42 +00:00
Harald Alvestrand
a9af50f151 Introduce CreateDataChannelOrError
Deprecate CreateDataChannel, and make it a simple wrapper function.

Bug: webrtc:12796
Change-Id: I053d75a264596ba87ca734a29df9241de93a80c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219784
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34130}
2021-05-26 09:43:29 +00:00
Byoungchan Lee
a39d96666b Remove unused property isLocked from RTCAudioSession
This property doesn't have a getter and it is not required anymore.

Bug: None
Change-Id: Ie3f057cd6928d7fdef4e7971476fb1257900ccc6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215261
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34125}
2021-05-26 08:08:40 +00:00
Byoungchan Lee
0a52ede821 Support for map of string keys to uint64_t / double values in RTCStats
Bug: webrtc:10685
Change-Id: I047d784bd20c3fca8b96391653f90fd8803140d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219141
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34121}
2021-05-25 20:38:08 +00:00
Tian Tan
c2310b2619 Set nativeObserver to 0 to avoid double release.
Bug: webrtc:12769
Change-Id: Ifcd3e8148e999740a697b27ddd12f6aca36c5440
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218780
Commit-Queue: Tian Tan <tiantan@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34029}
2021-05-17 19:53:43 +00:00
Björn Terelius
99261af5a4 Revert "Define cricket::MediaType in terms of webrtc::MediaType"
This reverts commit 3ce6391b38.

Reason for revert: Breaks downstream test

Original change's description:
> Define cricket::MediaType in terms of webrtc::MediaType
>
> This is one step in getting rid of cricket::MediaType.
>
> Bug: webrtc:12754
> Fixes: webrtc:12764
> Change-Id: Idee832572bdc4c0e3bfdec6fb31ec0ba9db3e995
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218346
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33994}

TBR=mbonadei@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I64772018dea55e4f0946464364a60a39cec7e9ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12754
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218603
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34000}
2021-05-12 17:06:58 +00:00
Harald Alvestrand
3ce6391b38 Define cricket::MediaType in terms of webrtc::MediaType
This is one step in getting rid of cricket::MediaType.

Bug: webrtc:12754
Fixes: webrtc:12764
Change-Id: Idee832572bdc4c0e3bfdec6fb31ec0ba9db3e995
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218346
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33994}
2021-05-12 11:34:28 +00:00
Harald Alvestrand
f33f7a2ada Deprecate PeerConnectionFactory::CreatePeerConnection
Applications should use CreatePeerConnectionOrError instead.

Moved fallback implementations of CreatePeerConnection into the
api/peer_connection_interface.h file, so that we do not have to
declare these methods in the proxy.

Bug: webrtc:12238
Change-Id: I70c56336641c2a108b68446ae41f43409277a584
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217762
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33964}
2021-05-10 08:47:48 +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
Yura Yaroshevich
3fb51d2783 Reland "Expose AV1 encoder&decoder from Android SDK."
This is a reland of fedd5029c5

Original change's description:
> Expose AV1 encoder&decoder from Android SDK.
>
> Bug: None
> Change-Id: Ie32be36da498d4bed2a3cf51aa6abc8838e42da1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212024
> Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
> Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#33743}

Bug: None
Change-Id: Ibfc7b860bd2314cf997444c7ab0d94d2b186e576
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215586
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/master@{#33882}
2021-04-30 09:12:11 +00:00
Tommi
87f7090fd9 Replace more instances of rtc::RefCountedObject with make_ref_counted.
This is essentially replacing `new rtc::RefCountedObject` with
`rtc::make_ref_counted` in many files. In a couple of places I
made minor tweaks to make things compile such as adding parenthesis
when they were missing.

Bug: webrtc:12701
Change-Id: I3828dbf3ee0eb0232f3a47067474484ac2f4aed2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215973
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33852}
2021-04-27 17:01:59 +00:00
Harald Alvestrand
48171ec264 Remove more mentions of RTP datachannels
Bug: webtc:6625
Change-Id: I38c51c4c10df8a5f517733f211e030359d33e787
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215783
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33799}
2021-04-21 10:16:43 +00:00
Tommi
86ee89f73e Simplify reference counting implementation of PendingTaskSafetyFlag.
On a 32bit system, this reduces the allocation size of the flag
down from 12 bytes to 8, and removes the need for a vtable (the extra
4 bytes are the vtable pointer).

The downside is that this change makes the binary layout of the
flag, less compatible with RefCountedObject<> based reference counting
objects and thus we don't immediately get the benefits of identical
COMDAT folding and subsequently there's a slight binary size increase.
With wider use, the binary size benefits will come.

Bug: none
Change-Id: I04129771790a3258d6accaf0ab1258b7a798a55e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215681
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33793}
2021-04-21 07:04:01 +00:00
Yura Yaroshevich
1153974c89 Fixed crash due wrong format specifier.
Bug: None
Change-Id: I80d512242dfd70c57952b3f41150db409ba1ac2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215684
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33785}
2021-04-20 11:54:32 +00:00
Johannes Kron
c3fcee7c3a Move h264_profile_level_id and vp9_profile to api/video_codecs
This is a refactor to simplify a follow-up CL of adding
SdpVideoFormat::IsSameCodec.

The original files media/base/h264_profile_level_id.* and
media/base/vp9_profile.h must be kept until downstream projects
stop using them.

Bug: chroimium:1187565
Change-Id: Ib39eca095a3d61939a914d9bffaf4b891ddd222f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215236
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33782}
2021-04-20 09:42:05 +00:00
Yura Yaroshevich
d29c689463 Expose adaptive_ptime from Android SDK.
Bug: None
Change-Id: Ideec24a0561efef83387f9b9605a5b68371fefa3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215228
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33768}
2021-04-19 08:07:11 +00:00
Yura Yaroshevich
d46a174f0c Expose adaptive_ptime from iOS SDK.
Bug: None
Change-Id: I48fd0937f51dc972b3eccd66f99ae80378e32fe1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214968
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33766}
2021-04-18 21:53:32 +00:00
Björn Terelius
dd36198ae8 Revert "Expose AV1 encoder&decoder from Android SDK."
This reverts commit fedd5029c5.

Reason for revert: Speculative revert due to crashes in downstream tests on Android.

Original change's description:
> Expose AV1 encoder&decoder from Android SDK.
>
> Bug: None
> Change-Id: Ie32be36da498d4bed2a3cf51aa6abc8838e42da1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212024
> Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
> Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#33743}

TBR=alessiob@webrtc.org,mflodman@webrtc.org,yura.yaroshevich@gmail.com,xalep@webrtc.org

Change-Id: I76171087d1998b9d7573c2b86b1cf9ed65154bbf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215324
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33753}
2021-04-16 07:40:23 +00:00
Derek Bailey
6c127a1e2a Add Stable Writable Connection Ping Interval parameter to RTCConfiguration.
Bug: webrtc:12642
Change-Id: I543760d49f87130d717c7cf0eca7d2d2f45e8eac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215242
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Derek Bailey <derekbailey@google.com>
Cr-Commit-Position: refs/heads/master@{#33751}
2021-04-16 07:11:10 +00:00
Mirko Bonadei
0f57e0b646 Make libjingle_peerconnection_metrics_default_jni available in Linux builds.
TBR=hta@webrtc.org

Bug: None
Change-Id: Ida28fc45071762b57b938dc1269f1876c5049cb9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215322
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33747}
2021-04-15 19:55:09 +00:00
Florent Castelli
a80c3e5352 sctp: Reorganize build targets
Bug: webrtc:12614
Change-Id: I2d276139746bb8cafdd5c50fe4595e60a6b1c7fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215234
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33745}
2021-04-15 17:00:56 +00:00
Yura Yaroshevich
fedd5029c5 Expose AV1 encoder&decoder from Android SDK.
Bug: None
Change-Id: Ie32be36da498d4bed2a3cf51aa6abc8838e42da1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212024
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/master@{#33743}
2021-04-15 15:12:21 +00:00
Harald Alvestrand
bc959b61b3 Remove enable_rtp_data_channel
This denies the ability to request RTP data channels to callers.
Later CLs will rip out the actual code for creating these channels.

Bug: chromium:928706
Change-Id: Ibb54197f192f567984a348f1539c26be120903f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177901
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33740}
2021-04-15 10:20:00 +00:00
Yura Yaroshevich
9aec8c239f Use default rtp parameters to init wrappers in iOS
Before these changes default initialized iOS wrappers
around various RTP*Parameters types had their own
default values of nonnull values, which did not always
matched default values from native code, which then causes
override of default native values, if library user didn't
specified it's own initialization.
After these changes default initialization of iOS wrappers
uses default property values from default initialized
native types.

Bug: None
Change-Id: Ie21a7dc38ddc3862aca8ec424859c776c67b1388
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215220
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33731}
2021-04-14 12:20:17 +00:00
Mirko Bonadei
84ba1643c2 Change from sakal@webrtc.org to xalep@webrtc.org in OWNERS files.
Auto generated with:

git grep -l "sakal@webrtc.org" | xargs sed -i '' -e 's/sakal/xalep/g'

No-Try: True
Bug: webrtc:12673
Change-Id: Ic1d4e8c655725d490a0e2b0d492e42edc9aa919c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215147
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33722}
2021-04-14 08:27:54 +00:00
Yura Yaroshevich
1cdeb0a56e addIceCandidate with callback into Android's SDK.
Bug: webrtc:12609
Change-Id: I059a246f5ade201b6a8decac264a8dd79fef3f9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212740
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33681}
2021-04-12 07:04:54 +00:00
Yura Yaroshevich
4e9e723dae Expose setLocalDescription() in SDK for Android.
Parameterless sLD is part of perfect negotiation algo.

Bug: webrtc:12609
Change-Id: I13a6b0bf29db8b4e984da9b2645f9bfdb23e074c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212605
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/master@{#33641}
2021-04-07 15:58:16 +00:00
Yura Yaroshevich
90fab63b98 Extended RTCConfiguration in Android SDK.
"enableImplicitRollback" is necessary for perfect negotiation algorithm

"offerExtmapAllowMixed" is necessary for backward compatibility with
legacy clients.

Bug: webrtc:12609
Change-Id: I30a5a01c519ca9080a346e2d36b58f7bab28f15a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212741
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33639}
2021-04-07 14:28:10 +00:00
Yura Yaroshevich
b9fa319586 Expose extra ICE params in RTCConfiguration on iOS
Bug: None
Change-Id: I16ca28055cd9ca371f1e21b5950cf759973da894
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213421
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/master@{#33628}
2021-04-06 13:56:31 +00:00
Yura Yaroshevich
d8d9ac3962 Expose restartIce in SDK for Android.
PC.restartIce() is part of perfect negotiation algorithm.

Bug: webrtc:12609
Change-Id: I21a0f8637e92e13ee2653ef477d0cd22a32bf9c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212645
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33589}
2021-03-29 20:57:53 +00:00
Sami Kalliomäki
fa4db49532 Make GL errors thrown by checkNoGLES2Error inherit GLException.
The motivation is making it easier to catch exceptions for these
kind of failures only.

Bug: b/182561645
Change-Id: I09527d8665fda0fa24144cb05e9fd24c041549a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212608
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33540}
2021-03-23 11:48:19 +00:00
Sami Kalliomäki
c303f82f4d Add new owners for sdk/android.
Bug: None
Change-Id: Ia47050e178e696b5374513f5ec9a00fff4a1cd34
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212618
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Carolina Sartorius‎ <sartorius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33529}
2021-03-22 15:48:52 +00:00
Yura Yaroshevich
cbadb8bcab Expose offerExtmapAllowMixed in iOS SDK.
Bug: None
Change-Id: Ic14d1f005b6c727b509492399901d822bd6950db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212280
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33498}
2021-03-18 08:54:11 +00:00
Yura Yaroshevich
417361423e Expose enableImplicitRollback in iOS SDK.
The implicit rollback of local description is part of
perfect negotiation:
https://groups.google.com/a/chromium.org/g/blink-dev/c/OqPfCpC5RYU

Bug: None
Change-Id: I144d9ef86adad0def81ab6c58ff997cd19b562da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212080
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33487}
2021-03-17 09:05:35 +00:00
Niels Möller
3e774f64b0 Make AndroidNetworkMonitor::Start() create a new task safety flag
Instead of using SetAlive on the old flag (which might allow old
tasks in the queue to run).

Bug: webrtc:12339
Change-Id: Ia1a3eb6932f62881f013fd62b0e008d97d8713cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211863
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33475}
2021-03-16 08:58:15 +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
Yura Yaroshevich
2d9f53ca58 Expose addIceCandidate with completion handler.
Bug: None
Change-Id: I91c15b36e6a63f7a7ee13203de5750d9492c19c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211001
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/master@{#33440}
2021-03-11 16:15:44 +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
Niels Möller
be140b4187 Change ObjCNetworkMonitor::OnPathUpdate to use PostTask
Removes use of AsyncInvoker, replaced with PendingTaskSafetyFlag. The
latter is extended to support creation on a different thread than
where it will be used, and to support stop and restart.

Bug: webrtc:12339
Change-Id: I28b6e09b1542f50037e842ef5fe3a47d15704b46
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211002
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33432}
2021-03-11 11:10:18 +00:00
Abby Yeh
3135772326 Changed setActive of RTCAudio Session, and it's working
Bug: webrtc:12018
Change-Id: I7ee5cf2df406e7a6d0edf1a95a3665c4b1d6958b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/210720
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Abby Yeh <abbyyeh@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33429}
2021-03-11 05:57:25 +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
Yura Yaroshevich
8bfa2756a5 Fix nullability of completion handlers in iOS SDK.
Bug: None
Change-Id: I74d3d976760fd620a8f749a3c187430dbe80ef57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/210961
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33416}
2021-03-10 11:48:04 +00:00
Raman Budny
5265b9367a Add build-id to libjingle_peerconnection_so.so
This is required by Firebase Crashlytics:
https://firebase.google.com/docs/crashlytics/ndk-reports#enable-symbol-uploading

Bug: None
Change-Id: Ie0d2c2e92477df78b26b7e1fc2273589b71efa81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/210965
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33408}
2021-03-09 20:21:23 +00:00
Yura Yaroshevich
92d12707e0 Expose PeerConnection.restartIce in iOS SDK.
Bug: None
Change-Id: I76b95b3182e6b384fd68aecf4210c23459f76d2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209709
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/master@{#33402}
2021-03-08 17:38:54 +00:00
Yura Yaroshevich
d67253532f Expose parameterless setLocalDescription() in iOS SDK.
Parameterless setLocalDescription is used to implement perfect
negotiation algorithm.

Bug: None
Change-Id: I89c39ee175fec5b09d9ca1700ef682e3cf20fe94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209700
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33401}
2021-03-08 16:39:54 +00:00
Niels Möller
c81665cf9d Change AndroidNetworkMonitor::NotifyConnectionTypeChanged to use Invoke
This is consistent with other Notify methods in this class, which
handle callbacks from java using blocking invokes to the network
thread.

This eliminates the use of the deprecated AsyncInvoker class.

Bug: webrtc:12339
Change-Id: Ib2d19b37b8f669df5b97e89d720f6eb6fc9e5517
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209181
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33398}
2021-03-08 09:04:29 +00:00
Yura Yaroshevich
d140c8f43b Added missing nullable annotations to iOS SDK.
Some of the PCF and PC methods are actually return nil, but was by
default annotated as nonnull via NS_ASSUME_NONNULL_BEGIN.

Bug: None
No-Presubmit: True
Change-Id: Ib8b9263452a61241c9e7a16c1807d87bd597c093
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209180
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33384}
2021-03-04 13:22:26 +00:00
Yura Yaroshevich
8cfb287735 Add AV1 encoder&decoder wrappers for iOS SDK.
It is now possible to use AV1 encoder and decoder on iOS and test
them in apps like AppRTCMobile.

Bug: None
Change-Id: Ifae221020e5abf3809010676862eecd9ffeec5e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208400
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33378}
2021-03-03 20:08:17 +00:00
Raman Budny
2ee9415a8c AndroidVideoDecoder: Ignore format updates with zero dimensions
Sometimes c2.qti.vp8.decoder reports format updates with zero frame
width / height right after initialization, that leads to the
precondition check failure made by SurfaceTextureHelper.setTextureSize.
This patch makes AndroidVideoDecoder.reformat to ignore such format
updates so as to continue to use this HW decoder.
It seems to be safe because this decoder singals one more format update
with valid dimensions soon and continue to operate in normal mode.

Bug: webrtc:12492
Change-Id: I5155166637bd2d4247d31e608d714e687e0ad1df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208222
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33332}
2021-02-24 11:37:32 +00:00
Niels Möller
072c0086a9 Reland "Replace RecursiveCriticalSection with Mutex in RTCAudioSession."
This is a reland of f8da43d179

Original change's description:
> Replace RecursiveCriticalSection with Mutex in RTCAudioSession.
>
> Bug: webrtc:11567
> Change-Id: I2a2ddbce57d070d6cbad5a64defb4c27be77a665
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206472
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33259}

Bug: webrtc:11567
Change-Id: I4f7235dd164d8f698fe0bedea8c5dca50849f6d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207432
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33302}
2021-02-19 15:45:33 +00:00
Niels Möller
f4e3e2b83f Delete rtc::Callback0 and friends.
Replaced with std::function.

Bug: webrtc:6424
Change-Id: Iacc43822cb854ddde3cb1e5ddd863676cb07510a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205005
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33281}
2021-02-16 12:41:35 +00:00
Sami Kalliomäki
bdf78cb5bb Bug fixes to EglBase10Impl.getNativeEglContext.
- Use matching config to avoid EGL_BAD_MATCH.
 - Use the same display in both eglMakeCurrent calls to avoid
   EGL_BAD_ACCESS on subsequent calls because the context was not
   successfully unbound.

Bug: webrtc:12471
Change-Id: Ifdf4bd94cdfd14b683959b8703d75a2a46ec1226
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207861
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33279}
2021-02-16 11:41:24 +00:00
Sami Kalliomäki
a33f41bf58 Support getNativeEglContext in EglBase10Impl.
Bug: webrtc:12471
Change-Id: Iac969b4985b4db02c18f07c4b5ec2a787e312560
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207434
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33271}
2021-02-15 16:52:40 +00:00
Niels Moller
51746ce3fe Revert "Replace RecursiveCriticalSection with Mutex in RTCAudioSession."
This reverts commit f8da43d179.

Reason for revert: Appears to break downstream app.

Original change's description:
> Replace RecursiveCriticalSection with Mutex in RTCAudioSession.
>
> Bug: webrtc:11567
> Change-Id: I2a2ddbce57d070d6cbad5a64defb4c27be77a665
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206472
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33259}

TBR=nisse@webrtc.org,kthelgason@webrtc.org,hta@webrtc.org,handellm@webrtc.org

Change-Id: Id9a97068722c7c72fc5d21102298249fd7a7cd9a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11567
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207431
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33268}
2021-02-15 14:52:03 +00:00
Niels Möller
f8da43d179 Replace RecursiveCriticalSection with Mutex in RTCAudioSession.
Bug: webrtc:11567
Change-Id: I2a2ddbce57d070d6cbad5a64defb4c27be77a665
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206472
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33259}
2021-02-15 14:35:38 +00:00
Danil Chapovalov
aee2c6a532 In android video encoder wrapper fill codec-agnostic frame dependencies
These structures are needed to populate dependency descritpor rtp header
extension.

Bug: webrtc:10342
Change-Id: If6bb533544ae3aa718d0e8506bb6d1fa43df345f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206985
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33243}
2021-02-12 09:51:56 +00:00
Peter Kotwicz
ed8abad192 Convert third_party/android_deps:androidx refs to third_party/androidx
Bug: chromium:1064277
Change-Id: I9ebb749159c6d5c854ab2f1d517fa53f8247a5d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206700
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33227}
2021-02-11 08:52:25 +00:00
Artem Titov
d15a575ec3 Use SequenceChecker from public API
Bug: webrtc:12419
Change-Id: I00cca16a0ec70246156ba00b97aa7ae5ccbf5364
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205323
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33220}
2021-02-10 15:04:55 +00:00
Mirko Bonadei
ad8a00d25c Replace casted uses of [OCMArg anyPointer] with [OCMArg anyObjectRef].
Bug: None
Change-Id: Ife427f57b1dea889e6bd7a0b8f2915d93d4a1571
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206643
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33212}
2021-02-10 08:56:17 +00:00
Artem Titov
c8421c4c3e Replace rtc::ThreadChecker with webrtc::SequenceChecker
Bug: webrtc:12419
Change-Id: I825c014cc1c4b1dcba5ef300409d44859e971144
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/205002
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33136}
2021-02-02 14:56:27 +00:00
Dave Cowart
b853d72250 Update Apple device list
Added new apple devices to corresponding enumeration.
Added H264 profile level information.
Previous update was done as part of:
https://webrtc-review.googlesource.com/c/src/+/158744
Device machine names obtained from:
https://gist.github.com/adamawolf/3048717

Change-Id: Ibe71ec525679d34494b579f6da851c2b45b0cd86
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202743
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33119}
2021-02-01 09:35:03 +00:00
Niels Möller
1a29a5da84 Delete rtc::Bind
Bug: webrtc:11339
Change-Id: Id53d17bbf37a15f482e9eb9f8762d2000c772dcc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202250
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33099}
2021-01-29 08:24:43 +00:00
Mirko Bonadei
3b68aa346a Move some RTC_LOG to RTC_DLOG.
Some locations in the WebRTC codebase RTC_LOG the value of the
__FUNCTION__ macro which probably is useful in debug mode. Moving
these instances to RTC_DLOG saves ~10 KiB on arm64.

Bug: webrtc:11986
Change-Id: I5d81cc459d2850657a712b9aed80c187edf49a3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203981
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33086}
2021-01-28 10:05:00 +00:00
Brian Dai
ef53a7fc0b Reset IO thread checker when iOS audio unit stops
In AudioDeviceIOS, when we call Stop() on the VoiceProcessingAudioUnit,
we do not always detach the I/O thread checker in preparation for a new
start. This means that if we start up the VoiceProcessingAudioUnit - and
subsequently a new AURemoteIO thread to deal with I/O operations - the
DCHECK in OnDeliverRecordedData and OnGetPlayoutData will fail. Note
that we want to detach the I/O thread checker regardless of whether
Stop() returns with a success status or not. The success status is
dictated by the iOS function AudioOutputUnitStop. The documentation of
this function does not guarantee that the audio unit will not stop in
the case the function returns with an error code. That is to say, it is
possible the audio unit stops even if the function Stop() returns false.
Therefore, it is safer to prepare the I/O thread checker for a new start
in either case.

Change-Id: Iee50a2457959aff2e6089e9a664c649dc4dbbbd6
Bug: webrtc:12382
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202945
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33063}
2021-01-23 10:22:58 +00:00
philipel
25b8235f03 Remove unused function VideoDecoder::PrefersLateDecoding.
Bug: webrtc:12271
Change-Id: Iaf67df37c0eade8b0b6f38be122530c3d908cf35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201820
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33028}
2021-01-18 14:17:57 +00:00
Mirko Bonadei
e5f4c6b8d2 Reland "Refactor rtc_base build targets."
This is a reland of 69241a93fb

Fix: The problem was related to NO_MAIN_THREAD_WRAPPING, which
affects https://source.chromium.org/chromium/chromium/src/+/master:third_party/webrtc/rtc_base/thread.cc;l=257-263;drc=7acc2d9fe3a6e3c4d8881d2bdfc9b8968a724cd5.
The original CL didn't attach the definition of the macro
NO_MAIN_THREAD_WRAPPING when building for Chromium (which doesn't have
to be related to //rtc_base anymore but to //rtc_base:threading).

Original change's description:
> Refactor rtc_base build targets.
>
> The "//rtc_base:rtc_base" build target has historically been one of the
> biggest targets in the WebRTC build. Big targets are the main source of
> circular dependencies and non-API types leakage.
>
> This CL is a step forward into splitting "//rtc_base:rtc_base" into
> smaller targets (as originally started in 2018).
>
> The only non-automated changes are (like re-wiring the build system):
> * The creation of //rtc_base/async_resolver.{h,cc} which allows to
>   break a circular dependency (is has been extracted from
>   //rtc_base/net_helpers.{h,cc}).
> * The creation of //rtc_base/internal/default_socket_server.{h,cc} to
>   break another circular dependency.
>
> Bug: webrtc:9987
> Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32941}

Bug: webrtc:9987
Change-Id: I7cdf49d2aac8357f1f50f90010bf2c2f62fa19f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202021
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33001}
2021-01-15 17:00:05 +00:00
Niels Möller
b45d3aa30e Update android jni code to use C++ lambdas instead of rtc::Bind
Bug: webrtc:11339
Change-Id: I269bde1933d3f1d7b83b561eb2a09d0f38245e50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201735
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32991}
2021-01-15 09:28:27 +00:00
Mirko Bonadei
7acc2d9fe3 Revert "Refactor rtc_base build targets."
This reverts commit 69241a93fb.

Reason for revert: Breaks WebRTC roll into Chromium.

Original change's description:
> Refactor rtc_base build targets.
>
> The "//rtc_base:rtc_base" build target has historically been one of the
> biggest targets in the WebRTC build. Big targets are the main source of
> circular dependencies and non-API types leakage.
>
> This CL is a step forward into splitting "//rtc_base:rtc_base" into
> smaller targets (as originally started in 2018).
>
> The only non-automated changes are (like re-wiring the build system):
> * The creation of //rtc_base/async_resolver.{h,cc} which allows to
>   break a circular dependency (is has been extracted from
>   //rtc_base/net_helpers.{h,cc}).
> * The creation of //rtc_base/internal/default_socket_server.{h,cc} to
>   break another circular dependency.
>
> Bug: webrtc:9987
> Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32941}

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

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

No-Try: True
Bug: webrtc:9987
Change-Id: I1e36ad64cc60092f38d6886153a94f1a58339256
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201840
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32986}
2021-01-14 21:27:38 +00:00
Sami Kalliomäki
6e509f9167 Handle case createShader throws an exception.
Ensures the state of the class remains correct even if an unhandled
exception is thrown from this method.

Bug: b/176214704
Change-Id: I94504bb8aa4bd2dba45d116d5fa13da070a3b60f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201621
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32963}
2021-01-13 15:50:12 +00:00
Mirko Bonadei
69241a93fb Refactor rtc_base build targets.
The "//rtc_base:rtc_base" build target has historically been one of the
biggest targets in the WebRTC build. Big targets are the main source of
circular dependencies and non-API types leakage.

This CL is a step forward into splitting "//rtc_base:rtc_base" into
smaller targets (as originally started in 2018).

The only non-automated changes are (like re-wiring the build system):
* The creation of //rtc_base/async_resolver.{h,cc} which allows to
  break a circular dependency (is has been extracted from
  //rtc_base/net_helpers.{h,cc}).
* The creation of //rtc_base/internal/default_socket_server.{h,cc} to
  break another circular dependency.

Bug: webrtc:9987
Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32941}
2021-01-11 18:32:30 +00:00
philipel
360da05ed1 Remove webrtc::VideoDecoder::PrefersLateDecoding.
This is just general cleanup.

The assumed behavior is late decoding, and this function is not used to make any decision (except in the deprecated jitter buffer).

Bug: webrtc:12271
Change-Id: Ifb48186d55903f068f25e44c5f73e7a724f6f456
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/200804
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32940}
2021-01-11 18:02:25 +00:00
Niels Möller
6afa794b6e Delete deprecated H264BitstreamParser methods
Bug: webrtc:10439
Change-Id: I1513907f03f9adfcf5657298e69d60519af764ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198121
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32934}
2021-01-11 09:31:54 +00:00
Niels Möller
08d2c2bf46 Delete unneeded dependencies on the Module abstraction
Bug: webrtc:7219
Change-Id: I1bcbab7e30f9964798a093e888b07d758cf226e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198124
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32865}
2020-12-21 09:09:57 +00:00
Mirko Bonadei
c1254e84a5 Make RTC_OBJC_EXPORT respect is_component_build.
While RTC_EXPORT is aware of component builds (selecting "default"
visibility only when WebRTC is built as a shared library),
RTC_OBJC_EXPORT (which predates RTC_EXPORT) was always marking symbols
as "default" visible.

This CL fixes the problem but on the other hand it will require
standalone builds of the WebRTC.framework to set the GN argument
`rtc_enable_symbol_export` to true.

No-Presubmit: True
Bug: chromium:1159620
Change-Id: I4a16f9bd3c1564140a5a30f03b3e77caed1df591
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198082
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#32856}
2020-12-17 15:52:46 +00:00
Ivo Creusen
c25a3a3a1e Use low latency mode on Android O and later.
This CL makes it possible to use a low-latency mode on Android O and later. This should help to reduce the audio latency. The feature is disabled by default and needs to be enabled when creating the audio device module.

Bug: webrtc:12284
Change-Id: Idf41146aa0bc1206e9a2e28e4101d85c3e4eaefc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196741
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32854}
2020-12-17 10:29:21 +00:00
Sam Zackrisson
76443eafa9 Add support for toggling builtin voice processing on iOS
Bug: None
Change-Id: I3b64afdaed4777960124f248840f36598bba2ed4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195443
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32742}
2020-12-02 16:07:01 +00:00
Peter Kotwicz
1afe2be9a9 Update webrtc guava dependency part 2
This CL renames webrtc guava dependencies from
third_party/guava:guava_android_java that I missed in
https://webrtc-review.googlesource.com/c/src/+/195720

BUG=chromium:2560401

Change-Id: I702cdbe10af57070b5a9db3b8f4ba913489fe42e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196181
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32737}
2020-12-02 07:48:34 +00:00
Gaurav Vaish
69662a99d3 Add API Level guard for allowedCapturePolicy
AudioAttributes::getAllowedCapturePolicy was added in API Level 29.
Update WebRtcAudioTrack to add API Level check before using the API.

Bug: webrtc:12250
Change-Id: Ica6604eb1d7fa736a0e64729a022eefcfb7b3020
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195941
Commit-Queue: Gaurav Vaish <gvaish@chromium.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32735}
2020-12-01 22:59:25 +00:00
Peter Kotwicz
625964f6e0 Update webrtc guava dependency
This CL renames webrtc guava dependencies from
third_party/guava:guava_android_java  to
//third_party/android_deps:guava_android_java

This is in preparation for deleting third_party/guava:guava_android_java

BUG=chromium:2560401

No-Presubmit: True
Change-Id: If9227f4ac4d24386896c47eeb38142a76a27a4ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195720
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32730}
2020-12-01 14:54:03 +00:00
Niels Möller
a805dd8b81 Delete objc RTCRtpFragmentationHeader
Bug: webrtc:6471
Change-Id: I1d5f4fc2484c4f37ff8556ac660a1c0d070875f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191443
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32640}
2020-11-19 14:05:48 +00:00
Brad Pugh
f24143d3b0 Add support for turn logging id in ios sdk.
This patch adds support for setting the TURN_LOGGING_ID
in RTCConfig using the ios SDK.

TURN_LOGGING_ID was added to webrtc in
https://webrtc-review.googlesource.com/c/src/+/149829

The intended usage of this attribute is to correlate client and
backend logs.

This change was tested out with duo via wireshark.

Bug: webrtc:10897
Change-Id: Iedbefdc6392c4df203aca08cf750028b450a11ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191340
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Brad Pugh <bradpugh@google.com>
Cr-Commit-Position: refs/heads/master@{#32626}
2020-11-17 22:34:07 +00:00
Niels Möller
11ab77d14f Add transition define RTC_OBJC_HAVE_LEGACY_RTC_RTP_FRAGMENTATION_HEADER
Also tweak presubmit checks to allow changes to RTCMacros.h.

Bug: webrtc:6471
No-Presubmit: True
Change-Id: I19e38e4cb05b831ebd2faa223029f36d45f480ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/193621
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32619}
2020-11-17 13:51:29 +00:00
Danil Chapovalov
06bbeb3398 in Av1 encoder wrapper communicate end_of_picture flag similar to VP9
In particular move end_of_picture flag out of vp9 specific information
since VP9 is not the only codec that can use spatial scalability and
thus need to distinguish layer frame and picture (aka temporal unit).

Bug: webrtc:12167
Change-Id: I0d046d8785fbea55281209ad099738c03ea7db96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/192542
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32588}
2020-11-11 14:00:52 +00:00
Gaurav Vaish
b249d0a905 Allow AudioAttributes to be app/client configurable
WebRtcAudioTrack is hardcoded to configure AudioAttributes with
1. usage=USAGE_VOICE_COMMUNICATIOON
2. contentType=CONTENT_TYPE_SPEECH

This change allows AudioAttributes to be configured via the
 JavaAudioDeviceModule.

Bug: webrtc:12153
Change-Id: I67c7f6e572c5a9f3a8fde674b6600d2adaf17895
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191941
Commit-Queue: Gaurav Vaish <gvaish@chromium.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32583}
2020-11-11 06:18:10 +00:00
Karl Wiberg
c95b939667 Introduce RTC_CHECK_NOTREACHED(), an always-checking RTC_NOTREACHED()
And use it in a few places that were using RTC_CHECK(false) or FATAL()
to do the exact same job. There should be no change in behavior.

Bug: none
Change-Id: I36d5e6bcf35fd41534e08a8c879fa0811b4f1967
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191963
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32567}
2020-11-09 10:47:55 +00:00
Mirko Bonadei
85fae2acc5 Fix -Wrange-loop-analysis.
The new xcode-clang in xcode 12 turns on -Wrange-loop-analysis by
default, this CL tries to fix problems caused by this.

Bug: webrtc:12134
Change-Id: I77fd9a28486690c11dceceafc4d72f131b081788
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191762
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32559}
2020-11-05 15:55:33 +00:00
philipel
c780f25f1a Remove remaining variables related to incomplete frames.
Bug: webrtc:9378, webrtc:7408
Change-Id: I5b26f09a2da13906b421d0bcf615e721b66d4ce7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190860
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32552}
2020-11-04 16:07:43 +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
philipel
1b0d5437c9 Removed _completeFrame since we never allow incomplete frames.
In the old jitter buffer the two VCMVideoProtection modes |kProtectionNone| and |kProtectionFEC| could be set on the jitter buffer for it to not wait for NACK and instead generate incomplete frames. This has not been possible for a long time.

Bug: webrtc:9378, webrtc:7408
Change-Id: I0a2d3ec34d721126c1128306d5fad88314f8d59f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190680
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32513}
2020-10-28 16:00:27 +00:00
Niels Möller
7c85d395d7 Delete unneeded includes of system_wrappers/include/sleep.h
Non-test usage is in modules/audio_device and modules/desktop_capture.

Bug: None
Change-Id: Ie7dd89aa40e6dcfa9e49e1956b87b50fd9f1c227
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190140
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32484}
2020-10-26 09:55:26 +00:00
Daniel.L (Byoungchan Lee)
32026ed79c Reland "Remove placeholder Obj-C headers and use angle-bracketed headers."
This is a reland of 37d41eea04

Original change's description:
> Reland "Remove placeholder Obj-C headers and use angle-bracketed headers."
>
> This is a reland of 6bfad33fd8
>
> Original change's description:
> > Remove placeholder Obj-C headers and use angle-bracketed headers.
> >
> > sdk/objc/Framework/Headers are just a placeholder headers
> > for backward compatibility and I don't think it is really need this for now.
> > Instead, we can generate the framework header in
> > ios/mac_framework_bundle_with_umbrella_header.
> > Also clang supports the -Wquoted-include-in-framework-header warning,
> > and in Xcode 12, it's in Xcode's recommended settings. This warnings
> > can be avoided by replacing double-quoted includes with angle-bracketed
> > includes when generate framework headers.
> >
> > No-Presubmit: True
> > Bug: webrtc:9627, webrtc:11984
> > Change-Id: I3f6258dfa77a5acee669614005b2747feee35e39
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185920
> > Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> > Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#32343}
>
> TBR=tommi@webrtc.org, andersc@webrtc.org
>
> No-Presubmit: True
> Bug: webrtc:9627
> Bug: webrtc:11984
> Change-Id: I8f44232f1a70b8ff2ce6a4b4792f0a18472fcec3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187280
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32429}

TBR=tommi@webrtc.org, andersc@webrtc.org

No-Presubmit: True
Bug: webrtc:9627
Bug: webrtc:11984
Change-Id: Ida92b8864dffaea37d3053d3c00381644988b54e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189781
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32470}
2020-10-22 11:29:48 +00:00
Philipp Hancke
4e8c115960 Reland "introduce an unsupported content description type"
This is a reland of 239f92ecf7

Original change's description:
> introduce an unsupported content description type
>
> This carries around unsupported content descriptions
> (i.e. things where webrtc does not understand the media type
> or protocol) in a special data type so that a rejected content or
> mediasection is added to the answer SDP.
>
> BUG=webrtc:3513
>
> Change-Id: Ifc4168eae11e899f2504649de5e1eecb6801a9fb
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179082
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
> Cr-Commit-Position: refs/heads/master@{#32410}

Bug: webrtc:3513
Change-Id: I48e338100f829f1df5b8165217c89b5ef860fe79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188820
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32457}
2020-10-21 08:20:05 +00:00
Lahiru Ginnaliya Gamathige
1d0e7b6bbe Remove usage of "use_ios_simulator".
This GN variable has been removed by https://chromium-review.googlesource.com/c/chromium/src/+/2476278,
in favour of directly using "target_environment".

Change-Id: I4cfdea8faf3b4dc1e4568c76058520fe1cd52845
Bug: webrtc:12059
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189763
Commit-Queue: Lahiru Ginnaliya Gamathige <glahiru@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32448}
2020-10-20 10:48:08 +00:00
Mirko Bonadei
19640aa61b Switch AppRTCMobile #import headers.
Bug: None
Change-Id: Ia03faae59e4891039fc6c0acdeb51fdfea048c7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189547
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32447}
2020-10-20 07:23:47 +00:00
Niels Möller
d40c764ba8 Delete leftover mention of AsyncInvoker
Bug: None
Change-Id: I8900873f096225fecfbb2115642fa16178078db6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189545
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32440}
2020-10-19 13:10:42 +00:00
Mirko Bonadei
1253aea08e Revert "Reland "Remove placeholder Obj-C headers and use angle-bracketed headers.""
This reverts commit 37d41eea04.

Reason for revert: Sorry for the back and forth here. I need to revert again because I need to fix a downstream project. The re-landing should
be without changes.

Original change's description:
> Reland "Remove placeholder Obj-C headers and use angle-bracketed headers."
>
> This is a reland of 6bfad33fd8
>
> Original change's description:
> > Remove placeholder Obj-C headers and use angle-bracketed headers.
> >
> > sdk/objc/Framework/Headers are just a placeholder headers
> > for backward compatibility and I don't think it is really need this for now.
> > Instead, we can generate the framework header in
> > ios/mac_framework_bundle_with_umbrella_header.
> > Also clang supports the -Wquoted-include-in-framework-header warning,
> > and in Xcode 12, it's in Xcode's recommended settings. This warnings
> > can be avoided by replacing double-quoted includes with angle-bracketed
> > includes when generate framework headers.
> >
> > No-Presubmit: True
> > Bug: webrtc:9627, webrtc:11984
> > Change-Id: I3f6258dfa77a5acee669614005b2747feee35e39
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185920
> > Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> > Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#32343}
>
> TBR=tommi@webrtc.org, andersc@webrtc.org
>
> No-Presubmit: True
> Bug: webrtc:9627
> Bug: webrtc:11984
> Change-Id: I8f44232f1a70b8ff2ce6a4b4792f0a18472fcec3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187280
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32429}

TBR=mbonadei@webrtc.org,andersc@webrtc.org,tommi@webrtc.org,daniel.l@hpcnt.com

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

Bug: webrtc:9627
Bug: webrtc:11984
Change-Id: I006d50c94ad2e336c8a56d49d5ce1c768685f696
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189542
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32432}
2020-10-19 08:32:12 +00:00
Daniel.L (Byoungchan Lee)
37d41eea04 Reland "Remove placeholder Obj-C headers and use angle-bracketed headers."
This is a reland of 6bfad33fd8

Original change's description:
> Remove placeholder Obj-C headers and use angle-bracketed headers.
>
> sdk/objc/Framework/Headers are just a placeholder headers
> for backward compatibility and I don't think it is really need this for now.
> Instead, we can generate the framework header in
> ios/mac_framework_bundle_with_umbrella_header.
> Also clang supports the -Wquoted-include-in-framework-header warning,
> and in Xcode 12, it's in Xcode's recommended settings. This warnings
> can be avoided by replacing double-quoted includes with angle-bracketed
> includes when generate framework headers.
>
> No-Presubmit: True
> Bug: webrtc:9627, webrtc:11984
> Change-Id: I3f6258dfa77a5acee669614005b2747feee35e39
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185920
> Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32343}

TBR=tommi@webrtc.org, andersc@webrtc.org

No-Presubmit: True
Bug: webrtc:9627
Bug: webrtc:11984
Change-Id: I8f44232f1a70b8ff2ce6a4b4792f0a18472fcec3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187280
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32429}
2020-10-17 18:05:28 +00:00
Ilya Nikolaevskiy
ad2ec76387 Revert "introduce an unsupported content description type"
This reverts commit 239f92ecf7.

Reason for revert: Breaks downstream projects.

Original change's description:
> introduce an unsupported content description type
>
> This carries around unsupported content descriptions
> (i.e. things where webrtc does not understand the media type
> or protocol) in a special data type so that a rejected content or
> mediasection is added to the answer SDP.
>
> BUG=webrtc:3513
>
> Change-Id: Ifc4168eae11e899f2504649de5e1eecb6801a9fb
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179082
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
> Cr-Commit-Position: refs/heads/master@{#32410}

TBR=kthelgason@webrtc.org,hta@webrtc.org,philipp.hancke@googlemail.com

Change-Id: I055fe001fe2757d79be7c304eccc43a8e3104f69
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:3513
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188581
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32411}
2020-10-15 10:03:13 +00:00
Philipp Hancke
239f92ecf7 introduce an unsupported content description type
This carries around unsupported content descriptions
(i.e. things where webrtc does not understand the media type
or protocol) in a special data type so that a rejected content or
mediasection is added to the answer SDP.

BUG=webrtc:3513

Change-Id: Ifc4168eae11e899f2504649de5e1eecb6801a9fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179082
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#32410}
2020-10-15 09:28:28 +00:00
Niels Möller
299c839919 Add back AndroidVideoBuffer::CropAndScale
Now compatible with the recently added interface method
VideoFramebuffer::CropAndScale.

Bug: webrtc:11976
Change-Id: I461cf2de1d73ca953fda0ecad84d216b8b7ac879
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187493
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32391}
2020-10-13 14:46:16 +00:00
Ilya Nikolaevskiy
38e9b06151 Reland "Add scaling interface to VideoFrameBuffer"
(Reland with no changes after the fix to the downstream project)

This can be overriden for kNative frame types to perform scaling efficiently.

Default implementations for existing buffer types require actual
buffer implementation, thus this CL also merges "video_frame"
with "video_frame_I420" build targets.

Originally Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186303

(Landing with TBR as it's unchaged reland of already approved CL)
TBR=nisse@webrtc.org,sakal@webrtc.org

Bug: webrtc:11976, chromium:1132299
Change-Id: Ia23f7d3e474bd9cdc177104cc5c6d772f04b210f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187345
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32362}
2020-10-09 08:30:50 +00:00
Ilya Nikolaevskiy
441dbf9a56 Revert "Add scaling interface to VideoFrameBuffer"
This reverts commit c79f1d8cfb.

Reason for revert: Breaks downstream project.

Original change's description:
> Add scaling interface to VideoFrameBuffer
>
> This can be overriden for kNative frame types to perform scaling efficiently.
>
> Default implementations for existing buffer types require actual
> buffer implementation, thus this CL also merges "video_frame"
> with "video_frame_I420" build targets.
>
> Bug: webrtc:11976, chromium:1132299
> Change-Id: I3bf5f6bf179db5e7ab165b1c2301980043a08765
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186303
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Evan Shrubsole <eshr@google.com>
> Cr-Commit-Position: refs/heads/master@{#32352}

TBR=mbonadei@webrtc.org,sakal@webrtc.org,ilnik@webrtc.org,nisse@webrtc.org,stefan@webrtc.org,eshr@google.com

Change-Id: I86ac697bf963ef7e2c4f2ed34c3a7bf04f4f1ce1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11976
Bug: chromium:1132299
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187344
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32354}
2020-10-08 14:16:23 +00:00
Ilya Nikolaevskiy
c79f1d8cfb Add scaling interface to VideoFrameBuffer
This can be overriden for kNative frame types to perform scaling efficiently.

Default implementations for existing buffer types require actual
buffer implementation, thus this CL also merges "video_frame"
with "video_frame_I420" build targets.

Bug: webrtc:11976, chromium:1132299
Change-Id: I3bf5f6bf179db5e7ab165b1c2301980043a08765
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186303
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/master@{#32352}
2020-10-08 13:33:00 +00:00
Mirko Bonadei
f25590e00b Revert "Remove placeholder Obj-C headers and use angle-bracketed headers."
This reverts commit 6bfad33fd8.

Reason for revert: Breaks downstream project.

Original change's description:
> Remove placeholder Obj-C headers and use angle-bracketed headers.
>
> sdk/objc/Framework/Headers are just a placeholder headers
> for backward compatibility and I don't think it is really need this for now.
> Instead, we can generate the framework header in
> ios/mac_framework_bundle_with_umbrella_header.
> Also clang supports the -Wquoted-include-in-framework-header warning,
> and in Xcode 12, it's in Xcode's recommended settings. This warnings
> can be avoided by replacing double-quoted includes with angle-bracketed
> includes when generate framework headers.
>
> No-Presubmit: True
> Bug: webrtc:9627, webrtc:11984
> Change-Id: I3f6258dfa77a5acee669614005b2747feee35e39
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185920
> Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32343}

TBR=mbonadei@webrtc.org,andersc@webrtc.org,tommi@webrtc.org,daniel.l@hpcnt.com

Change-Id: I7a6f72ecb8feebf06ad0fe0ecef071da43b98fca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9627
Bug: webrtc:11984
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/187160
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32344}
2020-10-07 14:31:10 +00:00
Byoungchan Lee
6bfad33fd8 Remove placeholder Obj-C headers and use angle-bracketed headers.
sdk/objc/Framework/Headers are just a placeholder headers
for backward compatibility and I don't think it is really need this for now.
Instead, we can generate the framework header in
ios/mac_framework_bundle_with_umbrella_header.
Also clang supports the -Wquoted-include-in-framework-header warning,
and in Xcode 12, it's in Xcode's recommended settings. This warnings
can be avoided by replacing double-quoted includes with angle-bracketed
includes when generate framework headers.

No-Presubmit: True
Bug: webrtc:9627, webrtc:11984
Change-Id: I3f6258dfa77a5acee669614005b2747feee35e39
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185920
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32343}
2020-10-07 13:45:28 +00:00
Niels Möller
efaa77d80e Delete AllowBlockingCalls and android_media_codec_common.h
Unused since https://webrtc-review.googlesource.com/c/src/+/172721

Bug: None
Change-Id: I06caa65e4517471bb9740469c0e51dbaaa7fc5d5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/186302
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32278}
2020-10-01 16:38:09 +00:00
Philipp Hancke
79d8df021c android: add rollback RTCSdpType
BUG=webrtc:11796,webrtc:11970

Change-Id: I0047c7a050c344ef58735d9d0d6534b1ddf6c4d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184263
Reviewed-by: Taylor <deadbeef@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#32243}
2020-09-30 06:14:57 +00:00
Niels Möller
cce51b628a Delete unused header file sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h
Bug: webrtc:9627
Change-Id: Iac95406dc512480788f222261db5c9b578b36bfa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185810
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32221}
2020-09-29 08:42:02 +00:00
Bin Zhu
66515d6676 Allow clients to provide custom scheduler to AudioModule
Bug: None
Change-Id: Ie80f84c64a43e957d7f8c4b61ac2f1495d292b50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184300
Commit-Queue: Bin Zhu <ricebin@google.com>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32201}
2020-09-25 17:00:28 +00:00
Tomas Gunnarsson
77baeee99e Make MessageHandler be a pure virtual interface.
Bug: webrtc:11908
Change-Id: I35d3c4005d970082bff8c5ff24186aab54205c37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185340
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32194}
2020-09-25 11:44:02 +00:00
Paulina Hensman
3060d33cca Remove instance of IP logging in NetworkMonitorAutoDetect
Bug: b/152283155
Change-Id: I75ce0f2d7107a2c25f5df73a75b505051163399b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185183
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32183}
2020-09-24 10:52:48 +00:00
Erik Språng
ceb44959ca Reland: Wires up WebrtcKeyValueBasedConfig in media engines.
This is a reland of
https://webrtc-review.googlesource.com/c/src/+/174261

Patchset 1 contains the old cl (plus a merge conflict fix).
Later patchets are bufixes: A PeerConnection can be created without a
Call instance (in the case of DataChannel only), so we can't always
use that to fetch the current trials.

Old CL descritpion:

This replaces field_trial:: -based functions from system_wrappers.
Field trials are still used as fallback, but injectable trials are now
possible.

// Since re-land is otherwise unchanged, setting previous reviewers as TBR
TBR=kthelgason@webrtc.org,mbonadei@webrtc.org,stefan@webrtc.org,srte@webrtc.org

Bug: webrtc:11926
Change-Id: I57a9e8c3454f226f77fb93215bcac83da65034b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/185003
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32163}
2020-09-22 16:08:22 +00:00
Ilya Nikolaevskiy
4c87d83d03 Extend I420 frame buffer pool to also create NV12 buffers
Bug: webrtc:11956
Change-Id: I758a28f2755cfa72ad486fbe1f9209f356eb5fa1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184510
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32147}
2020-09-21 09:46:15 +00:00
Artem Titov
5956a17ed6 Revert "Wires up WebrtcKeyValueBasedConfig in media engines."
This reverts commit 591b2ab82e.

Reason for revert: Breaks downstream project

Original change's description:
> Wires up WebrtcKeyValueBasedConfig in media engines.
> 
> This replaces field_trial:: -based functions from system_wrappers.
> Field trials are still used as fallback, but injectable trials are now
> possible.
> 
> Bug: webrtc:11926
> Change-Id: I70f28c4fbabf6d9e55052342000e38612b46682c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174261
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32129}

TBR=mbonadei@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,srte@webrtc.org,perkj@webrtc.org

Change-Id: I3e169149a8b787aa6366bb357abb71794534c63a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11926
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184507
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32132}
2020-09-17 20:17:38 +00:00
Erik Språng
591b2ab82e Wires up WebrtcKeyValueBasedConfig in media engines.
This replaces field_trial:: -based functions from system_wrappers.
Field trials are still used as fallback, but injectable trials are now
possible.

Bug: webrtc:11926
Change-Id: I70f28c4fbabf6d9e55052342000e38612b46682c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174261
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32129}
2020-09-17 16:24:10 +00:00
Mirko Bonadei
aef8a21a69 Reland "Switch from rtc_ios_xctest_test to rtc_test".
This is a reland of https://webrtc-review.googlesource.com/c/src/+/182680,
and it is based on https://chromium-review.googlesource.com/c/chromium/src/+/2414169
which allows to force a "test" to be executed as an XCtest on a build target
basis instead of on a GN args basis like it was happening in
https://webrtc-review.googlesource.com/c/src/+/182680 because that was
causing issues when launching tests on real devices.

Bug: webrtc:11881, webrtc:11937
Change-Id: I4bec7f471cd0f878b6050f266cd0cca3b518d415
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184360
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32126}
2020-09-17 09:14:15 +00:00
Mirko Bonadei
08574aeb44 Revert "Reland "Switch from "rtc_ios_xctest_test" to "rtc_test".""
This reverts commit 60c25a303f.

Reason for revert: Breaks downstream iOS testers.
From an offline discussion, the GN argument is not needed and only
the 3 xctest needs the behavior of that argument. So I am reverting
this one and preparing 2 CLs to properly fix.

Original change's description:
> Reland "Switch from "rtc_ios_xctest_test" to "rtc_test"."
>
> This is a reland of 7a73c772e2
>
> The change to fix the downstream issue is just the switch from
> "test" to "rtc_test" which is a GN template that expands to
> "test".
>
> Original change's description:
> > Switch from "rtc_ios_xctest_test" to "test".
> >
> > Using the "test" GN template instead of the "ios_xctest_test" one we
> > will get iOS support for isolates via MB and GN for free, making it
> > easier to migrate the iOS recipe and fix bugs.webrtc.org/11604.
> >
> > Bug: webrtc:11881
> > Change-Id: I72b90f8494c473fa567e6296caf7a771e4caba92
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182680
> > Reviewed-by: Dirk Pranke <dpranke@google.com>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#32064}
>
> Bug: webrtc:11881
> Change-Id: Ia5338859f4e893b9f19bcca6b26b8cf66d5984e8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183766
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Cr-Commit-Position: refs/heads/master@{#32075}

TBR=mbonadei@webrtc.org,dpranke@google.com,jeffyoon@google.com

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

Bug: webrtc:11881, webrtc:11937
Change-Id: Ie6eea6b2a8ba5c46af40b115c6db4fd0a38a25b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184340
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32112}
2020-09-16 09:17:42 +00:00
Philipp Hancke
daec488749 objc: fix rollback
and add a unit test

BUG=webrtc:11796

Change-Id: I8e73b22f007c15c862faad7ca881d93c14a3a46f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184160
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#32104}
2020-09-15 09:27:08 +00:00
Mirta Dvornicic
8452ea86c5 Synchronize modifications to frame_extra_info_ in jni::VideoEncoderWrapper.
Since https://webrtc-review.googlesource.com/c/src/+/161447,
frame_extra_info_ is modified from both the encoder thread and the
callback thread.

Bug: None
Change-Id: Idece4d19cae6d8363428234721616f6ca6f85832
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184121
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32095}
2020-09-14 11:15:32 +00:00
Taylor Brandstetter
32eb03a1fb Get rid of NetworkMonitorBase helper class.
All it provides is a method to call a signal on the network thread,
so it's not worth the added complexity. Implementations of
NetworkMonitorInterface must hop to the network thread anyway to
guard their members.

Also added some thread annotations to AndroidNetworkMonitor.

Bug: webrtc:9883
Change-Id: I64bb82ea593433f3a52871dbb75eb2ac4f47d69c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181420
Commit-Queue: Taylor <deadbeef@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32087}
2020-09-11 18:22:14 +00:00
Mirko Bonadei
60c25a303f Reland "Switch from "rtc_ios_xctest_test" to "rtc_test"."
This is a reland of 7a73c772e2

The change to fix the downstream issue is just the switch from
"test" to "rtc_test" which is a GN template that expands to
"test".

Original change's description:
> Switch from "rtc_ios_xctest_test" to "test".
>
> Using the "test" GN template instead of the "ios_xctest_test" one we
> will get iOS support for isolates via MB and GN for free, making it
> easier to migrate the iOS recipe and fix bugs.webrtc.org/11604.
>
> Bug: webrtc:11881
> Change-Id: I72b90f8494c473fa567e6296caf7a771e4caba92
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182680
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32064}

Bug: webrtc:11881
Change-Id: Ia5338859f4e893b9f19bcca6b26b8cf66d5984e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183766
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#32075}
2020-09-10 20:03:34 +00:00
Mirko Bonadei
fb39998140 Revert "Switch from "rtc_ios_xctest_test" to "test"."
This reverts commit 7a73c772e2.

Reason for revert: Breaks downstream test.

Original change's description:
> Switch from "rtc_ios_xctest_test" to "test".
> 
> Using the "test" GN template instead of the "ios_xctest_test" one we
> will get iOS support for isolates via MB and GN for free, making it
> easier to migrate the iOS recipe and fix bugs.webrtc.org/11604.
> 
> Bug: webrtc:11881
> Change-Id: I72b90f8494c473fa567e6296caf7a771e4caba92
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182680
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32064}

TBR=mbonadei@webrtc.org,dpranke@google.com,jeffyoon@google.com

Change-Id: Ia4d6257fee42661c10303217980bd0a9126d2709
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11881
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183765
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32068}
2020-09-10 09:53:17 +00:00
Mirko Bonadei
7a73c772e2 Switch from "rtc_ios_xctest_test" to "test".
Using the "test" GN template instead of the "ios_xctest_test" one we
will get iOS support for isolates via MB and GN for free, making it
easier to migrate the iOS recipe and fix bugs.webrtc.org/11604.

Bug: webrtc:11881
Change-Id: I72b90f8494c473fa567e6296caf7a771e4caba92
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182680
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32064}
2020-09-09 20:44:35 +00:00
Philipp Hancke
5152ea5962 objc: add rollback type to RTCSdpType
BUG=webrtc:11796

Change-Id: I98b742d9e154c9521ae7e7548b32d75bd3f584d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183761
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#32063}
2020-09-09 16:07:35 +00:00
Tomas Gunnarsson
abdb470d00 Make MessageHandler cleanup optional.
As documented in webrtc:11908 this cleanup is fairly invasive and
when a part of a frequently executed code path, can be quite costly
in terms of performance overhead. This is currently the case with
synchronous calls between threads (Thread) as well with our proxy
api classes.

With this CL, all code in WebRTC should now either be using MessageHandlerAutoCleanup
or calling MessageHandler(false) explicitly.

Next steps will be to update external code to either depend on the
AutoCleanup variant, or call MessageHandler(false).

Changing the proxy classes to use TaskQueue set of concepts instead of
MessageHandler. This avoids the perf overhead related to the cleanup
above as well as incompatibility with the thread policy checks in
Thread that some current external users of the proxies would otherwise
run into (if we were to use Thread::Send() for synchronous call).

Following this we'll move the cleanup step into the AutoCleanup class
and an RTC_DCHECK that all calls to the MessageHandler are setting
the flag to false, before eventually removing the flag and make
MessageHandler pure virtual.

Bug: webrtc:11908
Change-Id: Idf4ff9bcc8438cb8c583777e282005e0bc511c8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183442
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32049}
2020-09-07 12:57:15 +00:00
Danil Chapovalov
090049c546 Remove usage of webrtc::RTPFragmentationHeader from objc wrappers
Bug: webrtc:6471
Change-Id: Ibe4ce280a9f1aea53016f131d1d235337fe71a4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182502
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32022}
2020-09-01 11:17:36 +00:00
Bin Zhu
ffebf4fe63 update JavaAudioDeviceModule.Builder.build() to return JavaAudioDeviceModule
Bug: None
Change-Id: Iff43debf677ed4a006a8edabde9455566f5cb159
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182580
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Bin Zhu <ricebin@google.com>
Cr-Commit-Position: refs/heads/master@{#32001}
2020-08-26 17:43:37 +00:00
Bin Zhu
12e8511d55 expose MediaProjection
BUG=None

Change-Id: I82f97f02272d882cd2fdc0d9869f2879ba3bbc30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182440
Commit-Queue: Bin Zhu <ricebin@google.com>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31993}
2020-08-25 16:53:40 +00:00
Mirko Bonadei
5923083657 RTC_OBJC_TYPE RTCWrappedNativeVideo{Decoder,Encoder}.
Some versionss of WebKit.framework export these symbols. Even if they
are private symbols, WebRTC needs to provide a way to prefix them like
the OBJC API symbols (see [1]).

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

Bug: None
Change-Id: Ibb9ca2c89796a0d5e2ca65c549ba8799f24bbe7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182421
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31987}
2020-08-25 08:58:29 +00:00
Danil Chapovalov
70b2cf8b36 Delete deprecated version of EncodedImageCallback::OnEncodedImage
Bug: webrtc:6471
Change-Id: I173cd3b3b9f4badaf7c17574adf1d09a926a9b9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182380
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31982}
2020-08-24 11:00:19 +00:00
Rohit Krishnan
f7cf133ad5 Fix h264 decoding on iOS Simulator by not using IOSurface
Bug: None
Change-Id: I8ccd7b82e3303c21221417a6673f6fbd15719428
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182340
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31981}
2020-08-24 09:05:04 +00:00
Taylor Brandstetter
ea7fbfb966 Implement network monitor for iOS.
Notably, this should detect whether an interface is "available" or not,
which should prevent the failure is with dual SIM card setups.

This is gated behind a field trial for now, to ensure this doesn't cause
any regressions due to false negatives (interfaces that are usable
but not listed as available by NWPathMonitor).

Bug: webrtc:10966
Change-Id: Ia3942c4c57b525d08d8b340e2325f3705cfd0304
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180923
Commit-Queue: Taylor <deadbeef@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31977}
2020-08-20 21:46:18 +00:00
Jonas Oreland
93a9d19d4e p2p_transport_channel: Add estimated disconnected time to CandidatePairChangeEvent
This patch adds a computed estimate on how long the ice stack
was disconnected before switching to a new connection.

The metric is currently computed as now - max(connection->last_data_recevied())
and has resonably good precision.

Bug: webrtc:11862
Change-Id: I8950d55f0eadcf164de089cdb715b4f7eed0a4c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182002
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31969}
2020-08-20 11:40:01 +00:00
Harald Alvestrand
7f8b434009 Modify Android API to use SetDirectionWithError
This clears the decks for deprecating and eventually removing
the nonstandard SetDirection method.

Bug: chromium:980879
Change-Id: Ibc291de3db690e9ef4e6cb3550390d7728f02a83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181860
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31948}
2020-08-17 11:55:55 +00:00