This reverts commit a8f13ccad4.
Reason for revert: It's causing no video to be shown after the 1st call.
Original change's description:
> Improve thread-safety of MTL Renderer.
>
> Bug: b/77579859
> Change-Id: I427d0f41593155dc5cbf98a09d7ec826497b803c
> Reviewed-on: https://webrtc-review.googlesource.com/67040
> Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22795}
TBR=andersc@webrtc.org,kthelgason@webrtc.org
Change-Id: Ia8f33995e087178f1c3be7753f70be8ba18447f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/77579859
Reviewed-on: https://webrtc-review.googlesource.com/68860
Reviewed-by: JT Teh <jtteh@webrtc.org>
Commit-Queue: JT Teh <jtteh@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22800}
Implement debugQuickLookObject for RTCI420Buffers and RTCCVPixelBuffers.
Also draw gradients consistently regardless of endianness in the unit
tests for RTCCVPixelBuffers and ObjCVideoTrackSource.
Bug: webrtc:9007
Change-Id: Ia5a3d0905a763efc190165471983061fc07551f2
Reviewed-on: https://webrtc-review.googlesource.com/64987
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22746}
The settings struct specifies bitrate in kbps, but we are
treating it as bps.
Bug: webrtc:9113
Change-Id: I27745da93aaec68041ea4283b45eccb35d820793
Reviewed-on: https://webrtc-review.googlesource.com/66960
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22743}
This parameter is being removed from the C++ API, remove it from the
ObjC API also. It was never used for anything by the H264 decoder.
Bug: webrtc:9107
Change-Id: I5222eac932a4e7d4129d803f8126b5e8d0b027b6
Reviewed-on: https://webrtc-review.googlesource.com/66740
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22730}
This is a reland of 4ea50c2b42
Original change's description:
> Add unit tests for RTCCVPixelBuffer and ObjCVideoTrackSource.
>
> This CL also fixes a couple of bugs found in the toI420 method for
> RTCCVPixelBuffers backed by RGB CVPixelBuffers.
>
> Bug: webrtc:9007
> Change-Id: I19ab8177f4b124a503cfda9f0166bd960f668982
> Reviewed-on: https://webrtc-review.googlesource.com/64940
> Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22656}
Bug: webrtc:9007
Change-Id: I2a787c64f8d23ffc4ef2419fc258d965f8a9480b
Reviewed-on: https://webrtc-review.googlesource.com/66341
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22706}
This reverts commit 4ea50c2b42.
Reason for revert: This change is causing crashes in video calls.
RTCCVPixelBuffer.mm - line 120
Compare is asserting as 420f is not 420v
Original change's description:
> Add unit tests for RTCCVPixelBuffer and ObjCVideoTrackSource.
>
> This CL also fixes a couple of bugs found in the toI420 method for
> RTCCVPixelBuffers backed by RGB CVPixelBuffers.
>
> Bug: webrtc:9007
> Change-Id: I19ab8177f4b124a503cfda9f0166bd960f668982
> Reviewed-on: https://webrtc-review.googlesource.com/64940
> Commit-Queue: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22656}
TBR=andersc@webrtc.org,kthelgason@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:9007
Change-Id: I500514ce05dd0555f8c4a05010ad52bd67c2fed3
Reviewed-on: https://webrtc-review.googlesource.com/65561
Commit-Queue: JT Teh <jtteh@webrtc.org>
Reviewed-by: JT Teh <jtteh@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22686}
This CL also fixes a couple of bugs found in the toI420 method for
RTCCVPixelBuffers backed by RGB CVPixelBuffers.
Bug: webrtc:9007
Change-Id: I19ab8177f4b124a503cfda9f0166bd960f668982
Reviewed-on: https://webrtc-review.googlesource.com/64940
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22656}
This flag (added to CryptoOptions) will allow applications to opt-in to
use of this suite, before it's disabled by default later. See bug for
more details.
TBR=magjed@webrtc.org
Bug: webrtc:7670
Change-Id: I800bedd4b26d807b6b7ac66b505d419c3323e454
Reviewed-on: https://webrtc-review.googlesource.com/64390
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22586}
Demonstrates how to use the iOS native API to wrap components into
C++ classes.
This CL also introduces a native API wrapper for the capturer.
The C++ code is forked from the corresponding CL for Android at
https://webrtc-review.googlesource.com/c/src/+/60540
Bug: webrtc:8832
Change-Id: I12d9f30e701c0222628e329218f6d5bfca26e6e0
Reviewed-on: https://webrtc-review.googlesource.com/61422
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22484}
Add native api conversions for video frames and video renderer. This
also requires some changes to sdk/BUILD to avoid cyclic dependencies.
Bug: webrtc:8832
Change-Id: Ibf21e63bdcae195dcb61d63f9262e6a8dc4fa790
Reviewed-on: https://webrtc-review.googlesource.com/57142
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22340}
The naming convention according to the spec is stream id, not stream
labels.Changing things now to be spec compliant, before it is widely
used. This also includes changes to objective C wrapper code to be in
sync with the change.
Bug: webrtc:7932
Change-Id: I5705e6d8a647aaeed860316466a7320132f24b00
Reviewed-on: https://webrtc-review.googlesource.com/59301
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22316}
This removes the routing for the deprecated audio control setting
Change-Id: Id83ff548625279d5b34c9e3cadc097c25a00ef05
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/58900
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22279}
This CL adds wrappers for the following PeerConnection native
APIs to the Objective C API:
- SdpSemantics enum added to the RTCConfiguration
- RTCRtpTransceiver
- RTCPeerConnection.addTrack
- RTCPeerConnection.removeTrack
- RTCPeerConnection.addTransceiver
- RTCPeerConnection.transceivers
Bug: webrtc:8870
Change-Id: I9449df9742a59e90894712dc7749ca30b569d94b
Reviewed-on: https://webrtc-review.googlesource.com/54780
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22214}
Summary:
The implementation of H264AnnexBBufferHasVideoFormatDescription was
assuming that the SPS NALU is either the first NALU in the stream, or
the second one, in case an AUD NALU is present in the first location.
This change removes this assumption and instead searches for the SPS
NALU, failing only if we can't find one.
In addition, it cleans up some binary buffer manipulation code, using the
the parsed NALU indices we already have in AnnexBBufferReader instead.
Test Plan: Unit tests
Change-Id: Id9715aa1d751f0ba1a1992def2b690607896df56
bug: webrtc:8922
Change-Id: Id9715aa1d751f0ba1a1992def2b690607896df56
Reviewed-on: https://webrtc-review.googlesource.com/49982
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22205}
After https://webrtc-review.googlesource.com/c/src/+/49060 changed the
gn check config for sdk/.
Add nogncheck for some conditionally imported headers.
Bug: webrtc:7925
Change-Id: I57499e990332636991563c6f550a7c9154e7c2ee
Reviewed-on: https://webrtc-review.googlesource.com/54820
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22083}
It turns out that some headers were not owned by any targets.
These were:
RTCVideoCodec.h
RTCVideoCodecFactory.h
RTCVideoCodecH264.h
RTCVideoEncoderVP8.h
RTCVideoDecoderVP8.h
RTCVideoEncoderVP9.h
RTCVideoDecoderVP9.h
And some were owned by multiple targets, namely:
RTCPeerConnectionFactory+Native.h
RTCPeerConnectionFactory+Private.h
RTCVideoFrameBuffer.h
These have all been moved to their appropriate homes.
This CL also fixes a lot of cyclic interdependencies in the iOS sdk build files.
Bug: webrtc:8855
Change-Id: I1b7ddb6c2a93868d1510ccf0a64bd3dd169ec3e7
Reviewed-on: https://webrtc-review.googlesource.com/49060
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22052}
The reference back to the decoder class in the decode callback
was null. Due to the amazing properties of ObjC this led to the
setError call to silently fail.
Bug: webrtc:8600
Change-Id: I3f70fbe4c9d533c8612d0bc7bc40813252e492fd
Reviewed-on: https://webrtc-review.googlesource.com/52460
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22021}
This reverts commit 6780c51b23.
Reason for revert:
More details in crbug.com/810292
Original change's description:
> Use SRTP_AES128_CM_SHA1_80 by default instead of SRTP_AES128_CM_SHA1_32.
>
> A field has been added to "CryptoOptions" to enable SRTP_AES128_CM_SHA1_32
> from native apps if really necessary.
>
> R=deadbeef@webrtc.org
>
> Bug: webrtc:7670
> Change-Id: I36b6ab3e302fbf3cda2611ff196757e43a56e704
> Reviewed-on: https://webrtc-review.googlesource.com/41420
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Joachim Bauch <jbauch@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21952}
TBR=deadbeef@webrtc.org,magjed@webrtc.org,jbauch@webrtc.org
Change-Id: I643dbe023eca526f2cda4d97df045f2533741dd4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7670
Reviewed-on: https://webrtc-review.googlesource.com/49880
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21961}
A field has been added to "CryptoOptions" to enable SRTP_AES128_CM_SHA1_32
from native apps if really necessary.
R=deadbeef@webrtc.org
Bug: webrtc:7670
Change-Id: I36b6ab3e302fbf3cda2611ff196757e43a56e704
Reviewed-on: https://webrtc-review.googlesource.com/41420
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Joachim Bauch <jbauch@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21952}
The bug 8432 is caused by trying to connect through a
"link-local" interface (IP address 169.254.0.x/16),
which is listed among the iPhone network interfaces.
The bug is not happening if the link-local network interfaces
are skipped in the ICE candidate gethering process.
To control this behaviour an option - disable_link_local_networks -
is added inside the RTCConfiguration.
It is used to set the new BasicPortAllocatorSession flag -
PORTALLOCATOR_DISABLE_LINK_LOCAL_NETWORKS.
The port allocator flag is added if the configuration option is set.
IPIsLinkLocal IPAddress function and its friends (IPIsLoopback, IPIsPrivate)
are refactored to work on both IPv4 and IPv6.
Unit test IPIsLinkLocal.
Bonus: fix a bug in IPIsLinkLocalV6:
take into account just 10 network mask bits instead of 16.
Bug: webrtc:8432
Change-Id: Ibe8f677a36098057b7fcad5c798380727b23359b
Reviewed-on: https://webrtc-review.googlesource.com/36380
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21922}
This target is deprecated and downstream projects have been updated.
This CL replaces https://webrtc-review.googlesource.com/c/src/+/46521
Bug: webrtc:8470
Change-Id: Icf4696c946fd0a1aeeb687c4960586ba0cc52dc0
Reviewed-on: https://webrtc-review.googlesource.com/48362
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21908}
These files were copied to Native/src but were kept around for
downstream projects that included them from their old locations.
Downstream projects have been updated so these can now be removed.
Bug: webrtc:8832
Change-Id: Ic28dc13e4b5bfced4b97ee872068683785d04bb3
Reviewed-on: https://webrtc-review.googlesource.com/47860
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21892}
This can be used to wrap Objective-C components in C++ classes, so users
can use the WebRTC C++ API directly together with the iOS specific
components provided by our SDK.
Bug: webrtc:8832
Change-Id: I6d34f7ec62d51df8d3a5340a2e17d30ae73e13e8
Reviewed-on: https://webrtc-review.googlesource.com/46162
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21850}
Building with the newly published cocoapod generated a few warnings,
which looked a bit bad.
Bug: webrtc:8831
Change-Id: I70c06930603b328e4d11c599a5b5dd77b45150c6
Reviewed-on: https://webrtc-review.googlesource.com/46163
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21846}
This CL adds a GN build flag to include builtin software codecs
(enabled by default).
When setting the flag to false, libvpx can also be excluded. The
benefit is that the resulting binary is smaller.
Replaces https://webrtc-review.googlesource.com/c/src/+/29203
Bug: webrtc:7925
Change-Id: Id330ea8a43169e449ee139eca18e4557cc932e10
Reviewed-on: https://webrtc-review.googlesource.com/36340
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21818}
This makes it possible to only inject 1 or 0 video codec factories when
consuming the API using the PeerConnectionFactory+Native header.
Bug: webrtc:7925
Change-Id: I671d8dcdbdf2198a31f3890ff6b416441bd32d48
Reviewed-on: https://webrtc-review.googlesource.com/42661
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21715}
This allows a user to only injecting the decoder or encoder factory.
This behavior also matches how it is implemented for Android.
Bug: webrtc:7925
Change-Id: I3dfca6ea2eaeea437b5b78da2373bd6f7cedc8fa
Reviewed-on: https://webrtc-review.googlesource.com/40860
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21695}
Expose RTCDtmfSender API for ObcC SDK via exising RTCRtpSender
to provide ability to use DTMF tones in ObjC apps which uses WebRTC.
Android SDK has already exposed DTMF API via Java's DtmfSender
object, there changes provide similar functionaly to ObjC SDK.
Bug: webrtc:8713
Change-Id: Id68fddbbc362211dc8032fa31b38812d1cff8ed9
Reviewed-on: https://webrtc-review.googlesource.com/35800
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21505}
Exposed setOptions API for iOS SDK via RTCPeerConnectionFactory method
to provide ability to disable encryption and control which network
adapters are ignored.
Only subset of webrtc::PeerConnectionFactoryInterface::Options options
are exposed via iOS SDK, additional options can be exposed as requested.
Android SDK has already exposed setOption API via Java's PeerConnection
constructor, there changes provide similar functionaly to iOS SDK.
Bug: webrtc:8712
Change-Id: Ia2de38cf382afc1bad9bbec6c6eac21ad29aee89
Reviewed-on: https://webrtc-review.googlesource.com/34900
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21504}
The H264 encoder defaults to using the kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
pixel format. If the frames coming into the encoder is RTCCVPixelBuffer frames,
we check the pixel format in the contained CVPixelBuffer and send the same format
to the encoder when possible, by switching the encoder's pixel format. When we
receive frames with buffers conforming to the RTCI420Buffer protocol, we copy
the frame contents to the target pixel buffer, hardcoded to be the default NV12.
This works except when switching incoming frames from RTCCVPixelBuffer frames to
I420 frames during runtime. If we received RTCCVPixelBuffers wrapping e.g. an
RGB CVPixelBuffer, the encoder's pixel format have been changed to RGB. If we
now get incoming frames in I420, we must convert these to RGB instead of NV12
to match the encoder's format.
This bug can be triggered by calling `[_localVideoTrack setIsEnabled:NO]` in
`ARDAppClient.m`. This will make the stream start sending black i420 frames to
the encoder.
This CL fixes this by resetting the compression session with the default NV12
format if the input frame type changes from native to I420.
Bug: webrtc:8638
Change-Id: I5d784d204b7b1d09313a0f4cea6302ea72e9ed94
Reviewed-on: https://webrtc-review.googlesource.com/33260
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21382}
Using fully qualified paths to include libyuv headers allows WebRTC to
avoid to rely on the //third_party/libyuv:libyuv_config target to
set the -I compiler flag.
Today some WebRTC targets depend on //third_party/libyuv only to
include //third_party/libyuv:libyuv_config but with fully qualified
paths this should not be needed anymore.
A follow-up CL will remove //third_party/libyuv from some targets that
don't need it because they are not including libyuv headers.
Bug: webrtc:8605
Change-Id: Icec707ca761aaf2ea8088e7f7a05ddde0de2619a
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/28220
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21209}
This means we will properly request a new keyframe if decoding fails.
Bug: webrtc:8600
Change-Id: Id213686f016c5418bf04b2ee68bd19dbbe1ea954
Reviewed-on: https://webrtc-review.googlesource.com/28101
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21036}
This fixes a bug where AppRTCMobile would crash at runtime when
built without VP9 support.
Bug: webrtc:8602
Change-Id: Id2db79c3ff8136f06dc049afcc5197e9356fd25b
Reviewed-on: https://webrtc-review.googlesource.com/27983
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20982}