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}
This removes PeerConnectionInterface::SetBitrateAllocationStrategy()
plus a ton of now-dead code.
Bug: webrtc:10556
Change-Id: Icfae3bdd011588552934d9db4df16000847db7c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133169
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28523}
This component was added to work around an issue in iOS 8, which is
no longer supported by WebRTC. It's removal is made more urgent by
the fact that it prevents WebRTC being used by iOS extensions.
Bug: webrtc:9335
Change-Id: I2a3327534fe6d5014c34a9e908096d825e8149e3
Reviewed-on: https://webrtc-review.googlesource.com/87822
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24688}
This CL separates the files under sdk/objc into logical directories, replacing
the previous file layout under Framework/.
A long term goal is to have some system set up to generate the files under
sdk/objc/api (the PeerConnection API wrappers) from the C++ code. In the shorter
term the goal is to abstract out shared concepts from these classes in order to
make them as uniform as possible.
The separation into base/, components/, and helpers/ are to differentiate between
the base layer's common protocols, various utilities and the actual platform
specific components.
The old directory layout that resembled a framework's internal layout is not
necessary, since it is generated by the framework target when building it.
Bug: webrtc:9627
Change-Id: Ib084fd83f050ae980649ca99e841f4fb0580bd8f
Reviewed-on: https://webrtc-review.googlesource.com/94142
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24493}
Intention is to make the member private, but downstream callers
must be updated to use the accessor methods first.
Bug: webrtc:9378
Change-Id: I3495bd8d545b7234fbea10abfd14f082caa420b6
Reviewed-on: https://webrtc-review.googlesource.com/82160
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24352}
The JS API supports two operations which have never been implemented in
the iOS counterpart:
- generate a new certificate
- use this certificate when creating a new PeerConnection
Both functions are illustrated in the generateCertificate example code:
- https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/generateCertificate
Currently, on iOS, a new certificate is automatically generated for
every PeerConnection with no programmatic way to set a specific
certificate.
Work sponsored by |pipe|
Bug: webrtc:9498
Change-Id: Ic1936c3de8b8bd18aef67c784727b72f90e7157c
Reviewed-on: https://webrtc-review.googlesource.com/87303
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24276}
After this change, it is only recreated when needed.
This change also clarifies the relation between the compression
session and the pixel buffer pool, and handles invalid sessions
explicitly.
Change-Id: Iae4aa02b60b0d5c153db3ae2d4cd2a0cfa05757b
Bug: webrtc:9562
Reviewed-on: https://webrtc-review.googlesource.com/90403
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24161}
This CL removes //build/config/clang:find_bad_constructs from the
suppressed_configs list, which means that clang:find_bad_constructs
is now enabled on these translation units.
Bug: webrtc:9251, webrtc:163
Change-Id: I6f03c46e772ccf4d15951a4b9d4e12015d539e58
Reviewed-on: https://webrtc-review.googlesource.com/90408
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24113}
BGRA RTCCVPixelBuffers were cropped and scaled incorrectly. Libyuv’s
`ARGBScale` method is used in RTCCVPixelBuffer to scale and crop the
pixel buffer. To crop by `cropX` and `cropY` pixels, pointer
arithmetic is used to offset the src pointer of the original pixel
buffer bytes. There is a bug in how this offset is calculated.
The offset is done by `src += srcStride * _cropY + _cropX`. Libyuv
expects that the src pointer will point to the start of a new pixel.
However, if _cropX is a not a multiple of 4 (4 bytes for BGRA), the src
pointer will point to a byte in the middle of a pixel and thus libyuv
will incorrectly treat the data as the start of pixel (incorrectly
treating the first byte as red when it is actually green, etc...). To
fix this, the src pointer needs to be offset to always point to the
start of a new pixel.
Before this change:
Original Test Gradient image with a cropX of 2:
https://i.imgur.com/gSIgwGV.jpg
Scaled image (notice the colors are incorrect):
https://i.imgur.com/oPxbTEK.jpg
After this change:
Scaled image (notice the colors are correct):
https://i.imgur.com/dqBsmsH.jpg
A new unit test which tests scaling with cropX and cropY values has been
added. The test fails without this change and now passes with the
correct src pointer offsetting.
Bug: webrtc:9555
Change-Id: I87cbd7b91bc139d51fb4e11cc50ccb014cfa8051
Reviewed-on: https://webrtc-review.googlesource.com/89220
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24076}
This changeset adds the ability for API users to enable or disable GCM Cipher
suites from objective-c.
Bug: chromium:713701
Change-Id: I0ac7b60f55dd56bebbcfb315a542ef4843099802
Reviewed-on: https://webrtc-review.googlesource.com/89263
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24028}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script passing top level directories except rtc_base and api
find $@ -type f \( -name \*.h -o -name \*.cc -o -name \*.mm \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I9465c172e65ba6e6ed4e4fdc35b0b265038d6f71
Reviewed-on: https://webrtc-review.googlesource.com/84584
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23697}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
Add a new flag to RtcConfiguration. By setting that flag to true, the
SRTP parameters will be reset whenever the DTLS transports are reset
after every offer/answer negotiation.
The flag is added to Android and Objc wrapper as well.
This should only be used as a workaround for the linked bug, if the
application knows that the other party is affected (for instance,
using a version number).
TBR=sakal@webrtc.org, denicija@webrtc.org
Bug: chromium:835958
Change-Id: I6db025e1c69bf83e1b1908f7df4627430db9920c
Reviewed-on: https://webrtc-review.googlesource.com/83101
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23587}
This is an ObjC followup to https://webrtc-review.googlesource.com/c/src/+/78741.
This CL only adds the field to the API, but does not wire it up.
Bug: webrtc:9341
Change-Id: Id6b1ac681324120bc90158029da7a80bf99aa512
Reviewed-on: https://webrtc-review.googlesource.com/81182
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23524}
This provides an environment for testing out using WebRTC from an iOS
extension. It implements a ReplayKit broadcast extension for live
streaming games and screensharing.
The extension is only supported on iOS 11+ and is guarded by a build
flag.
Bug: webrtc:9335
Change-Id: Id218d6c73ef7599f5953c5a1e0e62e5d0dc4f10b
Reviewed-on: https://webrtc-review.googlesource.com/80000
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23504}
Expose this functionality in the Obj-C SDK to make it nicer to use for
Obj-C clients.
Bug: None
Change-Id: I5cb511af8799ac0fda15153d16f2550b848b93b2
Reviewed-on: https://webrtc-review.googlesource.com/80481
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23488}
This CL adds support targeting iOS 10 as a min version.
Bug: None
Change-Id: I353a9884eb907e97387553fd73427fd7cb0dbfc2
Reviewed-on: https://webrtc-review.googlesource.com/79921
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23461}
This reverts commit fc4a9c9333.
Reason for revert: Remote video is not showing in a video call.
Original change's description:
> Metal rendering should account for cropping.
>
> Also:
> - added a rotation override to allow ignoring frame rotation
> - fixed a couple of minor issues
> - made it possible to run the MTKView without the DisplayLink
>
> Bug: webrtc:9301
> Change-Id: Ia83c152d9b6d45d56ceb80d287b5d3eacfaebddd
> Reviewed-on: https://webrtc-review.googlesource.com/78282
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23452}
TBR=andersc@webrtc.org,kthelgason@webrtc.org,peterhanspers@webrtc.org
Change-Id: Iddf7793368531d2d7268c1ec138bb3a9874a4ab7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9301
Reviewed-on: https://webrtc-review.googlesource.com/80020
Reviewed-by: JT Teh <jtteh@webrtc.org>
Commit-Queue: JT Teh <jtteh@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23455}
Also:
- added a rotation override to allow ignoring frame rotation
- fixed a couple of minor issues
- made it possible to run the MTKView without the DisplayLink
Bug: webrtc:9301
Change-Id: Ia83c152d9b6d45d56ceb80d287b5d3eacfaebddd
Reviewed-on: https://webrtc-review.googlesource.com/78282
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23452}
This removes usage of the old OnFailure methods on CreateSessionDescriptionObserver
and SetSessionDescriptionObserver, so that WebRTC will continue to compile
once all the default implementations are removed.
Bug: chromium:589455
Change-Id: Id67295b3ad0c30d24d79589c2041acdd507a19f3
Reviewed-on: https://webrtc-review.googlesource.com/78480
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23427}
This will return all the fmtp parameters for the codecs, except for
DTMF codes that don't fit the key=value pattern.
Bug: webrtc:7112
Change-Id: I06a203ff64df2c3bc9bc2082cd0f374718b23510
Reviewed-on: https://webrtc-review.googlesource.com/71801
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23250}