Also, make the iOS audio unittests not run on the simulator by default,
and if someone wants to run the tests one can do
by using the WEBRTC_IOS_RUN_AUDIO_TESTS environment variable.
Bug: webrtc:7812
Change-Id: Ie9fc70872c6617516e2f2c21039489df309b85fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292621
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39306}
The test is already disabled on iOS < 16 and fails on iOS 16 with this error:
/../../sdk/objc/unittests/RTCCameraVideoCapturerTests.mm:556: error: -[RTCCameraVideoCapturerTestsWithMockedCaptureSession testStartCaptureSetsOutputDimensionsInvalidPixelFormat] : ((width) equal to ([output.videoSettings[(id)kCVPixelBufferWidthKey] intValue])) failed: ("110") is not equal to ("0")
https://chromium-swarm.appspot.com/task?id=5fc0ac239b2dd110
Change-Id: Ia0a5c4290261b204d5e369dfc62113268ef48127
Bug: webrtc:14829, b/264630045
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290895
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39130}
This is required by some virtual cameras, like Snap Camera from
Snapchat.
Bug: webrtc:14783
Change-Id: I3d841936c17f3f227af9a94a4c3b0f37940d43b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288361
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39073}
See commit
https://webrtc.googlesource.com/src/+/c8a6fb2bb8762de17008dee97c5fb6e762f7e056
where the setup methods for RTCCameraVideoCaptureTests' test cases were
lost. Both "setup" where XCTest instead looks for "setUp", and
"setupWithMockedCaptureSession" which isn't called explicitly anywhere.
This commit splits the old RTCCameraVideoCaptureTests into two;
RTCCameraVideoCaptureTests for tests using "setup", and
RTCCameraVideoCaptureTestsWithMockedCaptureSession for tests using
"setupWithMockedCaptureSession".
Bug: webrtc:8382
Change-Id: I64cefff744e12f62d65e04133512de1e10d17d95
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288601
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38931}
The default implementation of CropAndScale uses ToI420() and then Scale,
and this implementation behaves inefficiently with RTCCVPixelBuffer.
Bug: None
Change-Id: I422ef80d124db0354a2e696892e882a78db445bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271140
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37877}
These tests were failing on mac-11 machines but seem to do fine on mac-12.
Bug: webrtc:13989,webrtc:13991
Change-Id: I11fb2302046fbb06b0824a4adc543a446405991b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272363
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#37843}
This reverts commit 181ea6e414.
Reason for revert: Breaks downstream project. Kári will help to land it next week.
Original change's description:
> Add a prefix for objc category.
>
> According to the Google Objective-C style [1], category names should
> start with an appropriate prefix. WebRTC has some category definitions
> for system interfaces, but it doesn't use prefixes.
>
> $ otool -ov WebRTC.framework/WebRTC | grep -E "^[0-9a-z]{16} 0x[0-9a-z]+ __OBJC_._CATEGORY" | grep -v "_RTC"
> 0000000002160840 0x217c3c0 __OBJC_$_CATEGORY_UIDevice_$_H264Profile
> 0000000002160850 0x21808b8 __OBJC_$_CATEGORY_AVCaptureSession_$_DevicePosition
> 0000000002160858 0x2180968 __OBJC_$_CATEGORY_NSString_$_StdString
> 0000000002160860 0x21809c8 __OBJC_$_CATEGORY_NSString_$_AbslStringView
>
> To avoid conflicts, prefix the names and methods of those categories.
> Also remove sdk/objc/Framework/Classes/Common/NSString+StdString.h as
> it is not used by any other files.
>
> [1] https://google.github.io/styleguide/objcguide.html#category-naming
>
> Bug: webrtc:13884
> Change-Id: I2cf2742af198ab4e0bfb15c0476d72971e50ceee
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262341
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36880}
Bug: webrtc:13884
Change-Id: I85257088e4a3a62e01ff925ab5e77af83b078ef3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262420
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Auto-Submit: Artem Titov <titovartem@webrtc.org>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36885}
According to the Google Objective-C style [1], category names should
start with an appropriate prefix. WebRTC has some category definitions
for system interfaces, but it doesn't use prefixes.
$ otool -ov WebRTC.framework/WebRTC | grep -E "^[0-9a-z]{16} 0x[0-9a-z]+ __OBJC_._CATEGORY" | grep -v "_RTC"
0000000002160840 0x217c3c0 __OBJC_$_CATEGORY_UIDevice_$_H264Profile
0000000002160850 0x21808b8 __OBJC_$_CATEGORY_AVCaptureSession_$_DevicePosition
0000000002160858 0x2180968 __OBJC_$_CATEGORY_NSString_$_StdString
0000000002160860 0x21809c8 __OBJC_$_CATEGORY_NSString_$_AbslStringView
To avoid conflicts, prefix the names and methods of those categories.
Also remove sdk/objc/Framework/Classes/Common/NSString+StdString.h as
it is not used by any other files.
[1] https://google.github.io/styleguide/objcguide.html#category-naming
Bug: webrtc:13884
Change-Id: I2cf2742af198ab4e0bfb15c0476d72971e50ceee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262341
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36880}
The tests in rtc_unittests_objc are old gtest based tests and
The tests in sdk_unittests are XCTest based tests.
The objc tests in rtc_unittest are causing problems [1],
so I think it's time to combine the two types of objc tests.
Renaming the files to match the existing sdk_unittests and
removing the use of gtest helper functions (eg, EXPECT_EQ)
are planned for follow-up CLs.
[1] https://webrtc-review.googlesource.com/c/src/+/261724/9
Bug: webrtc:8382
Change-Id: I9308b35f654c4479c9df72bf7cd7f4032e267eb2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262380
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36878}
In https://webrtc-review.googlesource.com/c/src/+/244420,
I added sanity check of RTCVideoFrame in RTCMTLVideoView, but I forgot
to modify the related tests.
Fix this by adding the appropriate property stubs to RTCVideoFrame stubs
created in RTCMTLVideoViewTests.
Bug: webrtc:13990, webrtc:13490
Change-Id: I21f0f75cd052e4255e1eee5f39ffdd50c2f8e61b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260420
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#36714}
This is a reland of 325789c457
Original change's description:
> Mark all bool conversion operators as explicit
>
> An explicit bool conversion operator will still be used implicitly
> when an expression appears in "bool context", e.g., as the condition
> in an if statement, or as argument to logical operators. The
> `explicit` annotation prevents conversion in other contexts, e.g.,
> converting both a and b to bool in an expression like `a == b`.
>
> Bug: None
> Change-Id: I79ef35b1ea831e6011ae472900375ae8a3e617ab
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250664
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35927}
Bug: None
Change-Id: Ie057dfc8c0b5c498e2c8daff7620172c89f0e011
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251380
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35962}
This reverts commit 325789c457.
Reason for revert: Breaks downstream clients.
Original change's description:
> Mark all bool conversion operators as explicit
>
> An explicit bool conversion operator will still be used implicitly
> when an expression appears in "bool context", e.g., as the condition
> in an if statement, or as argument to logical operators. The
> `explicit` annotation prevents conversion in other contexts, e.g.,
> converting both a and b to bool in an expression like `a == b`.
>
> Bug: None
> Change-Id: I79ef35b1ea831e6011ae472900375ae8a3e617ab
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250664
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35927}
TBR=mbonadei@webrtc.org,nisse@webrtc.org,tommi@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I392cd0c7bd96c90e0db20831864418adb7d58bc3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251080
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35929}
An explicit bool conversion operator will still be used implicitly
when an expression appears in "bool context", e.g., as the condition
in an if statement, or as argument to logical operators. The
`explicit` annotation prevents conversion in other contexts, e.g.,
converting both a and b to bool in an expression like `a == b`.
Bug: None
Change-Id: I79ef35b1ea831e6011ae472900375ae8a3e617ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250664
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35927}
Because rtc::Thread inherits from TaskQueueBase, it already implements
a pair of PostTask/PostDelayedTask methods that we want to keep. But in
addition to those, rtc::Thread defines its own PostTask/PostDelayedTask
using templates. These are the versions that we want to deprecate.
They were originally implemented prior to rtc::Thread inheriting from
TaskQueueBase. We want to deprecate them because...
- We don't want to have multiple code paths that do the same thing.
- We want to move away from rtc::Thread to TaskQueueBase long-term.
- These versions are not overridable in Chromium.
- These versions don't have high/low precision versions of PDT.
Helper methods are added to rtc::Thread so that callers don't have to
wrap every lambda in webrtc::ToQueuedTask() and update dependencies.
Bug: webrtc:13582
Change-Id: I58702c53f4cb3705681bd9f1ea16b7aaa5052c18
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247660
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Markus Handell <handellm@google.com>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35750}
Updates all webrtc code, to have a small followup cl to just add the
"explicit" keyword. Patchset #24 passed all webrtc tests, with explicit.
Bug: webrtc:13464
Change-Id: I39863d3752f73209b531120f66916dc9177bf63a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242363
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35718}
The default value of sdpSemantics is about to change from PlanB to
UnifiedPlan. In order not to cause subtle bugs by applications that
depend on the default value being PlanB, we are temporarily making the
default NotSpecified. Constructing with NotSpecified causes the C++
layer to crash (https://webrtc-review.googlesource.com/c/src/+/242968).
This is in accordance to the publically announced plans:
https://groups.google.com/u/1/g/discuss-webrtc/c/SdoVP02eUIk
Bug: webrtc:11121
Change-Id: Idbb8fd0f5c224311cf1f25ac2832800124ed14d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246060
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35678}
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}
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}
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}
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}
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}
This CL introduced 2 new macros that affect the WebRTC OBJC API symbols:
- RTC_OBJC_TYPE_PREFIX:
Macro used to prepend a prefix to the API types that are exported with
RTC_OBJC_EXPORT.
Clients can patch the definition of this macro locally and build
WebRTC.framework with their own prefix in case symbol clashing is a
problem.
This macro must only be defined by changing the value in
sdk/objc/base/RTCMacros.h and not on via compiler flag to ensure
it has a unique value.
- RCT_OBJC_TYPE:
Macro used internally to reference API types. Declaring an API type
without using this macro will not include the declared type in the
set of types that will be affected by the configurable
RTC_OBJC_TYPE_PREFIX.
Manual changes:
https://webrtc-review.googlesource.com/c/src/+/173781/5..10
The auto-generated changes in PS#5 have been done with:
https://webrtc-review.googlesource.com/c/src/+/174061.
Bug: None
Change-Id: I0d54ca94db764fb3b6cb4365873f79e14cd879b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173781
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31153}