Commit graph

634 commits

Author SHA1 Message Date
Andreas Pehrson
d100a589c8 Add dimensions to video settings in objc sdk camera backend.
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}
2023-01-11 13:59:37 +00:00
Philipp Hancke
b81823a5f0 stats: use Timestamp instead of uint64_t
making it clear what unit is being used.

BUG=webrtc:13756

Change-Id: I6354d35a8e02bb93a905ccf32cb0b294b4813e41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289460
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39008}
2023-01-05 08:37:31 +00:00
Andreas Pehrson
8bec181bfc Finish converting RTCCameraVideoCapturerTests to XCTest
Failed gunit assertions in these XCTestCase classes cannot result in
failed tests.

Bug: webrtc:8382
Change-Id: I47b50b74f60029fafeff4ca885775482a85dfdd3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288603
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38995}
2023-01-04 10:16:43 +00:00
Andreas Pehrson
8ce2fc1448 Add back lost RotationCamera tests
Lost in
https://webrtc.googlesource.com/src/+/c8a6fb2bb8762de17008dee97c5fb6e762f7e056

Bug: webrtc:8382
Change-Id: Ic9abd5d2b5d2593354e759c328b423ba272c8b9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288700
Reviewed-by: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.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@{#38991}
2023-01-04 05:38:46 +00:00
Andreas Pehrson
7e176c41b9 Get RTCCameraVideoCapturerTests working again
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}
2022-12-20 15:02:33 +00:00
Mike Woodworth
cca2c0e6bb fixes crash caused by race derefing pixelbufferpool ivar while being destroyed and replaced by format change
removes cached pixelbufferpool and instead retrieves current pool from the compressionSession each time (as recommended by apple docs)

Bug: webrtc:14688
Change-Id: I2244e69e7f32b912021db0905b9d5867d0bf6357
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284240
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38920}
2022-12-20 10:22:52 +00:00
Per Kjellander
e0b4cab69c Remove default enabled field trial WebRTC-SendSideBwe-WithOverhead
Bug: webrtc:6762
Change-Id: I520188a13ee5f50c441226574ccb3df54f842835
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285300
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38783}
2022-11-30 20:19:36 +00:00
Per Kjellander
d6b330ea77 Remove unused field trial string kRTCFieldTrialAudioForceNoTWCCKey
Bug: webrtc:8243
Change-Id: I9c24999e44a749669208e19574d1251dcbd22d77
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284941
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38727}
2022-11-24 15:11:55 +00:00
Henrik Boström
1bef09708a Delete api/stats_types.h in favor of api/legacy_stats_types.h
The file was renamed, see
https://groups.google.com/u/1/g/discuss-webrtc/c/ZQiP4f_bpw4

Bug: webrtc:14180
Change-Id: Ia76c85ba7d9da6b3a93d0a67a4b6a5187e07e230
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283084
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38616}
2022-11-14 12:10:06 +00:00
Henrik Boström
f36d607c4a Remove the possibility to disable IPv6 in Java and ObjC.
It's deprecated and has been removed from Chrome. Let's follow suite.

// Passing all but unrelated bots
NOTRY=True

Bug: webrtc:14608
Change-Id: I6f2601af5b1dc08164230ebf15db2d2f1754f9e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280740
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38488}
2022-10-27 19:45:58 +00:00
Mirko Bonadei
9d9c2d5795 Make header files self contained.
This CL adds #includes to header files in order to make them
self contained after the preprocessor pass.

Bug: b/251890128
Change-Id: I81c3ba38fb8ab8a2bbd151ba99aa871fae9f1b1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278422
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38327}
2022-10-08 08:38:36 +00:00
Peter Hanspers
1a59cb6108 Renamed methods.
Renaming inputSampleRate, outputSampleRate, terminate to avoid triggering Apple's private API check.

Change-Id: I9857fb374bf30c4a6ef937fb183ef4858af7e0c1
Bug: webrtc:14193
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275641
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38094}
2022-09-15 14:08:22 +00:00
Danil Chapovalov
9e09a1f327 Replace Thread::Invoke with Thread::BlockingCall
BlockingCall doesn't take rtc::Location parameter and thus most of the dependencies on location can be removed

Bug: webrtc:11318
Change-Id: I91a17e342dd9a9e3e2c8f7fbe267474c98a8d0e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274620
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38045}
2022-09-09 10:44:17 +00:00
Danil Chapovalov
4a29edca7d Update ios AudioDevice away from rtc::MessageHandler
Align thread checkers with the class comment,
i.e. ensure AudioDevice is used and destroyed on the same thread it was constructed on, not just the same thread AudioDevice::Init was called.

Bug: webrtc:9702
Change-Id: Ib905978cc8173266151adf26e1b7317f1d3852bc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274164
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38018}
2022-09-06 11:35:18 +00:00
Yury Yaroshevich
5027c1a482 Reland "Reland "ObjC ADM: record/play implementation via RTCAudioDevice [3/3]""
This is a reland of commit 9a0a6a198e

Original change's description:
> Reland "ObjC ADM: record/play implementation via RTCAudioDevice [3/3]"
>
> This is a reland of commit 2b9aaad58f
>
> Original change's description:
> > ObjC ADM: record/play implementation via RTCAudioDevice [3/3]
> >
> > # Overview
> > This CL chain exposes new API from ObjC WebRTC SDK to inject custom
> > means to play and record audio. The goal of CLs is achieved by having
> > additional implementation of `webrtc::AudioDeviceModule`
> > called `ObjCAudioDeviceModule`. The feature
> > of `ObjCAudioDeviceModule` is that it does not directly use any
> > of OS-provided audio APIs like AudioUnit, AVAudioEngine, AudioQueue,
> > AVCaptureSession etc. Instead it delegates communication with specific
> > system audio API to user-injectable audio device instance which
> > implements `RTCAudioDevice` protocol.
> > `RTCAudioDevice` is new API added to ObC WebRTC SDK in the CL chain.
> >
> > # AudioDeviceBuffer
> > `ObjCAudioDeviceModule` does conform to heavy `AudioDeviceModule`
> > interface providing stubs for unrelated methods. It also implements
> > common low-level management of audio device buffer, which glues audio
> > PCM flow to/from WebRTC.
> > `ObjCAudioDeviceModule` owns single `webrtc::AudioDeviceBuffer` which
> > with the help of two `FineAudioBuffer` (one for recording and one for
> > playout) is exchanged audio PCMs with user-provided `RTCAudioDevice`
> > instance.
> > `webrtc::AudioDeviceBuffer` is configured to work with specific audio:
> > it has to know sample rate and channels count of audio being played and
> > recorded. These formats could be different between playout and
> > recording. `ObjCAudioDeviceModule` stores current audio  parameters
> > applied  to `webrtc::AudioDeviceBuffer` as fields of
> > type `webrtc::AudioParameters`. `RTCAudioDevice` has it's own variable
> > audio parameters like sample rate, channels  count and IO buffer
> > duration. The audio parameters of `RTCAudioDevice` must be kept in sync
> > with audio parameters applied to `webrtc::AudioDeviceBuffer`, otherwise
> > audio playout and recording will be corrupted: audio is sent only
> > partially over the wire and/or audio is played with artifacts.
> > `ObjCAudioDeviceModule` reads current `RTCAudioDevice` audio parameters
> > when playout or recording is initialized. Whenever `RTCAudioDevice`
> > audio parameters parameters are changed, there must be a notification to
> > `ObjCAudioDeviceModule` to allow it to reconfigure
> > it's `webrtc::AudioDeviceBuffer`. The notification is performed
> > via `RTCAudioDeviceDelegate` object, which is provided
> > by `ObjCAudioDeviceModule` during initialization of `RTCAudioDevice`.
> >
> > # Threading
> > `ObjCAudioDeviceModule` is stick to same thread between initialization
> > and termination. The only exception is two IO functions invoked by SDK
> > user code presumably from real-time audio IO thread.
> > Implementation of `RTCAudioDevice` may rely on the fact that all the
> > methods of `RTCAudioDevice` are called on the same thread between
> > initialization and termination. `ObjCAudioDeviceModule` is also expect
> > that the implementation of `RTCAudioDevice` will call methods related
> > to notification of audio parameters changes and audio interruption are
> > invoked on `ObjCAudioDeviceModule` thread. To facilitate this
> > requirement `RTCAudioDeviceDelegate` provides two functions to execute
> > sync and async block on `ObjCAudioDeviceModule` thread.
> > Async block could be useful when handling audio session notifications to
> > dispatch whole block re-configuring audio objects used
> > by `RTCAudioDevice` implementation.
> > Sync block could be used to make sure changes to audio parameters
> > of ADB owned by `ObjCAudioDeviceModule` are notified, before interrupted
> > playout/recording restarted.
> >
> > Bug: webrtc:14193
> > Change-Id: I5587ec6bbee3cf02bad70dd59b822feb0ada7f86
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269006
> > Reviewed-by: Henrik Andreasson <henrika@google.com>
> > Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
> > Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37928}
>
> Bug: webrtc:14193
> Change-Id: Iaf950d24bb2394a20e50421d5122f72ce46ae840
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273380
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37946}

Bug: webrtc:14193
Change-Id: I84a6462c233daae7f662224513809b13e7218029
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273662
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37977}
2022-09-01 08:18:38 +00:00
Andrey Logvin
bcc31826ab Revert "Reland "ObjC ADM: record/play implementation via RTCAudioDevice [3/3]""
This reverts commit 9a0a6a198e.

Reason for revert: Breaks upstream project

Original change's description:
> Reland "ObjC ADM: record/play implementation via RTCAudioDevice [3/3]"
>
> This is a reland of commit 2b9aaad58f
>
> Original change's description:
> > ObjC ADM: record/play implementation via RTCAudioDevice [3/3]
> >
> > # Overview
> > This CL chain exposes new API from ObjC WebRTC SDK to inject custom
> > means to play and record audio. The goal of CLs is achieved by having
> > additional implementation of `webrtc::AudioDeviceModule`
> > called `ObjCAudioDeviceModule`. The feature
> > of `ObjCAudioDeviceModule` is that it does not directly use any
> > of OS-provided audio APIs like AudioUnit, AVAudioEngine, AudioQueue,
> > AVCaptureSession etc. Instead it delegates communication with specific
> > system audio API to user-injectable audio device instance which
> > implements `RTCAudioDevice` protocol.
> > `RTCAudioDevice` is new API added to ObC WebRTC SDK in the CL chain.
> >
> > # AudioDeviceBuffer
> > `ObjCAudioDeviceModule` does conform to heavy `AudioDeviceModule`
> > interface providing stubs for unrelated methods. It also implements
> > common low-level management of audio device buffer, which glues audio
> > PCM flow to/from WebRTC.
> > `ObjCAudioDeviceModule` owns single `webrtc::AudioDeviceBuffer` which
> > with the help of two `FineAudioBuffer` (one for recording and one for
> > playout) is exchanged audio PCMs with user-provided `RTCAudioDevice`
> > instance.
> > `webrtc::AudioDeviceBuffer` is configured to work with specific audio:
> > it has to know sample rate and channels count of audio being played and
> > recorded. These formats could be different between playout and
> > recording. `ObjCAudioDeviceModule` stores current audio  parameters
> > applied  to `webrtc::AudioDeviceBuffer` as fields of
> > type `webrtc::AudioParameters`. `RTCAudioDevice` has it's own variable
> > audio parameters like sample rate, channels  count and IO buffer
> > duration. The audio parameters of `RTCAudioDevice` must be kept in sync
> > with audio parameters applied to `webrtc::AudioDeviceBuffer`, otherwise
> > audio playout and recording will be corrupted: audio is sent only
> > partially over the wire and/or audio is played with artifacts.
> > `ObjCAudioDeviceModule` reads current `RTCAudioDevice` audio parameters
> > when playout or recording is initialized. Whenever `RTCAudioDevice`
> > audio parameters parameters are changed, there must be a notification to
> > `ObjCAudioDeviceModule` to allow it to reconfigure
> > it's `webrtc::AudioDeviceBuffer`. The notification is performed
> > via `RTCAudioDeviceDelegate` object, which is provided
> > by `ObjCAudioDeviceModule` during initialization of `RTCAudioDevice`.
> >
> > # Threading
> > `ObjCAudioDeviceModule` is stick to same thread between initialization
> > and termination. The only exception is two IO functions invoked by SDK
> > user code presumably from real-time audio IO thread.
> > Implementation of `RTCAudioDevice` may rely on the fact that all the
> > methods of `RTCAudioDevice` are called on the same thread between
> > initialization and termination. `ObjCAudioDeviceModule` is also expect
> > that the implementation of `RTCAudioDevice` will call methods related
> > to notification of audio parameters changes and audio interruption are
> > invoked on `ObjCAudioDeviceModule` thread. To facilitate this
> > requirement `RTCAudioDeviceDelegate` provides two functions to execute
> > sync and async block on `ObjCAudioDeviceModule` thread.
> > Async block could be useful when handling audio session notifications to
> > dispatch whole block re-configuring audio objects used
> > by `RTCAudioDevice` implementation.
> > Sync block could be used to make sure changes to audio parameters
> > of ADB owned by `ObjCAudioDeviceModule` are notified, before interrupted
> > playout/recording restarted.
> >
> > Bug: webrtc:14193
> > Change-Id: I5587ec6bbee3cf02bad70dd59b822feb0ada7f86
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269006
> > Reviewed-by: Henrik Andreasson <henrika@google.com>
> > Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
> > Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37928}
>
> Bug: webrtc:14193
> Change-Id: Iaf950d24bb2394a20e50421d5122f72ce46ae840
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273380
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37946}

Bug: webrtc:14193
Change-Id: I5e18cc919ca4bb1cef7d5a11489451a0907f0d66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273486
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Andrey Logvin <landrey@google.com>
Commit-Queue: Andrey Logvin <landrey@google.com>
Cr-Commit-Position: refs/heads/main@{#37950}
2022-08-30 11:58:34 +00:00
Yury Yaroshevich
9a0a6a198e Reland "ObjC ADM: record/play implementation via RTCAudioDevice [3/3]"
This is a reland of commit 2b9aaad58f

Original change's description:
> ObjC ADM: record/play implementation via RTCAudioDevice [3/3]
>
> # Overview
> This CL chain exposes new API from ObjC WebRTC SDK to inject custom
> means to play and record audio. The goal of CLs is achieved by having
> additional implementation of `webrtc::AudioDeviceModule`
> called `ObjCAudioDeviceModule`. The feature
> of `ObjCAudioDeviceModule` is that it does not directly use any
> of OS-provided audio APIs like AudioUnit, AVAudioEngine, AudioQueue,
> AVCaptureSession etc. Instead it delegates communication with specific
> system audio API to user-injectable audio device instance which
> implements `RTCAudioDevice` protocol.
> `RTCAudioDevice` is new API added to ObC WebRTC SDK in the CL chain.
>
> # AudioDeviceBuffer
> `ObjCAudioDeviceModule` does conform to heavy `AudioDeviceModule`
> interface providing stubs for unrelated methods. It also implements
> common low-level management of audio device buffer, which glues audio
> PCM flow to/from WebRTC.
> `ObjCAudioDeviceModule` owns single `webrtc::AudioDeviceBuffer` which
> with the help of two `FineAudioBuffer` (one for recording and one for
> playout) is exchanged audio PCMs with user-provided `RTCAudioDevice`
> instance.
> `webrtc::AudioDeviceBuffer` is configured to work with specific audio:
> it has to know sample rate and channels count of audio being played and
> recorded. These formats could be different between playout and
> recording. `ObjCAudioDeviceModule` stores current audio  parameters
> applied  to `webrtc::AudioDeviceBuffer` as fields of
> type `webrtc::AudioParameters`. `RTCAudioDevice` has it's own variable
> audio parameters like sample rate, channels  count and IO buffer
> duration. The audio parameters of `RTCAudioDevice` must be kept in sync
> with audio parameters applied to `webrtc::AudioDeviceBuffer`, otherwise
> audio playout and recording will be corrupted: audio is sent only
> partially over the wire and/or audio is played with artifacts.
> `ObjCAudioDeviceModule` reads current `RTCAudioDevice` audio parameters
> when playout or recording is initialized. Whenever `RTCAudioDevice`
> audio parameters parameters are changed, there must be a notification to
> `ObjCAudioDeviceModule` to allow it to reconfigure
> it's `webrtc::AudioDeviceBuffer`. The notification is performed
> via `RTCAudioDeviceDelegate` object, which is provided
> by `ObjCAudioDeviceModule` during initialization of `RTCAudioDevice`.
>
> # Threading
> `ObjCAudioDeviceModule` is stick to same thread between initialization
> and termination. The only exception is two IO functions invoked by SDK
> user code presumably from real-time audio IO thread.
> Implementation of `RTCAudioDevice` may rely on the fact that all the
> methods of `RTCAudioDevice` are called on the same thread between
> initialization and termination. `ObjCAudioDeviceModule` is also expect
> that the implementation of `RTCAudioDevice` will call methods related
> to notification of audio parameters changes and audio interruption are
> invoked on `ObjCAudioDeviceModule` thread. To facilitate this
> requirement `RTCAudioDeviceDelegate` provides two functions to execute
> sync and async block on `ObjCAudioDeviceModule` thread.
> Async block could be useful when handling audio session notifications to
> dispatch whole block re-configuring audio objects used
> by `RTCAudioDevice` implementation.
> Sync block could be used to make sure changes to audio parameters
> of ADB owned by `ObjCAudioDeviceModule` are notified, before interrupted
> playout/recording restarted.
>
> Bug: webrtc:14193
> Change-Id: I5587ec6bbee3cf02bad70dd59b822feb0ada7f86
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269006
> Reviewed-by: Henrik Andreasson <henrika@google.com>
> Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
> Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37928}

Bug: webrtc:14193
Change-Id: Iaf950d24bb2394a20e50421d5122f72ce46ae840
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273380
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37946}
2022-08-30 11:26:41 +00:00
Andrey Logvin
590a965a9f Revert "ObjC ADM: record/play implementation via RTCAudioDevice [3/3]"
This reverts commit 2b9aaad58f.

Reason for revert: Breaks upstream project

Original change's description:
> ObjC ADM: record/play implementation via RTCAudioDevice [3/3]
>
> # Overview
> This CL chain exposes new API from ObjC WebRTC SDK to inject custom
> means to play and record audio. The goal of CLs is achieved by having
> additional implementation of `webrtc::AudioDeviceModule`
> called `ObjCAudioDeviceModule`. The feature
> of `ObjCAudioDeviceModule` is that it does not directly use any
> of OS-provided audio APIs like AudioUnit, AVAudioEngine, AudioQueue,
> AVCaptureSession etc. Instead it delegates communication with specific
> system audio API to user-injectable audio device instance which
> implements `RTCAudioDevice` protocol.
> `RTCAudioDevice` is new API added to ObC WebRTC SDK in the CL chain.
>
> # AudioDeviceBuffer
> `ObjCAudioDeviceModule` does conform to heavy `AudioDeviceModule`
> interface providing stubs for unrelated methods. It also implements
> common low-level management of audio device buffer, which glues audio
> PCM flow to/from WebRTC.
> `ObjCAudioDeviceModule` owns single `webrtc::AudioDeviceBuffer` which
> with the help of two `FineAudioBuffer` (one for recording and one for
> playout) is exchanged audio PCMs with user-provided `RTCAudioDevice`
> instance.
> `webrtc::AudioDeviceBuffer` is configured to work with specific audio:
> it has to know sample rate and channels count of audio being played and
> recorded. These formats could be different between playout and
> recording. `ObjCAudioDeviceModule` stores current audio  parameters
> applied  to `webrtc::AudioDeviceBuffer` as fields of
> type `webrtc::AudioParameters`. `RTCAudioDevice` has it's own variable
> audio parameters like sample rate, channels  count and IO buffer
> duration. The audio parameters of `RTCAudioDevice` must be kept in sync
> with audio parameters applied to `webrtc::AudioDeviceBuffer`, otherwise
> audio playout and recording will be corrupted: audio is sent only
> partially over the wire and/or audio is played with artifacts.
> `ObjCAudioDeviceModule` reads current `RTCAudioDevice` audio parameters
> when playout or recording is initialized. Whenever `RTCAudioDevice`
> audio parameters parameters are changed, there must be a notification to
> `ObjCAudioDeviceModule` to allow it to reconfigure
> it's `webrtc::AudioDeviceBuffer`. The notification is performed
> via `RTCAudioDeviceDelegate` object, which is provided
> by `ObjCAudioDeviceModule` during initialization of `RTCAudioDevice`.
>
> # Threading
> `ObjCAudioDeviceModule` is stick to same thread between initialization
> and termination. The only exception is two IO functions invoked by SDK
> user code presumably from real-time audio IO thread.
> Implementation of `RTCAudioDevice` may rely on the fact that all the
> methods of `RTCAudioDevice` are called on the same thread between
> initialization and termination. `ObjCAudioDeviceModule` is also expect
> that the implementation of `RTCAudioDevice` will call methods related
> to notification of audio parameters changes and audio interruption are
> invoked on `ObjCAudioDeviceModule` thread. To facilitate this
> requirement `RTCAudioDeviceDelegate` provides two functions to execute
> sync and async block on `ObjCAudioDeviceModule` thread.
> Async block could be useful when handling audio session notifications to
> dispatch whole block re-configuring audio objects used
> by `RTCAudioDevice` implementation.
> Sync block could be used to make sure changes to audio parameters
> of ADB owned by `ObjCAudioDeviceModule` are notified, before interrupted
> playout/recording restarted.
>
> Bug: webrtc:14193
> Change-Id: I5587ec6bbee3cf02bad70dd59b822feb0ada7f86
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269006
> Reviewed-by: Henrik Andreasson <henrika@google.com>
> Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
> Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37928}

Bug: webrtc:14193
Change-Id: I6e759a91664c1f6f60e862d72e45f75c51d7297a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273340
Auto-Submit: Andrey Logvin <landrey@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Andrey Logvin <landrey@google.com>
Owners-Override: Andrey Logvin <landrey@google.com>
Cr-Commit-Position: refs/heads/main@{#37931}
2022-08-29 13:03:52 +00:00
Yury Yaroshevich
2b9aaad58f ObjC ADM: record/play implementation via RTCAudioDevice [3/3]
# Overview
This CL chain exposes new API from ObjC WebRTC SDK to inject custom
means to play and record audio. The goal of CLs is achieved by having
additional implementation of `webrtc::AudioDeviceModule`
called `ObjCAudioDeviceModule`. The feature
of `ObjCAudioDeviceModule` is that it does not directly use any
of OS-provided audio APIs like AudioUnit, AVAudioEngine, AudioQueue,
AVCaptureSession etc. Instead it delegates communication with specific
system audio API to user-injectable audio device instance which
implements `RTCAudioDevice` protocol.
`RTCAudioDevice` is new API added to ObC WebRTC SDK in the CL chain.

# AudioDeviceBuffer
`ObjCAudioDeviceModule` does conform to heavy `AudioDeviceModule`
interface providing stubs for unrelated methods. It also implements
common low-level management of audio device buffer, which glues audio
PCM flow to/from WebRTC.
`ObjCAudioDeviceModule` owns single `webrtc::AudioDeviceBuffer` which
with the help of two `FineAudioBuffer` (one for recording and one for
playout) is exchanged audio PCMs with user-provided `RTCAudioDevice`
instance.
`webrtc::AudioDeviceBuffer` is configured to work with specific audio:
it has to know sample rate and channels count of audio being played and
recorded. These formats could be different between playout and
recording. `ObjCAudioDeviceModule` stores current audio  parameters
applied  to `webrtc::AudioDeviceBuffer` as fields of
type `webrtc::AudioParameters`. `RTCAudioDevice` has it's own variable
audio parameters like sample rate, channels  count and IO buffer
duration. The audio parameters of `RTCAudioDevice` must be kept in sync
with audio parameters applied to `webrtc::AudioDeviceBuffer`, otherwise
audio playout and recording will be corrupted: audio is sent only
partially over the wire and/or audio is played with artifacts.
`ObjCAudioDeviceModule` reads current `RTCAudioDevice` audio parameters
when playout or recording is initialized. Whenever `RTCAudioDevice`
audio parameters parameters are changed, there must be a notification to
`ObjCAudioDeviceModule` to allow it to reconfigure
it's `webrtc::AudioDeviceBuffer`. The notification is performed
via `RTCAudioDeviceDelegate` object, which is provided
by `ObjCAudioDeviceModule` during initialization of `RTCAudioDevice`.

# Threading
`ObjCAudioDeviceModule` is stick to same thread between initialization
and termination. The only exception is two IO functions invoked by SDK
user code presumably from real-time audio IO thread.
Implementation of `RTCAudioDevice` may rely on the fact that all the
methods of `RTCAudioDevice` are called on the same thread between
initialization and termination. `ObjCAudioDeviceModule` is also expect
that the implementation of `RTCAudioDevice` will call methods related
to notification of audio parameters changes and audio interruption are
invoked on `ObjCAudioDeviceModule` thread. To facilitate this
requirement `RTCAudioDeviceDelegate` provides two functions to execute
sync and async block on `ObjCAudioDeviceModule` thread.
Async block could be useful when handling audio session notifications to
dispatch whole block re-configuring audio objects used
by `RTCAudioDevice` implementation.
Sync block could be used to make sure changes to audio parameters
of ADB owned by `ObjCAudioDeviceModule` are notified, before interrupted
playout/recording restarted.

Bug: webrtc:14193
Change-Id: I5587ec6bbee3cf02bad70dd59b822feb0ada7f86
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269006
Reviewed-by: Henrik Andreasson <henrika@google.com>
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37928}
2022-08-29 11:59:02 +00:00
Yury Yaroshevich
1d0b0aed97 ObjC ADM: added RTCAudioDevice protocol [2/N]
Bug: webrtc:14193
Change-Id: I616c4d338a0bbc57c22e1f1dcc4454512aecd967
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268195
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/main@{#37925}
2022-08-29 11:14:22 +00:00
Ali Tofigh
4b6819434d Reland "Add TaskQueueStdlib experiment."
This is a reland of commit 83db78e854

Original change's description:
> Add TaskQueueStdlib experiment.
>
> Bug: webrtc:14389
> Change-Id: I23c6e0ae675748ec35a99c334104dd2654995a33
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265802
> Commit-Queue: Ali Tofigh <alito@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37888}

Bug: webrtc:14389
Change-Id: If84c7043e5f0f63ae8d9eae651daf900a72f2ee3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273320
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37923}
2022-08-29 10:48:42 +00:00
Yury Yaroshevich
e21a3cbf2f ObjC ADM: target and dummy implementation [1/N]
Bug: webrtc:14193
Change-Id: Ic89af1a489ba6b4c011851f09297ed22cecde008
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266720
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37921}
2022-08-28 11:12:11 +00:00
Ali Tofigh
e7e3d5925a Revert "Add TaskQueueStdlib experiment."
This reverts commit 83db78e854.

Reason for revert: Some tests in Chromium's blink no longer compile because of the change in the signature of the CreateDefaultTaskQueueFactory() function.

Original change's description:
> Add TaskQueueStdlib experiment.
>
> Bug: webrtc:14389
> Change-Id: I23c6e0ae675748ec35a99c334104dd2654995a33
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265802
> Commit-Queue: Ali Tofigh <alito@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37888}

Bug: webrtc:14389
Change-Id: If3e63d6b4ab9e838dc5020b88076a73fd29916e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272920
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37902}
2022-08-25 12:41:05 +00:00
Ali Tofigh
83db78e854 Add TaskQueueStdlib experiment.
Bug: webrtc:14389
Change-Id: I23c6e0ae675748ec35a99c334104dd2654995a33
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265802
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37888}
2022-08-24 11:28:39 +00:00
Byoungchan Lee
5aa3b073ad Reland "Implement Optimized CropAndScale for ObjCFrameBuffer"
This is a reland of commit 9204302248

Original change's description:
> Implement Optimized CropAndScale for ObjCFrameBuffer
>
> 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}

Bug: None
Change-Id: Ie74146a33c1f54d0c988978bd925671afe699d05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272740
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#37887}
2022-08-24 09:14:19 +00:00
Christoffer Jansson
882e8c5dfb Revert "Implement Optimized CropAndScale for ObjCFrameBuffer"
This reverts commit 9204302248.

Reason for revert: Breaks downstream projects

Original change's description:
> Implement Optimized CropAndScale for ObjCFrameBuffer
>
> 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}

Bug: None
Change-Id: I3159d1bce9979399bca57c4ffdb26d356c2fd113
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272700
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Owners-Override: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37881}
2022-08-23 15:36:48 +00:00
Byoungchan Lee
64c70a260e Replace use of gtest expectation macro with XCTest's macro
Bug: webrtc:8382
Change-Id: I9d9276fcb0a9b13a8caa3baca5d3bc5c95c03c6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272120
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@google.com>
Cr-Commit-Position: refs/heads/main@{#37879}
2022-08-23 12:27:58 +00:00
Byoungchan Lee
9204302248 Implement Optimized CropAndScale for ObjCFrameBuffer
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}
2022-08-23 10:39:58 +00:00
Markus Handell
0cd0dd3b07 rtc::Event: Finalize migration to TimeDelta.
Bug: webrtc:14366
Change-Id: Icd8792a2f9efa5609dd13da2e175042fac101d36
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272101
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Auto-Submit: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37844}
2022-08-19 13:44:57 +00:00
Jeremy Leconte
99d7d6b4f6 Reenable some iOS tests.
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}
2022-08-19 13:10:17 +00:00
Jaehyun Ko
382a1528ef DCHECK the frame resolution only if the frame buffer is not native.
If the source image has a native handle and the encoder supports
the native handle, the encoder is expected to be able to correctly
sample/scale the source.

And VTCompressionSession can handle this, so DCHECK the frame
resolution only if the frame buffer is not native.

Bug: webrtc:14318
Change-Id: Id19c2f3bd86e9a2e1034d20e0255b4adc04a781f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270144
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37730}
2022-08-10 07:54:43 +00:00
Danil Chapovalov
c05a1be5b4 Migrate remaining webrtc usage of TaskQueueBase to absl::AnyInvocable
Bug: webrtc:14245
Change-Id: I8de2c23da5fbdfc0b1efbbe07fb6e8de744424a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/268191
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37565}
2022-07-20 08:15:08 +00:00
philipel
d44badf409 Always include the actual decoder implementation when RTCVideoDecoderAV1 is used.
Bug: webrtc:13573, b/236814111
Change-Id: I053fcec3d85fdc9f8d3b72af1735b4091ec5f7c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37418}
2022-07-04 12:27:02 +00:00
Philip Eliasson
91c05abd9b Always include the actual encoder implementation when RTCVideoEncoderAV1 is used.
Bug: webrtc:13573, b/236813931
Change-Id: I943ce51dac23bcbd6efe10413cfa9478f4ce6f55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266485
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37352}
2022-06-28 10:28:03 +00:00
Niels Möller
7a66900683 Delete rtc_base/atomic_ops.h
Bug: webrtc:9305
Change-Id: I3e8b0db03b84b5361d63db31ee23e6db3deabfe4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266497
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37348}
2022-06-28 08:32:13 +00:00
Mirko Bonadei
2fdf222da3 Remove HAVE_NO_MEDIA from Obj-C API.
This build configuration is not really supported/tested.

Bug: b/36882554
Change-Id: I8b5b2c93b1cf5e4d6627183c5449437e4589a5ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266741
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37322}
2022-06-24 09:16:39 +00:00
Byoungchan Lee
2b46a5870b Add proxy access to some methods in Obj-C SDK
Most calls to C++ PeerConnection and related classes are proxied
to internal threads in WebRTC. However, there is no such thing
in the Obj-C SDK.
It would be nice to proxy methods in the Obj-C SDK as well.

RTCMediaStream and RTCVideoTrack have NSMutableArray members,
and it can throw NSRangeException when it has race conditions,
so that it would be a good starting point.

Also, remove some NSAsserts as its condition isn't a fatal error,
and it doesn't affect the production already.

Bug: None
Change-Id: I10b44a9c773d62a5c04c254986733a6b67d51617
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262840
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@{#37283}
2022-06-21 07:02:08 +00:00
Artem Titov
c374d11fac Move to_queued_task.h and pending_task_safety_flag.h into public API
Bug: b/235812579
Change-Id: I9fa3dc4a65044df8b44fff4e9bfeac7233fa381c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266080
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37248}
2022-06-17 09:20:39 +00:00
Niels Möller
105711e9ad Move rtc::make_ref_counted to api/
Bug: webrtc:12701
Change-Id: If49095b101c1a1763c2a44a0284c0d670cce953f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265390
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37219}
2022-06-15 09:47:38 +00:00
philipel
4eab9f47a5 Make the libaom AV1 encoder optional in RTCDefaultVideoEncoderFactory.
This is a partial revert of: https://webrtc-review.googlesource.com/c/src/+/262814

skip_shebang_check=True

bug: webrtc:13573
Change-Id: I08282df91446efa79ca86cc8dfe3b6daeb4eec9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264543
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37074}
2022-06-01 10:54:55 +00:00
Jonas Oreland
61dbcd115a Rewrite "Reset all maps in AndroidNetworkMonitor Start()/Stop()"
This reverts commit 8cd7b0a7ba.

The assumption in AndroidNetworkMonitor that an interface name
is unique has turned out to be incorrect :( for some (weird) devices,
i.e ccmni0.
It is unclear if it is a permanent setup or a transient state.

This cl/ changes the impl. to cope with that, the last
OnNetworkConnected_n "owns" the interface name, and when
OnNetworkDisconnected_n runs, we check if we're "owner"
and maybe set a new "owner" (if we're not "owner" we do nothing).

New testcases added.

I also
1) change NetworkMonitorInterface to return a struct
with all the information that is requested with interface name
as key.
2) Change Network.cc adding (debug) assertions that network
properties can't change inside a loop (in one thread).

Original change's description:
> Revert "Reset all maps in AndroidNetworkMonitor Start()/Stop()"
>
> This reverts commit 02293096f9.
>
> Reason for revert: mysterious crashes in android_network_monitor.cc
>
> Original change's description:
> > Reset all maps in AndroidNetworkMonitor Start()/Stop()
> >
> > This cl/ fixes another race condition with the recent additions
> > to NetworkMonitorAutoDetect (getAllNetworksFromCache).
> >
> > The getAllNetworksFromCache-feature uses the by the Android team
> > preferred way of enumerating networks, i.e to register network listeners.
> >
> > Th recent fix to add IsAdapterAvailable, https://webrtc-review.googlesource.com/c/src/+/257400
> > contained a bug in that the adapter_type_by_name_ map was not
> > reset either on disconnect or Start/Stop.
> >
> > This cl/ addresses that including unit test.
> > It also de-obfuscates NetworkMonitor so that it always
> > calls NotifyOfActiveNetworkList on startMonitoring even
> > if list.size() == 0. This should not matter but makes
> > code easier to understand.
> >
> > Bug: webrtc:13741
> > Change-Id: I438b877eebf769a8b2e7292b697ef1c0a349b24f
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258721
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#36530}
>
> Bug: webrtc:13741
> Change-Id: I36fbf63f658d3e8048e13959cbebfbd14df12b14
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264146
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37016}

Bug: webrtc:13741
Change-Id: Ib4eb072b775e493b564528f0be94c685b70ec20f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264421
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37056}
2022-05-31 10:49:55 +00:00
philipel
09a2848351 Remove LibaomAv1EncoderIfSupported
Bug: webrtc:13573
Change-Id: Ia9a6d1809488d92753527350a61f0a46159ccd8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262814
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37033}
2022-05-30 09:56:54 +00:00
Ali Tofigh
969c1356af Adopt absl::string_view in system_wrappers/
Bug: webrtc:13579
Change-Id: Id0e6515c63a3c9aa6d7effef7a2bd8b5ef35af09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262245
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36904}
2022-05-17 08:23:24 +00:00
Artem Titov
63ee39d0be Revert "Add a prefix for objc category."
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}
2022-05-13 14:47:54 +00:00
Byoungchan Lee
181ea6e414 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}
2022-05-13 13:20:34 +00:00
Byoungchan Lee
c8a6fb2bb8 Remove objc tests from rtc_unittests and move tests to sdk_unittests
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}
2022-05-13 11:59:06 +00:00
Byoungchan Lee
d7de6e5ea4 Fix rendering tests of RTCMTLVideoViewTests to work as expected
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}
2022-04-29 19:27:22 +00:00
Peter Hanspers
d4fce5a361 Use playout sample rate for audio unit.
Fixing a race condition where session.sampleRate changes before AudioDeviceIOS::HandleValidRouteChange() finishes.

session.sampleRate is read into session_sample_rate at 576 and used at 623 to initialize the audio unit. However, in the call to SetupAudioBuffersForActiveAudioSession() the session.sampleRate is read again and may have changed, resulting in different sample rates used for the buffers and the audio unit. The consequence is a sample rate mismatch with either high pitched or low pitched audio.

The fix is to always use the buffer sample rate for the audio unit.

The DCHECK at 622 would save us in debug, but not in production, hence removed.

Change-Id: I562f1bf7f94d7447139ada2636b02ade7fcd6371
Bug: webrtc:14011
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260329
Reviewed-by: Henrik Andreasson <henrika@google.com>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36708}
2022-04-29 14:07:02 +00:00
Jeremy Leconte
49ad2d787a Disable tests with 'method was not invoked' error on simulator
https://chromium-swarm.appspot.com/task?id=5a663a0bbd1e4210

Bug: webrtc:13990
Change-Id: I8f6cc03e4ef4de389fa44f580be22649660c0524
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259770
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36698}
2022-04-28 18:57:01 +00:00
Niels Möller
03486fc197 Update sdk/ to not use implicit conversion from scoped_refptr<T> to T*.
Bug: webrtc:13464
Change-Id: I6944106ddc99c043825fad077bfcedc051c67d8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259772
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36682}
2022-04-28 08:10:15 +00:00
Harald Alvestrand
88b8dec17b Reland "remove mslabel and mslabel ssrc-specific attributes"
This reverts commit f0a34f2a30.

Reason for revert: Fixed downstream projects to not require those fields.

Original change's description:
> Revert "remove mslabel and mslabel ssrc-specific attributes"
>
> This reverts commit e3f257c4ee.
>
> Reason for revert: Breaks downstream projects
>
> Original change's description:
> > remove mslabel and mslabel ssrc-specific attributes
> >
> > Removes support for parsing and serializing
> >   a=ssrc:1 mslabel:stream
> >   a=ssrc:1 label:track
> > which have been superceeded by
> >   a=ssrc:1 msid:stream track
> > a long time ago.
> >
> > Bug: webrtc:7110
> > Change-Id: I3aca47728098b6e7e049b82ed34c59426d411c41
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168244
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#30801}
>
> TBR=kthelgason@webrtc.org,hta@webrtc.org,philipp.hancke@googlemail.com
>
> Change-Id: Ibd0ad11d2dee9f54bacab3dcca61dedccfc2c120
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:7110
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170620
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#30805}

Change-Id: Iec4bd460b35ce49cdb03dd607d2c8b1dee6210ab
Bug: webrtc:7110
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170622
Reviewed-by: Philipp Hancke <philipp.hancke@googlemail.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36640}
2022-04-25 08:50:50 +00:00
Jeremy Leconte
61afb34d3f Disable iOS tests relying on senderWithKind.
Bug: webrtc:13989
Change-Id: I1a299e8942ad3db251d4563d62946985f2d7af96
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259822
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#36624}
2022-04-22 14:34:18 +00:00
Byoungchan Lee
61a01af454 Implement OnResolutionChange to objc RTCVideoEncoderSelector
Bug: webrtc:12406
Change-Id: I3335d895ecd207ba9de92397cffa3b80799df4ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258700
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#36589}
2022-04-20 13:23:03 +00:00
Byoungchan Lee
df894ad299 Fix H.264 codec on Arm64(M1) MacOS
Arm64 (M1) MacOS doesn't seem to like the kCVPixelBufferOpenGLCompatibilityKey
attribute. Remove this and the crash goes away.

Bug: webrtc:13934
Change-Id: Ic78db1ed852af6846f04b86462947ed7df17bb3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257921
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36457}
2022-04-06 09:04:10 +00:00
Byoungchan Lee
f8750fcf67 Use Objective-C types in VideoToolbox encoder / decoder
The goal of this CL is to make the CFDictionaryRef not dependent
on a fixed number of properties, which will facilitate future work.

No behavior change intended.

Bug: None
Change-Id: I32261d81eaa9b77380cecbdaefcbaeafde300f9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257920
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.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@{#36449}
2022-04-05 16:41:19 +00:00
Yura Yaroshevich
ea4cefa3a7 Added new apple devices.
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/+/202743
Device machine names obtained from:
https://gist.github.com/adamawolf/3048717

Bug: None
Change-Id: If5cf2773500f2dd73783ede637cd2694e114e353
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256976
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/main@{#36372}
2022-03-29 15:40:35 +00:00
Jonas Oreland
e62c2f2c77 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf
rename WebRtcKeyValueConfig to FieldTrialsView

Bug: webrtc:10335
Change-Id: If725bd498c4c3daf144bee638230fa089fdde833
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256965
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36365}
2022-03-29 10:14:00 +00:00
Jonas Oreland
c06fe8b04e WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 11/inf
convert rtc_base/network and collateral.

This also remove last usage of system_wrappers/field_trials
in p2p/...Yay!

Bug: webrtc:10335
Change-Id: Ie8507b1f52bf7f3067e9b4bf8c81a825e4644fda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256640
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36357}
2022-03-28 15:48:01 +00:00
Yura Yaroshevich
cf9094a26e [iOS] Fixed RTC_DCHECK_NOTREACHED
Bug: None
Change-Id: I93f716a1e9c1b08e2bc1dc96ad282e66ef0dfaf2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256962
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/main@{#36354}
2022-03-28 13:05:41 +00:00
Yury Yaroshevich
19a6e9438b Expose RTCSSLCertificateVerifier from iOS SDK.
Bug: webrtc:11710
Change-Id: I825c6350a71b2ff180520f8643cbd4d6febdc883
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254821
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/main@{#36284}
2022-03-21 17:24:12 +00:00
Niels Möller
be74b8058b Fix spelling of receiver and transceiver.
Bug: None
Change-Id: I439e217d67283b182833e48da15af9ae367ac14e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256015
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36257}
2022-03-18 14:54:10 +00:00
Ali Tofigh
7fa9057a05 Adopt absl::string_view in function parameters under rtc_base/
This is part of a large-scale effort to increase adoption of
absl::string_view across the WebRTC code base.

This CL converts the majority of "const std::string&"s in function
parameters under rtc_base/ to absl::string_view.

Bug: webrtc:13579
Change-Id: I2b1e3776aa42326aa405f76bb324a2d233b21dca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254081
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Anders Lilienthal <andersc@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36239}
2022-03-17 15:39:26 +00:00
Ali Tofigh
6364d0899e Adopt absl::string_view in rtc_base/log_sinks
This is part of a large scale effort to increase adoption of
absl::string_view across the WebRTC code base.

This CL adds absl::string_view versions of the OnLogMessage functions in
rtc::LogSink. The const std::string& versions are kept for now since
downstream clients use subclasses of LogSink and need to be migrated
before these are removed.

Bug: webrtc:13579
Change-Id: I57bb72ad503805ff0ca16f1d7aece2d44c65cb73
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253980
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Owners-Override: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36189}
2022-03-14 12:47:55 +00:00
Niels Möller
b02220d1a0 Reland "Mark all bool conversion operators as explicit"
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}
2022-02-09 09:40:05 +00:00
Mirko Bonadei
c1fd46f879 Revert "Mark all bool conversion operators as explicit"
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}
2022-02-07 10:24:45 +00:00
Niels Möller
325789c457 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}
2022-02-07 09:14:05 +00:00
Jake Bromberg
950c8e924e Allows Metal rendering in iOS simulator
Bug: webrtc:13561
Change-Id: I25ae8160956eb9140b827fb391686a02817bfa02
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247520
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35825}
2022-01-28 13:26:25 +00:00
Ali Tofigh
62238097c9 Remove top-level const from parameters in function declarations.
This is a safe cleanup change since top-level const applied to
parameters in function declarations (that are not also
definitions) are ignored by the compiler. Hence, such changes do
not change the type of the declared functions and are simply
no-ops.

Bug: webrtc:13610
Change-Id: Ibafb92c45119a6d8bdb6f9109aa8dad6385163a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249086
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35802}
2022-01-26 11:05:25 +00:00
Niels Möller
027c793c57 Replace most explicit new RefCountedObject... with make_ref_counted
Bug: webrtc:12701
Change-Id: Iab91f1e96715eed7f9ddcfe1ca55510a18c817eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224544
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35786}
2022-01-25 14:28:12 +00:00
philipel
95701503f2 Make libaom_av1_encoder always build the libaom encoder.
Currently `CreateLibaomAv1Encoder` will either return an actual libaom AV1 encoder or a nullptr depening on whether the build flag `enable_libaom` was configured to true or not. This CL updates the `libaom_av1_encoder` build target to no longer depend on `enable_libaom` so that `CreateLibaomAv1Encoder` will always return an encoder instance.

Added `CreateLibaomAv1EncoderIfSupported` as a replacement to the old `CreateLibaomAv1Encoder`.

Bug: webrtc:13573
Change-Id: Ibdcd52c609acd79feefa2b86f19d1b4ca3e91d0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242360
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35763}
2022-01-21 13:45:47 +00:00
Henrik Boström
6d2fe89b7e [C++] Change default sdp_semantics to kUnifiedPlan.
This CL also removed the temporary enum value kNotSpecified.
See PSA https://groups.google.com/u/1/g/discuss-webrtc/c/SdoVP02eUIk
for more information.

With this CL we can close https://crbug.com/webrtc/11121 as fixed.

Bug: webrtc:11121
Change-Id: I1340b9be8e1d7a45e6327a5f550402bc542325ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246209
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35760}
2022-01-21 10:44:56 +00:00
Henrik Boström
2832bbfeeb [ObjC] Change default sdpSemantics to UnifiedPlan.
This CL also removed the temporary enum value NotSpecified.
See PSA https://groups.google.com/u/1/g/discuss-webrtc/c/SdoVP02eUIk
for more information.

Bug: webrtc:11121
Change-Id: Ib19e1f5911ffad001fc61ac28174eb8e823fc803
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246208
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35759}
2022-01-21 09:43:11 +00:00
Henrik Boström
2deee4bbb2 Mark rtc::Thread's versions of PostTask/PostDelayedTask deprecated.
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}
2022-01-20 12:59:27 +00:00
Niels Möller
ac0d18341d Prepare for deleting implicit conversion from raw pointer to scoped_refptr.
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}
2022-01-18 08:22:15 +00:00
Danil Chapovalov
46cc32d89f Replace ABSL_FALLTHROUGH_INTENDED with c++17 attribute
the new spelling is more standard and more compact, in particular doesn't need extra include and thus dependency

Bug: None
Change-Id: Iaea69d2154e4d9eff2468514f5734cb3fe016ff8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/245080
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35709}
2022-01-17 14:55:02 +00:00
Stefan Mitic
3babb8af23 Added support for H264 YUV444 (I444) decoding.
Added Nutanix Inc. to the AUTHORS file.

PS#1 is a reland of "Added support for H264 YUV444 (I444) decoding." https://webrtc-review.googlesource.com/c/src/+/234540

Bug: chromium:1251096
Change-Id: I99a1b1e4d8b60192ff96f92334a430240875c66c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235340
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35684}
2022-01-13 14:06:55 +00:00
Henrik Boström
766c80b256 [ObjC] Change default sdpSemantics to NotSpecified.
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}
2022-01-13 09:06:38 +00:00
Henrik Boström
62995db2fc Change default sdp_semantics to kNotSpecified.
In preparation for switching the default from kPlanB to kUnifiedPlan,
which could cause subtle bugs for those not prepared for it, we change
the default to kNotSpecified. The only purpose of kNotSpecified is to
crash, forcing any dependencies to explicitly set their sdp_semantics
value.

Tests are updated to explicitly set sdp_semantics when necessary, and
where the test does not care we update to kUnifiedPlan.

If this change lands without getting reverted we can let it sit for a
few weeks, after which we should change the default to kUnifiedPlan and
delete kNotSpecified.

Bug: webrtc:11121
Change-Id: I19b669b0735d78e269e19eaae86c2d7d95a91141
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242968
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35651}
2022-01-10 14:56:03 +00:00
Byoungchan Lee
b463ae1ac7 Add a sanity check of RTCVideoFrame in RTCMTLVideoView
Bug: webrtc:13490
Change-Id: I6cca1966c660b2fa36d2d77a816cdd734cce7cf2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244420
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35636}
2022-01-06 10:43:05 +00:00
Harald Alvestrand
09a0d0171c Deprecate RemoveTrack (old signature)
This also removes all internal usage of RemoveTrack, and changes
the replacement function to RemoveTrackOrError rather than RemoveTrackNew.

Bug: webrtc:9534
Change-Id: Idf7bb17495686de77c70428dcbfb12278328ce59
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/244094
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35624}
2022-01-04 20:44:07 +00:00
Chuck Hays
0a3836a882 Add missing respondsToSelector call for new optional delegate method.
Without checking respondsToSelector, clients that don't implement the
optional delegate method will crash.

Bug: webrtc:13446
Change-Id: I3b06b15e818ca80e6afae9491c30f38c6b262eb2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242600
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Auto-Submit: Chuck Hays <haysc@webrtc.org>
Commit-Queue: Chuck Hays <haysc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35573}
2021-12-22 22:52:17 +00:00
Jaehyun Ko
d211098392 Implement JNI and objc implementation for icecandidateerror event
This CL adds the callback on ICE Candidate Error to the Android and
the iOS SDKs.

Spec: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-onicecandidateerror

Bug: webrtc:13446
Change-Id: I6e511aaa80f1aa8f4310d8518d1144d97470cd7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239460
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35531}
2021-12-14 14:19:38 +00:00
Philipp Hancke
b0e7556e49 remove last traces of WebRTC-Audio-SendSideBwe
BUG=webrtc:12222

Change-Id: Ia1e306879b532a8ed0b7f20a288cd6b40e637ea5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237661
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35511}
2021-12-09 15:14:14 +00:00
Harald Alvestrand
fa67aef93f Declare Plan B DEPRECATED
Bug: webrtc:11121
Change-Id: Id9b933a71a9bfd1d20ddd137f43459cdc8ed1896
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238780
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35504}
2021-12-08 21:10:16 +00:00
Harald Alvestrand
ef5b21e637 Deprecate and remove usage for WARNING log level
Bug: webrtc:13362
Change-Id: Ida112158e4ac5f667e533a0ebfedb400c84df4d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239124
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35425}
2021-11-27 22:21:54 +00:00
Harald Alvestrand
5f34130f26 Declare LERROR deprecated and remove all usage in webrtc
Bug: webrtc:13362
Change-Id: I1c6c6eccd950d73be616b34f96db7832ff94377e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238804
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35416}
2021-11-24 14:34:24 +00:00
Byoungchan Lee
524a422ecd Modify global variables to not call the destructor on exit.
In logging.cc, use the pointer of the static variable so that
it doesn't need a global constructor/exit time destructor.

In RTCFieldTrials.mm, store the field trial string as a char pointer
instead of a std::unique_ptr to ensure that it is never freed.

LSAN will be unhappy with this fix, but WebRTC itself hasn't been
tested with LSAN enabled, and any code changed in this CL does not
build with build_with_chromium=true, so it shouldn't be a problem.

Bug: webrtc:9693, webrtc:11665
Change-Id: Ia28e3534170e0817b815717f6efe862f7b51ef62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237320
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35391}
2021-11-19 13:32:21 +00:00
Niels Möller
13d163654a Delete support for has_internal_source
Bug: webrtc:12875
Change-Id: I9683e71e1fe5b24802033ffcb32a531ca685fc6f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179220
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35353}
2021-11-16 11:29:40 +00:00
Byoungchan Lee
83ceb90fdf Fix -Wunused-but-set-variable
Bug: chromium:1203071
Change-Id: I338bd31ab0e74751f2c0abd5d441ea03ac33dead
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237880
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35350}
2021-11-16 10:30:30 +00:00
Artem Titov
d3251968d1 Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.

Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
2021-11-15 21:44:59 +00:00
Yura Yaroshevich
b08290b3c5 Request DTMF sender only for audio sender in iOS SDK.
Error message "Tried to get DTMF sender from video sender." should no
longer pollute logs.

Bug: None
Change-Id: I60d6f45ba049e93ec06d645da43fb8269354edf3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235982
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/main@{#35322}
2021-11-08 18:07:35 +00:00
Harald Alvestrand
97597c0f51 Remove usage of INFO alias for LS_INFO in log messages
Bug: webrtc:13362
Change-Id: Ifda893861a036a85c045cd366f9eab33c62ebde0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237221
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35310}
2021-11-04 13:46:17 +00:00
Byoungchan Lee
32c4ecb3db Fix -Wunused-but-set-variable in sdk/objc.
Bug: None
Change-Id: I7576db57b0a8d86fe7281176956c2efef78c1252
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236540
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/main@{#35273}
2021-10-28 13:52:13 +00:00
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
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
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
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
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
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