Commit graph

1319 commits

Author SHA1 Message Date
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