Commit graph

1724 commits

Author SHA1 Message Date
Danil Chapovalov
fbfd81f61a In android aaudio wrappers use threads through TaskQueue interface
Bug: webrtc:9702
Change-Id: I4686b8312a5e6705050ec89381938ea5da379d9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274160
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38010}
2022-09-05 11:10:21 +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
Rashad Sookram
9ed4194e49
Update to 5005 (M102) (#86) 2022-08-24 11:07:33 -04: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
Saúl Ibarra Corretgé
043a80320c Map the stopped transceiver direction on Android
Fixes IllegalArgumentException when native calls fromNativeIndex.

Bug: webrtc:14320
Change-Id: I0f0717852abd009e17c6f67639f1bf2262df8dfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270622
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37694}
2022-08-05 07:03:16 +00:00
Ranveer Aggarwal
a0e090ff5a Added an API to disable VolumeLogger on Android.
Change-Id: Ib16c9e02fe18e1d6628f2192a21c53515753bcde
Bug: webrtc:14321
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270621
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37693}
2022-08-05 06:59:37 +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
Niels Möller
b5b159d98c Update old TODO comments
Bug: None
Change-Id: I531ed648fe3d1f0dd1202f53c59ed023aed1ea7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267664
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37432}
2022-07-05 09:09:44 +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
Mirko Bonadei
9ea1ef649f Switch from junit_binary to robolectric_binary.
This was done in:
https://chromium-review.googlesource.com/c/chromium/src/+/3709093
https://chromium-review.googlesource.com/c/chromium/src/+/3732850

Bug: chromium:1336818, b/237612564
Change-Id: Ie1394ffa16a7c3322aa774e94aee93e6b1ac6ed6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267167
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37376}
2022-06-30 08:02:18 +00:00
Björn Terelius
7534ebd2bf Revert "Reland "Reland "Delete old Android ADM."""
This reverts commit db30009304.

Reason for revert: ... and it's out again :(
 
Original change's description:
> Reland "Reland "Delete old Android ADM.""
>
> This reverts commit 38a28603fd.
>
> Reason for revert: Attempt to reland, now that WebRTC dependency cycle has been broken.
>
> Original change's description:
> > Revert "Reland "Delete old Android ADM.""
> >
> > This reverts commit 6e4d7e606c.
> >
> > Reason for revert: Still breaks downstream build (though in a different way this time)
> >
> > Original change's description:
> > > Reland "Delete old Android ADM."
> > >
> > > This is a reland of commit 4ec3e9c988
> > >
> > > Original change's description:
> > > > Delete old Android ADM.
> > > >
> > > > The schedule move Android ADM code to sdk directory have been around
> > > > for several years, but the old code still not delete.
> > > >
> > > > Bug: webrtc:7452
> > > > Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> > > > Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> > > > Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> > > > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/main@{#37174}
> > >
> > > Bug: webrtc:7452
> > > Change-Id: Icabad23e72c8258a854b7809a93811161517266c
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265872
> > > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > > Cr-Commit-Position: refs/heads/main@{#37236}
> >
> > Bug: webrtc:7452
> > Change-Id: Ide8fbd55fadd7aed9989053afff7c63c04f1320f
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266023
> > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > Owners-Override: Björn Terelius <terelius@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37242}
>
> Bug: webrtc:7452
> Change-Id: I6946d0fc28cf4c08387e451e6a07765f7410ce7c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266980
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37356}

Bug: webrtc:7452
Change-Id: I1ef4004e89c8bea322bda0dc697a7ba45abeffcc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267067
Owners-Override: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37359}
2022-06-28 14:37:43 +00:00
Björn Terelius
db30009304 Reland "Reland "Delete old Android ADM.""
This reverts commit 38a28603fd.

Reason for revert: Attempt to reland, now that WebRTC dependency cycle has been broken.

Original change's description:
> Revert "Reland "Delete old Android ADM.""
>
> This reverts commit 6e4d7e606c.
>
> Reason for revert: Still breaks downstream build (though in a different way this time)
>
> Original change's description:
> > Reland "Delete old Android ADM."
> >
> > This is a reland of commit 4ec3e9c988
> >
> > Original change's description:
> > > Delete old Android ADM.
> > >
> > > The schedule move Android ADM code to sdk directory have been around
> > > for several years, but the old code still not delete.
> > >
> > > Bug: webrtc:7452
> > > Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> > > Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> > > Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> > > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > > Cr-Commit-Position: refs/heads/main@{#37174}
> >
> > Bug: webrtc:7452
> > Change-Id: Icabad23e72c8258a854b7809a93811161517266c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265872
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37236}
>
> Bug: webrtc:7452
> Change-Id: Ide8fbd55fadd7aed9989053afff7c63c04f1320f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266023
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Owners-Override: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37242}

Bug: webrtc:7452
Change-Id: I6946d0fc28cf4c08387e451e6a07765f7410ce7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266980
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37356}
2022-06-28 12:58:23 +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
Rashad Sookram
916a7323a9
Android: Enable echo detection (#81) 2022-06-27 16:17:12 -04: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
Mirko Bonadei
d151cc6fa3 Remove the last build cycle in WebRTC
This CL removes the last "nogncheck" comment that was related to a
known build cycle. The remaining ones are because of conditional
dependencies.

Bug: webrtc:8733
Change-Id: Ie6862ae1cc613b9c2740a34c3167e1741ed31ee3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265981
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37302}
2022-06-22 10:44:51 +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
Björn Terelius
38a28603fd Revert "Reland "Delete old Android ADM.""
This reverts commit 6e4d7e606c.

Reason for revert: Still breaks downstream build (though in a different way this time)

Original change's description:
> Reland "Delete old Android ADM."
>
> This is a reland of commit 4ec3e9c988
>
> Original change's description:
> > Delete old Android ADM.
> >
> > The schedule move Android ADM code to sdk directory have been around
> > for several years, but the old code still not delete.
> >
> > Bug: webrtc:7452
> > Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> > Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> > Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> > Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#37174}
>
> Bug: webrtc:7452
> Change-Id: Icabad23e72c8258a854b7809a93811161517266c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265872
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37236}

Bug: webrtc:7452
Change-Id: Ide8fbd55fadd7aed9989053afff7c63c04f1320f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266023
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37242}
2022-06-16 16:07:49 +00:00
Sergey Silkin
7517fb639b Switch to getInput/OutputBuffer
Use getInput/OutputBuffer(index) instead of getInput/OutputBuffers() in
Android MediaCodec video encoder and decoder wrappers.

getInput/OutputBuffers(index) are available from SDK 21 which is the minimum required version in WebRTC: https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/sdk/android/AndroidManifest.xml

Bug: b/234879577
Change-Id: I79fd234b104420ae3544229e8c62d7db2344cd01
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265804
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37241}
2022-06-16 15:55:09 +00:00
Yaowen Guo
6e4d7e606c Reland "Delete old Android ADM."
This is a reland of commit 4ec3e9c988

Original change's description:
> Delete old Android ADM.
>
> The schedule move Android ADM code to sdk directory have been around
> for several years, but the old code still not delete.
>
> Bug: webrtc:7452
> Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37174}

Bug: webrtc:7452
Change-Id: Icabad23e72c8258a854b7809a93811161517266c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265872
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37236}
2022-06-16 13:22:29 +00:00
Artem Titov
091e073b63 Revert "Move Java PeerConnectionFactory.fieldTrialsFindFullName to different file."
This reverts commit d609473b9c.

Reason for revert: Breaks downstream project

Original change's description:
> Move Java PeerConnectionFactory.fieldTrialsFindFullName to different file.
>
> Currently, Java equivalent of webrtc::field_trial::FindFullName is in
> PeeerConnectionFactory, which belongs to peerconnection_java GN target.
>
> Move that method into a separate file and GN target to make it easier
> to use the fieldTrialsFindFullName method in other code.
>
> Bug: webrtc:13973
> Change-Id: I4d7d30339883af76c1d066f72270c6caf9c64c49
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261500
> Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
> Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37233}

Bug: webrtc:13973
Change-Id: I08eda44444aee4d64a0cee36f3f921f75088d7fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265922
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37234}
2022-06-16 11:45:29 +00:00
Byoungchan Lee
d609473b9c Move Java PeerConnectionFactory.fieldTrialsFindFullName to different file.
Currently, Java equivalent of webrtc::field_trial::FindFullName is in
PeeerConnectionFactory, which belongs to peerconnection_java GN target.

Move that method into a separate file and GN target to make it easier
to use the fieldTrialsFindFullName method in other code.

Bug: webrtc:13973
Change-Id: I4d7d30339883af76c1d066f72270c6caf9c64c49
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261500
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37233}
2022-06-16 08:48:40 +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
Erik Språng
7dbfad613c Revert "Delete old Android ADM."
This reverts commit 4ec3e9c988.

Reason for revert: Causes downstream build error.

Original change's description:
> Delete old Android ADM.
>
> The schedule move Android ADM code to sdk directory have been around
> for several years, but the old code still not delete.
>
> Bug: webrtc:7452
> Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37174}

Bug: webrtc:7452
Change-Id: If094e0a3ef5a3d340cbd5dfa0a8a88c3e97ba0bf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265393
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37180}
2022-06-10 15:10:04 +00:00
Yaowen Guo
4ec3e9c988 Delete old Android ADM.
The schedule move Android ADM code to sdk directory have been around
for several years, but the old code still not delete.

Bug: webrtc:7452
Change-Id: I0f75c680f71f0b2ce614de6cbd9f124c2a59d453
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264620
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37174}
2022-06-10 08:55:04 +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
Jonas Oreland
8cd7b0a7ba 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}
2022-05-27 12:17:54 +00:00
Yaowen Guo
82cbae4c0d Delete useless code.
R=xalep@webrtc.org

Bug: None
Change-Id: I3960184c18f1f6ba26b296f609c823d8b73b3f93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262500
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36984}
2022-05-24 12:07:21 +00:00
Peter Thatcher
8d1ec572c9
Cherry pick fix for iOS logging
Reviewed at: https://webrtc-review.googlesource.com/c/src/+/256962
Commited as: cf9094a26e
2022-05-20 17:29:04 -06:00
Peter Thatcher
c6b0874f39
Cherry pick fix for possible race condition in iOS audio code 2022-05-20 17:28:16 -06:00
Niels Möller
83830f316e Delete TestListener and top-level thread wrapping.
Instead use rtc::AutoThread in tests that need that.

Bug: webrtc:9714
Change-Id: I1f33b1b2d321770d062504dd9ef86d66a345dd42
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254681
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36950}
2022-05-20 15:21:21 +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
Niels Möller
ea1e6f44f8 Delete rtc_base/format_macros.h
It defined RTC_PRIuS, which was needed for compatibility with MSVC
prior to version 2015.

Bug: webrtc:6424
Change-Id: I5668d473376201cad3e8da65927c967fc397804b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261314
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@{#36814}
2022-05-09 12:03:21 +00:00
Florent Castelli
26d12fcc71 Remove rtc_base:rtc_base_approved
It's now empty, let's remove it!

Bug: webrtc:9838
Change-Id: I4b3310e882ea95fdf47903f9ad31e2efb35703f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261242
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36774}
2022-05-05 09:43:31 +00:00
Florent Castelli
e3b74f8e61 sctp: Fix data channel closing sequence
When an SCTP stream is closing, a stream reset needs
to be sent from both ends.
The remote was not sending a stream reset and quickly
opening another stream with the same StreamID could
cause SCTP errors.

Bug: webrtc:13994
Change-Id: I3abc74ddc88b3fcf7e6495d76e7d77f52280b5d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260922
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36773}
2022-05-05 08:44:58 +00:00
Florent Castelli
3a9e6877e5 Cleanup rtc_base_approved target
Removed all unused or transitional parts

Bug: webrtc:9838
Change-Id: I6bc14e4e0ac09ab27e4d739ac76bb6a4dfff2cb7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260140
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36741}
2022-05-03 06:58:27 +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
Florent Castelli
c3e6e3a3e8 Remove dependency on rtc_base_approved from most targets
Bug: webrtc:9838
Change-Id: Ibd0199803597eff48ca139a5cecdc3209c62c5d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259873
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36643}
2022-04-25 12:15:30 +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
Florent Castelli
a30aef3dea Move event_tracer out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ic3c424729b5edd3e378c4195afe33ae5c88ad491
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259312
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36637}
2022-04-24 14:47:40 +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
Florent Castelli
f4db351625 Move race_checker out of rtc_base_approved
Bug: webrtc:9838
Change-Id: If180abcca1ef598314de3aed70e4a6eb04f062d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258770
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36607}
2022-04-21 14:40:06 +00:00
Harald Alvestrand
2f7ad28a6d Change stream.AddTrack/RemoveTrack to take a scoped_refptr argument
This better reflects the ownership passing of AddTrack, and is more
consistent for RemoveTrack.

Bug: webrtc:13980
Change-Id: Ide5baccf15fc687a4e092f8831ce8c0fea46604e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259740
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36603}
2022-04-21 12:32:17 +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
Björn Terelius
0c68a7aaa7 Use WebRTC's Java VM initialization in tests.
WebRTC should not depend on chromium's //base.

Bug: webrtc:13662
Change-Id: Ie660aa0f2477cc747830bba611aa23ed5e732385
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256364
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36581}
2022-04-20 08:41:48 +00:00
Florent Castelli
b1dc4e43f0 Move timestamp_aligner out of rtc_base_approved
Bug: webrtc:9838
Change-Id: I4ea34fd161e321f6506f300abfd27c4be6d785d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258766
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36580}
2022-04-20 08:25:30 +00:00
Florent Castelli
45a0599978 Remove platform_thread from //rtc_base:rtc_base_approved public_deps
While the target has a restricted visibility, since it was in rtc_base_approved
public deps, a lot of targets were able to bypass the visibility check.
So we remove the visibility restrictions and use the dependency explicitely
everywhere instead.

Bug: webrtc:8603
Change-Id: I94a03fdf7f94c54ab72081a58dd648e2cca73d17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258944
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36566}
2022-04-18 23:12:52 +00:00
Peter Thatcher
1474ba02ec
Follow-up to 4896 update (#74) 2022-04-15 19:20:15 -06:00
Peter Thatcher
4a2e0e5d45
Update to 4896 (M100) (#72) 2022-04-15 17:13:23 -06:00
Jonas Oreland
02293096f9 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}
2022-04-12 09:28:57 +00:00
Jonas Oreland
4bc12200b6 Reland WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 14/inf
Modify cl/ a bit and add fieldtrialsstring on observer
not to break downstream projects.

---

WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 14/inf

This cl/ passes field trials all the way from c++
to the android NetworkMonitorAutoDetect.java

Bug: webrtc:10335
Change-Id: Ic6842612eed36b684340f0f78f4087bee249cc50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257081
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36498}

---

Bug: webrtc:10335
Change-Id: Ied43770977465a0042541a61d29a9015c0b9cdc8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258622
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36520}
2022-04-11 12:01:38 +00:00
philipel
6daa3048fc Added OnResolutionChange to EncoderSelectorInterface.
Bug: webrtc:12406
Change-Id: I0160636d93ad0a33caf7ae7443cefe321a191406
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258442
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36517}
2022-04-11 10:04:57 +00:00
Saúl Ibarra Corretgé
a14e6ed09a Catch SecurityException when opening camera
A managed device might have camera access restricted, which results in
the following crash:

Caused by android.os.ServiceSpecificException: validateClientPermissionsLocked:1044: Callers from device user 0 are not currently allowed to connect to camera "1"
       at android.os.Parcel.createException(Parcel.java:2085)
       at android.os.Parcel.readException(Parcel.java:2039)
       at android.os.Parcel.readException(Parcel.java:1987)
       at android.hardware.ICameraService$Stub$Proxy.connectDevice(ICameraService.java:624)
       at android.hardware.camera2.CameraManager.openCameraDeviceUserAsync(CameraManager.java:389)
       at android.hardware.camera2.CameraManager.openCameraForUid(CameraManager.java:588)
       at android.hardware.camera2.CameraManager.openCamera(CameraManager.java:516)
       at org.webrtc.Camera2Session.openCamera(Camera2Session.java:359)
       at org.webrtc.Camera2Session.start(Camera2Session.java:322)
       at org.webrtc.Camera2Session.<init>(Camera2Session.java:298)
       at org.webrtc.Camera2Session.create(Camera2Session.java:276)
       at org.webrtc.Camera2Capturer.createCameraSession(Camera2Capturer.java:35)
       at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:272)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:214)
       at android.os.HandlerThread.run(HandlerThread.java:67)

Change-Id: I5e7b8d238e9381d1f8a4fe9858e8eb480d578fa0
Bug: webrtc:13950
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258363
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36513}
2022-04-11 07:26:08 +00:00
Artem Titov
54714779b2 Revert "WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 14/inf"
This reverts commit f177081eee.

Reason for revert: breaks downstream project

Original change's description:
> WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 14/inf
>
> This cl/ passes field trials all the way from c++
> to the android NetworkMonitorAutoDetect.java
>
> Bug: webrtc:10335
> Change-Id: Ic6842612eed36b684340f0f78f4087bee249cc50
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257081
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36498}

Bug: webrtc:10335
Change-Id: I8d881ea3f50cf4affde65800d759885b2581c6be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258482
Reviewed-by: Jonas Oreland <jonaso@google.com>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36500}
2022-04-08 15:10:14 +00:00
Jonas Oreland
f177081eee WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 14/inf
This cl/ passes field trials all the way from c++
to the android NetworkMonitorAutoDetect.java

Bug: webrtc:10335
Change-Id: Ic6842612eed36b684340f0f78f4087bee249cc50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257081
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36498}
2022-04-08 14:08:25 +00:00
Byoungchan Lee
26b23b8fcc Merge GN templates for iOS and MacOS framework creation
The two GN templates are nearly identical, so merge them to reduce
maintenance.

Bug: webrtc:13949
Change-Id: I5f53ade5f9d09ce6f23a6cb29c9d39df4485a237
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258380
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>
Cr-Commit-Position: refs/heads/main@{#36495}
2022-04-08 12:10:36 +00:00
Niels Möller
00e93249ca Refactor android stacktrace
Move global state into a singleton class. Eliminates use of
GlobalMutex. Also use std::atomic rather than volatile, for improved
thread safety.

Bug: webrtc:11567
Change-Id: I305d16ed2f4a9a6497df119e66d9bba08337339a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258120
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36475}
2022-04-07 08:32:42 +00:00
Florent Castelli
8d4e9fba21 Remove //api:sequence_checker from public deps
Bug: webrtc:8603
Change-Id: Ib572cdc5b5f4c1f0eb3357e5e0812fc9ce7437c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257915
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36465}
2022-04-06 14:23:50 +00:00
Florent Castelli
dd837e28fa Remove //rtc_base:timeutils from public deps
Bug: webrtc:8603
Change-Id: Iaca9356d16275a02e8842c783f259131d72ef010
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257914
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36460}
2022-04-06 11:23:21 +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
Florent Castelli
57aa81bce7 Remove //rtc_base:stringutils from public deps
Bug: webrtc:8603
Change-Id: Ic2dfbe28d310cb4b35983b73e895fc95e8439669
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257913
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36453}
2022-04-05 22:42:19 +00:00
Florent Castelli
e10a9f609a Remove //rtc_base:safe_conversions from public deps
Bug: webrtc:8603
Change-Id: I285ac30975039f8fe9882d1673cc8e4a615c8618
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257912
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36452}
2022-04-05 20:04:59 +00:00
Jim Gustafson
9fa95682c0
Convert more socket errors/warnings to info level 2022-04-05 12:06:33 -07:00
Florent Castelli
33d31fbc48 Remove //rtc_base:rtc_event from public deps
Bug: webrtc:8603
Change-Id: Ib99f43043da17723c939b0fe2aa9f3e515462c93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257911
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36450}
2022-04-05 17:34:09 +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
Florent Castelli
f86f6f9afd Remove //rtc_base:refcount from public deps
Bug: webrtc:8603
Change-Id: Ib27a107ae809df739492846175f0e9c4af40d21a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257910
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36447}
2022-04-05 15:32:29 +00:00
Harald Alvestrand
c1e8aeba72 Remove internal dependencies on pc:peerconnection target
This CL replaces those references with the smallest set of targets
that can satisfy the linker dependencies revealed by building the
"all" target.

Bug: webrtc:13634
Change-Id: Ia778630b18e1164138c41d245c3c8effed67f8e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257282
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36445}
2022-04-05 13:30:30 +00:00
Florent Castelli
4467ad7835 Remove //rtc_base:macromagic from public deps
Bug: webrtc:8603
Change-Id: I9708df48c9bde9f86ba2d1a92a278bb0d09f3865
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257909
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36444}
2022-04-05 12:36:12 +00:00
Florent Castelli
0af55ba60d Remove //rtc_base:logging from public deps
Bug: webrtc:8603
Change-Id: I2704da8618f88032adac7ae9eb2a0f47fce4a836
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257908
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36443}
2022-04-05 10:31:19 +00:00
Niels Möller
e0a92f9a42 Delete unused ScopedRegisterThreadForDebugging facility
Bug: webrtc:6424
Change-Id: I3564d204e8c886ce53e82426ef1d3896d7f6409d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258021
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36441}
2022-04-05 09:21:39 +00:00
Florent Castelli
bddfe0215c Remove //rtc_base:atomicops from public deps
Bug: webrtc:8603
Change-Id: If1fb37e44d5ab277e16895ca50325b3a86bd135f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257907
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36432}
2022-04-04 18:25:48 +00:00
Jonas Oreland
faf376cd7d Implement IsAdapterAvailable in AndroidNetworkMonitor
This cl/ fixes a 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.

This however introduces a unpleasant race condition like this:
1) network.cc discover rmnet0
2) BasicPortAllocator tries to create UDP port on rmnet0
- This fails as BindSocketToNetwork requires a android handle.
3) NetworkMonitorAutoDetect gets callback with rmnet0
4) BasicPortAllocator tries to create TCP port on rmnet0
- This succeeds.
5) Since rmnet0 has one working port, there will not be
any new ports created on that network

=> We end up with a TCP only connection :(

---

By impl. IsAdapterAvailable, we make sure that the network
will not be used by BasicPortAllocator (or anyone else!)
until we support binding to it.

The IsAdapterAvailable was implemented for IOS,
and has test coverage using FakeNetworkManager.

This cl/ is default enabled with the kill-switch
WebRTC-AndroidNetworkMonitor-IsAdapterAvailable.

Bug: webrtc:13741
Change-Id: I7c2cb7789660fd2e082c214d00e50c894666b07c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36406}
2022-04-01 13:16:26 +00:00
Jeremy Leconte
4f279adb1b Remove redundant PRESUBMIT.py files.
* tools_webrtc/PRESUBMIT.py is only checking the licence which is already done here:
38f35db4d4:PRESUBMIT.py;l=913;bpv=1;bpt=0;drc=4fc9bd9f69a0d88889d86d0cc9f8e27406e8a342

* sdk/android/PRESUBMIT.py was added before 'git cl format' was required from the root PRESUBMIT.py:
https://codereview.webrtc.org/2377113003

Bug: webrtc:13895
Change-Id: Ia5ea2529c36ceebfd7d4e6a6a72352bd30c573b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257280
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#36391}
2022-03-31 10:48:31 +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
ea0f9a0a19 Fix string that will not make field trial parser crash (in debug)
Ironic :( The "field trial guy" constructing a invalid string,
if only there would have been a builder instead...

I tested the code several times...but not with debug build...

Bug: webrtc:13741
Change-Id: If3caad0f5533fc150ffd6a34a89ab84f3f0264aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256979
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36370}
2022-03-29 13:30:51 +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
Harald Alvestrand
8df1957885 Remove internal dependencies on rtc_pc_base
This explores the theory that targets that have no files, just
dependencies, are unnecessary.

Bug: webrtc:13805
Change-Id: I1feb50cf3886128031af8970eae361e35fb052c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256974
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36363}
2022-03-29 09:03:10 +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
Harald Alvestrand
e5a73f5b88 Finish removal of source files from rtc_pc_base
No-try: True
Bug: webrtc:13805
Change-Id: Ib7048205fe62379d1a5c01cdbca81ba93b41cf47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256022
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36355}
2022-03-28 14:31:50 +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
Xavier Lepaul
ed4a5763f8 Migrate parameterized tests to the standard parameterized runner
The only caveat is that a name attribute for the `@Parameters`
annotation is required, as otherwise the test infrastructure
doesn’t find test results.

Bug: webrtc:13662
Change-Id: Ib3e2a6671d1045b0e19746ce78dd434fbee78b87
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256462
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Auto-Submit: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36322}
2022-03-24 15:38:53 +00:00
Xavier Lepaul
a6fcbb1830 Use a standard Androidx test runner instead of the org.chromium one
Bug: webrtc:13662
Change-Id: I7ae28a61ea8f7e578d8aef8e3104f8564f3dd7b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256621
Auto-Submit: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36318}
2022-03-24 10:49:44 +00:00
Xavier Lepaul
dacd31f5e8 Use the default Junit runner and Android’s UI thread rule
Bug: webrtc:13662
Change-Id: Ifc8a81905345093c096066b7a659b943464d38b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256464
Auto-Submit: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Commit-Queue: Linus Nilsson <lnilsson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36317}
2022-03-24 10:44:23 +00:00
Xavier Lepaul
a76ae851ad Run instrumentation tests with the default runner
This migrates all tests that work by just changing their runner.

This excludes tests using `@RunWith(ParameterizedRunner.class)`, and a
few other non-parameterized tests that fail with the default runner.

Bug: webrtc:13662
Change-Id: Ia0b7c80e04a6a6b7a51348b3a7f587d10061b58e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256367
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36298}
2022-03-23 10:01:04 +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
Jeremy Leconte
979706bd3b Add some eng prod owners to PRESUBMIT.py.
Bug: webrtc:13836
Change-Id: I6c8dd171aad03609802a4974a0b06437359673ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256002
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#36243}
2022-03-18 06:22:17 +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
Jim Gustafson
ad8014f0fd
Convert common error and warning logs to info severity 2022-03-15 18:34:43 -07: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
philipel
870ffe7443 Add libaom AV1 encoder java buildtargets.
Bug: webrtc:13573
Change-Id: Iec5d52a0e095e8b69427239ff7ff7b1a5b56db35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254581
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36172}
2022-03-10 13:21:07 +00:00
philipel
09d488b352 Rename corresponding libaom_av1_encoder_if_supported java buildtargets.
This is in preparation to introduce new java buildtargets that will use the `libaom_av1_encoder` buildtarget instead.

bug: webrtc:13573
Change-Id: I23e80653943ede576657acc17bcc5602cb0a4d5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254540
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36171}
2022-03-10 13:18:34 +00:00
Saúl Ibarra Corretgé
775ce76b66 Don't swallow UnsatisfiedLinkError
When loading the library fails, the user will be faced with this error:

java.lang.UnsatisfiedLinkError: No implementation found for void org.webrtc.PeerConnectionFactory.nativeInitializeAndroidGlobals()

With no context, however.

Bug: webrtc:13619
Change-Id: I88565f085773ad1e8c2f5742d7fdba96fb6043d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253960
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36150}
2022-03-08 14:38:01 +00:00
Xavier Lepaul
0f50cc2849 Remove checks for SDK <= 21
WebRTC’s minSdk is 21, so all those checks are dead code.

Change-Id: I26497fd92259b66d9e5ac6afbb393adf4d904c77
Bug: webrtc:13780
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253124
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36140}
2022-03-07 09:56:42 +00:00
Jonas Oreland
3e64739a76 Add support for caching networks based on NetworkCallback
This change adds a cache for networks in the SimpleNetworkCallback that
is already registered, allowing the cache to be used preferentially as
opposed to the deprecated getAllNetworks call.

This is a fork of https://webrtc-review.googlesource.com/c/src/+/251401
- adds field trials for new behavior
- removes test that did not work
- add (poor) test of field trials
- remove the "network_monitor_java" build target (that I could
not find any reference to...)

Bug: webrtc:13741
Change-Id: I2829c2f1940d4b42455d8e1a2217cf15c133e22b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252284
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36121}
2022-03-03 14:36:07 +00:00
Peter Thatcher
54cfdf3754
Add control for choosing between AEC3 and AECM (#67) 2022-02-23 18:59:14 -07:00
Byoungchan Lee
0b06552ab3 Android: Respect input buffer layout of MediaFormat
On Android, MediaCodec can request a specific layout of the input buffer.
One can use the stride and slice height to calculate the layout from
the Encoder's MediaFormat. The current code assumes
a specific layout, which is a problematic in Android 12.
Fix this by honoring the stride and slice-height.

Bug: webrtc:13427
Change-Id: I2d3e429309e3add3ae668e0390460b51e6a49eb9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/240680
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#36033}
2022-02-21 09:52:54 +00:00
Sergey Silkin
419344264c Disable periodic keyframes
Bug: none
Change-Id: I8bd049cb8e8c958e59bf90a61198b7933eb5d40f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251692
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36019}
2022-02-16 15:35:01 +00:00
Sergey Silkin
44fd6e35d3 Return name of underlaying HW codec
Bug: none
Change-Id: I2c6943b91a6d58b884270a029bcf210e4d5c7a91
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251782
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36015}
2022-02-16 12:21:53 +00:00
Sergey Silkin
b903e3b185 Use isHardwareAccelerated on Q+
Bug: none
Change-Id: Ic3f478c5cde12e8a4d1d121749c0414b254a3ea3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251695
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36014}
2022-02-16 10:43:42 +00:00
Alessio Bazzica
93348d89bc Remove unused audio options and corresponding media constraints
- experimental AGC (aka googAutoGainControl2) removed in [1]
- experimental NS (aka googNoiseSuppression2) removed in [2]
- typing noise detection (aka googTypingNoiseDetection)
  removed in [3]
- cricket::AudioOptions::tx_agc_ are unused

[1] https://webrtc-review.googlesource.com/c/src/+/219463
[2] https://webrtc-review.googlesource.com/c/src/+/232128
[3] https://chromium-review.googlesource.com/c/chromium/src/+/1617352

Bug: webrtc:11226
Change-Id: Id1ecef3d3e193c210fc11832e16db4f84d866d14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250680
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35987}
2022-02-14 10:50:20 +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
Harald Alvestrand
b6f3916c48 Break out webrtc_sdp and jsep_session_description
These two files turn out to be entangled with each other. Keeping
them together for now.

This is a simpler approach than the one attempted in
https://webrtc-review.googlesource.com/c/src/+/251060
but leaves cleanup of the relationship to a later work item.

Bug: webrtc:13634
Change-Id: I2b38f86c0c510332dc24a6b83531aee143a5df10
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251240
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35942}
2022-02-08 07:43:36 +00:00
Olov Brändström
092d776b7b Make WebRtcAudioRecord save timestamps
Add timestamps to audio_record_jni DataIsRecorded() function, and make
WebRtcAudioRecord find and send the time stamp to that function.

This CL is an continuation of
https://webrtc-review.googlesource.com/c/src/+/249085

Bug: webrtc:13609
Change-Id: I63ab89f1215893cbe1d11d9d8948f5639fc5cdfe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249951
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Minyue Li <minyue@google.com>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#35933}
2022-02-07 13:30:54 +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
philipel
8921fb8c51 Remove dependency dav1d_av1_jni from dav1d_java.
Bug: none
Change-Id: I32b544b2c85b0230e2637046926e13b47ce6e69d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250220
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35886}
2022-02-02 13:37:00 +00:00
Harald Alvestrand
13b62c28de Break out media_stream_observer.cc in peerconnection build
Bug: webrtc:13634
Change-Id: Ie1368217bc3735b0a747c39dbbb5afbc929c4cf3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250080
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35867}
2022-02-01 09:27:47 +00:00
Ali Tofigh
1e157a9596 Remove more top-level const from parameters in function declarations
This CL removes even more top-level const from parameters in function
declarations. This change is safe because top-level const in function
declarations (not function definitions) are ignored by the compiler
and so change is just a no-op cleanup.

Bug: webrtc:13610
Change-Id: Icf6868c27b1fdb9d9915b3a7020eb34bdcf07a09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249989
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35866}
2022-02-01 09:15:50 +00:00
Olov Brändström
b732bd5fb5 Add timestamps to AudioDeviceBuffer::SetRecordedBuffer
Add timestamps to the function AudioDeviceBuffer::SetRecordedBuffer. This will
be used to store audio timestaps in future changes.

This is a part of the A/V sync metric metric feature for mobile. The metric
have already launched for web clients.

Bug: webrtc:13609
Change-Id: I0031843476ff1b573b262308fca52d587fae30b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249085
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Minyue Li <minyue@google.com>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#35851}
2022-01-31 12:32:58 +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
Artem Titov
6cae2d5513 Reland "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
This reverts commit 3f87250a4f.

Reason for revert: Downstream is fixed

Original change's description:
> Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
>
> This reverts commit 5f0eb93d2a.
>
> Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after.
>
> Original change's description:
> > Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
> >
> > Bug: webrtc:13555, webrtc:13082
> > Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Artem Titov <titovartem@webrtc.org>
> > Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
> > Cr-Commit-Position: refs/heads/main@{#35805}
>
> TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:13555, webrtc:13082
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Owners-Override: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Andrey Logvin <landrey@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35807}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:13555, webrtc:13082
Change-Id: I7ef1ef3b6e3c41b1a96014aa75f003c0fcf33949
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249365
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35814}
2022-01-27 12:55:44 +00:00
Artem Titov
3f87250a4f Revert "Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely"
This reverts commit 5f0eb93d2a.

Reason for revert: Breaks downstream project. I'm going to fix that one and create a reland of this CL after.

Original change's description:
> Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
>
> Bug: webrtc:13555, webrtc:13082
> Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
> Cr-Commit-Position: refs/heads/main@{#35805}

TBR=hta@webrtc.org,titovartem@webrtc.org,daniel.l@hpcnt.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I33d497f1132adfe6d151023195a388d9b7d548f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:13555, webrtc:13082
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249364
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35807}
2022-01-26 14:56:14 +00:00
Byoungchan Lee
5f0eb93d2a Remove RTC_DISALLOW_COPY_AND_ASSIGN usages completely
Bug: webrtc:13555, webrtc:13082
Change-Id: Iff2cda6f516739419e97e975e03f77a98f74be03
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249260
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35805}
2022-01-26 14:22:16 +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
0431d2a94a [Java] Change default sdpSemantics to UNIFIED_PLAN.
This CL also removed the temporary enum value NOT_SPECIFIED.
See PSA https://groups.google.com/u/1/g/discuss-webrtc/c/SdoVP02eUIk
for more information.

Bug: webrtc:11121
Change-Id: I46b7902354e588c3197a500c5ee1315b5a3ed0a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246207
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35758}
2022-01-21 09:17:25 +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
Mirko Bonadei
91d39752ba Follow-up of 'Get WebRTC building for Mac Catalyst'
This CL adds a missing "else" branch to add :metal_objc if the
target is iOS/Catalist.

Originally suggested https://webrtc-review.googlesource.com/c/src/+/224200/5#message-b43a38aa326df0133ae8f8af71c443d0c05098a8.

Bug: webrtc:11516
Change-Id: I27746926a853cad9c2c7079f155dd858f04f1792
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/245400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35732}
2022-01-19 09:33:06 +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
Henrik Boström
277a3b4f85 [Java] Make default sdpSemantics NOT_SPECIFIED.
The default value of sdpSemantics is about to change from PLAN_B to
UNIFIED_PLAN. In order not to cause subtle bugs by applications that
depend on the default value being PLAN_B, we are temporarily making the
default NOT_SPECIFIED. Constructing with NOT_SPECIFIED 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

While we're at it, we're upgrading almost all unit tests to use Unified
Plan. However there are still two tests using Plan B for which I added
TODO comments to be dealt with later; not having an Android setup makes
it impossible to debug these efficiently.

Bug: webrtc:11121
Change-Id: Ib086186bee947d18d31b413e3aeba0cb247b377d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246000
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35700}
2022-01-15 10:23:50 +00:00
Xavier Lepaul
1e12f2a800 Add an option to avoid early initialization of audio capture
This can cause issues on Android S if this initialization happens when
the app doesn't have permission to access the microphone.

Bug: b/197461765
Change-Id: Iebccff9d15f5bb12a7b2c78e1c373e379b37a127
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246104
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35689}
2022-01-13 17:06:09 +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
Daniel.L (Byoungchan Lee)
c561d0abbb Re-enable Stacktrace Unittest on Android
After changing the way libunwind is built in https://crrev.com/c/3297439,
this test should work fine.

Bug: webrtc:13383
Change-Id: I5da7bf27ce3041c934d4ab91367a26c076fac0c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/241700
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35558}
2021-12-20 13:21:11 +00:00
philipel
9e48751f0d Java dav1d decoder.
Bug: none
Change-Id: I59553cffaa1f8bf4357dc33e83d9cd5fa8bb2a4a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/241321
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35557}
2021-12-20 12:43:04 +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
Mirko Bonadei
f5ea3b96cd Roll chromium_revision 867b87eb29..b56d8868f3 (933713:941610)
Change log: 867b87eb29..b56d8868f3
Full diff: 867b87eb29..b56d8868f3

Changed dependencies
* src/base: 14c89123e6..b367343820
* src/build: a0368daa25..d134d68f00
* src/buildtools: aa2fb0187c..b138e6ce86
* src/buildtools/linux64: git_revision:693f9fb87e4febdd4299db9f73d8d2c958e63148..git_revision:90294ccdcf9334ed25a76ac9b67689468e506342
* src/buildtools/mac: git_revision:693f9fb87e4febdd4299db9f73d8d2c958e63148..git_revision:90294ccdcf9334ed25a76ac9b67689468e506342
* src/buildtools/third_party/libc++abi/trunk: 4c834abe6f..707d75f53e
* src/buildtools/third_party/libunwind/trunk: 10f4e4a5b5..51ffc5ed5c
* src/buildtools/win: git_revision:693f9fb87e4febdd4299db9f73d8d2c958e63148..git_revision:90294ccdcf9334ed25a76ac9b67689468e506342
* src/ios: eb1001b206..af72ede971
* src/testing: 650a2f9467..619bca0ef9
* src/third_party: bc52b47596..5f94f37f8c
* src/third_party/android_build_tools/aapt2: oJ_fhfmT6sLorimH6Eo6hwWS2R2gU0c4ZUQfXvzae1UC..GlCdqxHxlg-8YkDGgj5cie-6COsEAZga9jyq-LAYxY4C
* src/third_party/android_build_tools/bundletool: OZ4is33usuZy-deP3FpWCtbKXaIY0qBLsElWte7556YC..2ZcLVDxyRwp8FzpeYLtLT0TfSRweZxvwh1-Kx1jZ_FoC
* src/third_party/android_deps/libs/com_google_android_material_material: version:2@1.5.0-alpha02.cr0..version:2@1.5.0-alpha05.cr0
* src/third_party/android_deps/libs/com_google_errorprone_error_prone_annotation: version:2@2.9.0.cr0..version:2@2.10.0.cr0
* src/third_party/android_deps/libs/com_google_errorprone_error_prone_annotations: version:2@2.9.0.cr0..version:2@2.10.0.cr0
* src/third_party/android_deps/libs/com_google_errorprone_error_prone_check_api: version:2@2.9.0.cr0..version:2@2.10.0.cr0
* src/third_party/android_deps/libs/com_google_errorprone_error_prone_core: version:2@2.9.0.cr0..version:2@2.10.0.cr0
* src/third_party/android_deps/libs/com_google_errorprone_error_prone_type_annotations: version:2@2.9.0.cr0..version:2@2.10.0.cr0
* src/third_party/androidx: Dewv4glpYqPtnvaOzHgVF6074yDsYzzDFiv0dO1ijwgC..nCX115noKlFOaRMhmFKd1v01hnVpUAaKg2SyLFZaYZgC
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/45c8be91f3..69030a0cea
* src/third_party/breakpad/breakpad: ff5892c5da..ee2ad61263
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/2d036344bd..a7ad5b5c96
* src/third_party/depot_tools: 5cffc195c9..9fcfde2499
* src/third_party/freetype/src: fde91ab8f1..d31bafcb9c
* src/third_party/googletest/src: 16f637fbf4..1b18723e87
* src/third_party/icu: eedbaf76e4..3e05d9daa9
* src/third_party/libvpx/source/libvpx: 7aabd69682..e259e6951d
* src/third_party/perfetto: 844b8662e9..5ed467a290
* src/third_party/r8: EU82Aqeu2B1PZzAmebHXfyOgeL2UZifcIJ1LPyoThw0C..nqWomZTwNDoogX26WeCSoFGg6aQN1FrwzoU4hCS0duEC
* src/third_party/turbine: 6QYCyqU5yXkAT7T-_K3sCPvfISI8ACXF_cW4OM5v9BgC..KbLQUR_KFiUEzVt1lMTORY96bz_PbMwC3GwIb1oGJmAC
* src/tools: f4333a2a39..a182115705
* src/tools/luci-go: git_revision:d1c03082ecda0148d8096f1fd8bf5491eafc7323..git_revision:0e76392e6557cc3ff8d95c3bc012540e0dbc128a
* src/tools/luci-go: git_revision:d1c03082ecda0148d8096f1fd8bf5491eafc7323..git_revision:0e76392e6557cc3ff8d95c3bc012540e0dbc128a
Added dependency
* src/third_party/android_deps/libs/com_google_flatbuffers_flatbuffers_java
DEPS diff: 867b87eb29..b56d8868f3/DEPS

Clang version changed llvmorg-14-init-6722-g0fbd3aad:llvmorg-14-init-8564-g34b903d8
Details: 867b87eb29..b56d8868f3/tools/clang/scripts/update.py

TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,marpan@webrtc.org, jianj@chromium.org,
BUG=None

No-Presubmit: True
Change-Id: I721d681c6c0a687c782fa1f34ea6cea3fba6ce02
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237761
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35347}
2021-11-15 17:34:08 +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
Fabian Bergmark
c276aee4ed Throw EGL errors to GLExceptions.
Bug: webrtc:13359
Change-Id: I1528fcd4cd0a5fc243baccd61fc4032cd0db4004
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237141
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35313}
2021-11-04 15:08:58 +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
Peter Thatcher
d03038bad0 Use CreatePeerConnectionOrError 2021-11-01 15:20:48 -06:00
Peter Thatcher
b04b3fb280 Fix Android changes to use the right Nullable 2021-10-29 13:23:13 -06:00
Peter Thatcher
1a0b210a9d ks 2021-10-29 07:49:26 -06: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
Harald Alvestrand
f9e502d935 Remove enable_dtls_srtp option
This is part of the removal of support for SDES.

Bug: webrtc:11066
Change-Id: I448d0e0032672c04c87b00550ab4b9d792071a0b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234864
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35262}
2021-10-26 10:35:41 +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
Jiwon Jung
5a79d28eba Require 16x16 alignment when using HardwareVideoEncoder for encoding.
It seems the Android CTS tests only verify that 16x16 aligned resolutions
are supported.

This change checks the validity of input frame's size when initialing
or encoding processes are about to start using H/W MediaCodec.

This change has additional APIs to retrieve
|requested_resolution_alignment| and |apply_alignment_to_all_simulcast_layers|
from JAVA VideoEncoder class and its inherited classes. HardwareVideoEncoder
using MediaCodec has values of 16 and true for above variables.

Bug: webrtc:13089
Change-Id: I0c4ebf94eb36da29c2e384a3edf85b82e779b7f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229460
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35169}
2021-10-08 13:15:12 +00:00
Jordan Rose
37ba595de0 RingRTC: Simplify changes for using native media stream tracks
This should reduce merge conflicts in the future.
2021-09-30 10:16:08 -07:00
Jordan Rose
f8481dfd1b RingRTC: add -[RTCPeerConnectionFactory getOwnedNativeFactory] 2021-09-30 10:16:08 -07: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
Niels Möller
e7c77ecd32 Add rtc:SocketFactory as member of jni OwnedFactoryAndThreads
Bug: webrtc:13145
Change-Id: Iff1b59d291b1a36d474cf3fb6fafa4e9ff007aa0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232060
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35051}
2021-09-21 11:15:30 +00:00
Fabian Bergmark
f7a7698aaf Mark toI420 as Nullable
Bug: webrtc:12877
Change-Id: I1b52b46bc9208d20f1887bdc87497e4eb227ecaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232330
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Fabian Bergmark <fabianbergmark@google.com>
Cr-Commit-Position: refs/heads/main@{#35050}
2021-09-21 10:05:09 +00:00
Byoungchan Lee
0a54e7a101 Verify that locks are handled correctly on RTCAudioSession
This CL is for the same behavior as before [1], to emit the NSError
when an application is not using the RTCAudioSession lock correctly.

[1] https://webrtc-review.googlesource.com/c/src/+/207432

Bug: webrtc:13091
Change-Id: I031b0e963d33c92ce1af7a306edfa6be005e043d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229461
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35018}
2021-09-17 01:41:42 +00:00
Sergey Silkin
6b19d8273b Replace AV1X with AV1
* Replace "AV1X" with "AV1";
* Keep mapping of "AV1X" payload name to kVideoCodecAv1 to not break
support of injectable "AV1X".

Bug: webrtc:13166
Change-Id: I9a50481209209f3857bbf28f4ed529ee6972377e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231560
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34987}
2021-09-14 08:29:02 +00:00
Peter Hanspers
0bf94aaa7c Fix race condition in RTCNetworkMonitor/objc_network_monitor.
Bug: webrtc:13146
Change-Id: I74d645df8847f1e003d1dc8b64e79c6ef9bce285
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231138
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34917}
2021-09-03 12:44:17 +00:00
Tim Na
3c9f41d4ef Refactor network_monitor_java out of peerconnection_java.
This is continuation work from https://webrtc-review.googlesource.com/c/src/+/229322

Bug: webrtc:13117
Change-Id: I649147ab8f978926c2e00ad45b388fb400d6545f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230080
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Tim Na <natim@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34909}
2021-09-02 17:15:46 +00:00
Saúl Ibarra Corretgé
260400d37f Fix NPE when setting the camera2 stabilization mode
Fatal Exception: java.lang.NullPointerException: Attempt to get length of null array
       at org.webrtc.Camera2Session$CaptureSessionCallback.chooseStabilizationMode(Camera2Session.java:234)
       at org.webrtc.Camera2Session$CaptureSessionCallback.onConfigured(Camera2Session.java:172)
       at android.hardware.camera2.impl.CallbackProxies$SessionStateCallbackProxy.lambda$onConfigured$0(CallbackProxies.java:53)
       at android.hardware.camera2.impl.-$$Lambda$CallbackProxies$SessionStateCallbackProxy$soW0qC12Osypoky6AfL3P2-TeDw.run(-.java:4)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:193)
       at android.os.HandlerThread.run(HandlerThread.java:65)

Bug: webrtc:13032
Change-Id: Ifb6ef920b700ca03d37c64803c0b34230785846f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227292
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34874}
2021-08-30 12:25:15 +00:00
Saúl Ibarra Corretgé
424b420a22 Fix NPE when accessing Android camera focus modes
Looks like getSupportedFocusModes() may return null, despite the documentation stating otherwise.

Bug: webrtc:13032
Change-Id: I0119b8a97be9ef4340c3e93f16e2dcaa899f2f3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227288
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34873}
2021-08-30 12:21:35 +00:00
Saúl Ibarra Corretgé
1460e15a45 Fix NPE when converting camera2 supported sizes
StreamConfigurationMap.getOutputSizes() may return null:
https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap#getOutputSizes(java.lang.Class%3CT%3E)

Fixes:

Fatal Exception: java.lang.NullPointerException: Attempt to get length of null array
       at org.webrtc.Camera2Enumerator.convertSizes(Camera2Enumerator.java:234)
       at org.webrtc.Camera2Enumerator.getSupportedSizes(Camera2Enumerator.java:147)
       at org.webrtc.Camera2Session.findCaptureFormat(Camera2Session.java:325)
       at org.webrtc.Camera2Session.start(Camera2Session.java:313)
       at org.webrtc.Camera2Session.<init>(Camera2Session.java:296)
       at org.webrtc.Camera2Session.create(Camera2Session.java:274)
       at org.webrtc.Camera2Capturer.createCameraSession(Camera2Capturer.java:35)
       at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:272)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:237)
       at android.os.HandlerThread.run(HandlerThread.java:67)

Bug: webrtc:13032
Change-Id: I9154be567cd12c066087818ba22e9cd69e75a22f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227291
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34872}
2021-08-30 12:18:45 +00:00
Saúl Ibarra Corretgé
cd0a4f5ff5 Handle camera2 session creation errors
openCamera may throw IllegalArgumentException:
    https://developer.android.com/reference/android/hardware/camera2/CameraManager#openCamera(java.lang.String,%20android.hardware.camera2.CameraDevice.StateCallback,%20android.os.Handler)

Bug: webrtc:13032
Change-Id: I9d094691ca38f9baf312168cd67c323fd4ed5d37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227293
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34871}
2021-08-30 10:52:55 +00:00
Johannes Kron
3cd7a0ffdd Remove media/base/h264_profile_level_id.* and media/base/vp9_profile.h
The content of these files was moved to api/video_codecs in
https://webrtc.googlesource.com/src.git/+/c3fcee7c3a7714afc3e37d4753b40f4fdbc3653e
but the original files could not be removed due to dependencies
in downstream projects.

Bug: chromium:1187565
Change-Id: I414efa22102bfdea0765fa72a8cf8b0bd5c090db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229303
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34869}
2021-08-30 10:31:08 +00:00
Byoungchan Lee
44b919c10a Remove use of UiThreadTestRule and migrate to UiThreadTest in chromium
Remove android.support.test.rule.UiThreadTestRule as chromium did in [1] and
Replace android.support.test.annotation.UiThreadTest
with org.chromium.base.test.UiThreadTest.

Also remove unused uiThreadHandler from NetworkMonitorTest.

[1] https://crrev.com/c/2332301

Bug: webrtc:11962
Change-Id: I8f3781d43d4d53d8158c39c81568d8b09b2bec6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230220
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#34864}
2021-08-30 10:01:16 +00:00
Peter Hanspers
e5b4e941a0 Surface audio unit errors.
With this change, we catch audio unit start errors and pipe them to the
audio session. The audio session notifies its delegate, which can then
take appropriate action based on the error code.
The signal follows the same path as the playout glitch detection.

Bug: webrtc:13119
Change-Id: I8c9f9d2a1e3457447d0ce61ad197f7e1c6392837
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230240
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34862}
2021-08-30 09:06:25 +00:00
Jim Gustafson
83566f4654
Remove release api for iOS 2021-08-27 10:06:55 -07:00
Saúl Ibarra Corretgé
27edde3182 Handle camera1 session creation errors more gracefully
Specifically, defer getting the camera index so the error can be
reported instead of crashing:

Fatal Exception: java.lang.IllegalArgumentException: No such camera: Camera 1, Facing front, Orientation 270
       at org.webrtc.Camera1Enumerator.getCameraIndex(Camera1Enumerator.java:170)
       at org.webrtc.Camera1Capturer.createCameraSession(Camera1Capturer.java:31)
       at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:272)
       at android.os.Handler.handleCallback(Handler.java:790)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:214)
       at android.os.HandlerThread.run(HandlerThread.java:65)

Bug: webrtc:13032
Change-Id: Ida6bc65046770c11c2b3ee832906e8454cec10df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227290
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34855}
2021-08-25 17:04:40 +00:00
Saúl Ibarra Corretgé
68952fed31 Handle camera2 session start error
getCameraCharacteristics() may throw IllegalArgumentException:

Fatal Exception: java.lang.IllegalArgumentException: supportsCameraApi:2569: Unknown camera ID 1
       at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1119)
       at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:531)
       at org.webrtc.Camera2Session.start(Camera2Session.java:304)
       at org.webrtc.Camera2Session.<init>(Camera2Session.java:296)
       at org.webrtc.Camera2Session.create(Camera2Session.java:274)
       at org.webrtc.Camera2Capturer.createCameraSession(Camera2Capturer.java:35)
       at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:272)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:237)
       at android.os.HandlerThread.run(HandlerThread.java:67)

Bug: webrtc:13032
Change-Id: I30b6d6da40bc90a94c0c3c79f9dff523182d3da4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227289
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34854}
2021-08-25 17:01:51 +00:00
Saúl Ibarra Corretgé
0f549f908c Catch RuntimeException on Camera.setDisplayOrientation
Bug: webrtc:13032
Change-Id: I3736e61b8f49ae058851d7f5d60858454e5d5b09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227287
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34853}
2021-08-25 15:30:51 +00:00
Saúl Ibarra Corretgé
c5cb7f1fad Fix NPE if no compatible capture format was found
Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'int org.webrtc.CameraEnumerationAndroid$CaptureFormat.width' on a null object reference
       at org.webrtc.Camera2Session$CameraStateCallback.onOpened(Camera2Session.java:122)
       at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:151)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:246)
       at android.os.HandlerThread.run(HandlerThread.java:67)


Fix NPE when setting the camera2 stabilization mode

Fatal Exception: java.lang.NullPointerException: Attempt to get length of null array
       at org.webrtc.Camera2Session$CaptureSessionCallback.chooseStabilizationMode(Camera2Session.java:234)
       at org.webrtc.Camera2Session$CaptureSessionCallback.onConfigured(Camera2Session.java:172)
       at android.hardware.camera2.impl.CallbackProxies$SessionStateCallbackProxy.lambda$onConfigured$0(CallbackProxies.java:53)
       at android.hardware.camera2.impl.-$$Lambda$CallbackProxies$SessionStateCallbackProxy$soW0qC12Osypoky6AfL3P2-TeDw.run(-.java:4)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:193)
       at android.os.HandlerThread.run(HandlerThread.java:65)

Bug: webrtc:13032
Change-Id: I6edd9f0061c445f90ab0881d78183077f89e391f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227294
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34851}
2021-08-25 13:35:11 +00:00
Byoungchan Lee
02334e07c5 Replace the android support annotation library with androidx's one.
This change does not affect downstream dependencies as androidx.annotation
is fully compatible with android.support.annotation.

Bug: webrtc:11962
Change-Id: I714b473df8d0fee8000ddf3a9beca7c5613db5ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226881
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34839}
2021-08-24 16:02:17 +00:00
Tim Na
2c8567b87a Adding a flag for enabling directWifiManger instead of using
PeerConnectionFactory to break off the dependency.

- This is required so that Android app that doesn't use the
  peerconnection_java as dependency can include android monitor
  directly without incurring size bloat.

Bug: None
Change-Id: I7b3453f268467550c0a4b3a0bbf858d55d2fd8a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229322
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Tim Na <natim@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34829}
2021-08-23 17:30:25 +00:00
Danil Chapovalov
b74b2b5a99 Migrate objc video decoder wrapper from InitDecode to Configure
Bug: webrtc:13045
Change-Id: Iff00489a91379298ac90cd48eb1aea109abd9906
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228945
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34825}
2021-08-23 14:50:55 +00:00
Saúl Ibarra Corretgé
4d0760e7f9 Add ability to mark video sources for screen casting in ObjC
Bug: webrtc:13033
Change-Id: If30a4889cd2cb0ecc5ee91eed2ee9b496a40c852
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227295
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34818}
2021-08-21 08:19:12 +00:00
Sergey Silkin
1db921e6f3 Non-integer frame rate in Android HW encoder
Bug: webrtc:10812
Change-Id: I4443dcfea851114bd5fbb10f11ca8a51cda12da8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229025
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34813}
2021-08-19 21:54:22 +00:00
Sergey Silkin
c68796e260 Calculate frame timestamps based on target frame rate
Before this change HardwareVideoEncoder used capture time as frame
timestamp passed to HW encoder. That led to buffer overshoots with
HW encoders which infer frame rate from timestamps when frames were
dropped before encoding (i.e., frame rate decreases according to frame
timestamps) or when FramerateBitrateAdjuster was used.

Fixed this by using synthetic monotonically increasing timestamps
calculated based on target frame rate provided by bitrate adjuster.

Bug: webrtc:12982
Change-Id: I2454cd4e574bbea1cb9855ced4d998104845415c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228902
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34810}
2021-08-19 19:10:32 +00:00
Jim Gustafson
c80a26602c
Ignore AudioSession changes in objc sdk
Let the client UX control category and mode changes.
2021-08-18 21:31:10 -07:00
Danil Chapovalov
ffce8e3ea0 Migrate android video decoder wrapper from InitDecode to Configure
Bug: webrtc:13045
Change-Id: Idb6d83d5cde659876ea3a106a85f177191f8074c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228941
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34769}
2021-08-16 12:43:17 +00:00
Artem Titov
cfea2182f8 Use backticks not vertical bars to denote variables in comments
Bug: webrtc:12338
Change-Id: I89c8b3a328d04203177522cbdfd9e606fd4bce4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228246
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34696}
2021-08-10 10:40:03 +00:00
Peter Hanspers
7f854bce1f Add supportsNativeHandle to the RTCVideoEncoder protocol.
The simulcast_encoder_adapter expects codecs that specify
supports_native_handle to perform resampling/scaling (through
GetEncoderInfo).
This change adds a method to the RTCVideoEncoder to let objc encoders
specify this rather than relying on the default.

Bug: webrtc:13044
Change-Id: I2efcbd42aa4f2048285f451c7b691fdeca111e62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227641
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34683}
2021-08-09 15:21:52 +00:00
Byoungchan Lee
8c487578f0 Fix crash of Objc SDK addIceCandidate with incorrect candidate.
RTCIceCandidate.nativeCandidate returns a unique_ptr that
can be null. As with the previous CL, this is used without checking
whether it is null or not, so it should be fixed.

Bug: None
Change-Id: I70a84f7a2a9a9d47b8cefa198204f9b6d63a7c7f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227620
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34649}
2021-08-04 21:42:07 +00:00
Byoungchan Lee
33728152ca Fix crash of ObjC SDK sLD / sRD with incorrect SDP.
There are two problems with setLocalDescription / setRemoteDescription
in ObjC SDK.
First, RTCSessionDescription.nativeDescription returns a raw
nullableSessionDescriptionInterface pointer, where sLD/sRD are calling
Clone() method unconditionally, so it might crash.
Second, unnecessary sLD/sRD calls Clone() of the raw pointer and
does not delete it, so this pointer will leak.

To solve these problems, I changed the return type of nativeDescription to
std::unique_ptr and removed the call to Clone() method.

Bug: webrtc:13022, webrtc:13035
Change-Id: Icbb87dda62d3a11af47ec74621cf64b8a6c05228
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227380
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/master@{#34647}
2021-08-04 20:39:00 +00:00
Mirko Bonadei
9ff450d0c4 [sigslot] - Remove sigslot from MediaStreamObserver.
Bug: webrtc:11943
Change-Id: Icf91ce850913c26e45dbca1940cafd600c235ad4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227340
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34632}
2021-08-03 06:53:59 +00:00
Mirko Bonadei
f48d3cfbab Revert "An RTCSessionDescription will now return nil from its initializer if the SDP passed to it is invalid."
This reverts commit 48cd9dbc50.

Reason for revert: Breaks downstream project.

Original change's description:
> An RTCSessionDescription will now return nil from its initializer if the SDP passed to it is invalid.
>
> Bug: webrtc:13022
> Change-Id: I2f2ad96884cf2f43f5ea95c1210470dd6aa5c919
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226980
> Commit-Queue: Jake Bromberg <jakebromberg@google.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34607}

TBR=peah@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com,jakebromberg@google.com

Change-Id: Iee05f747e472208f8776944df15d9206485b167e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:13022
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227341
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34615}
2021-07-31 09:53:46 +00:00
Mirko Bonadei
5f0784563c Allow export of Obj-C symbols without C++ ones.
This is useful when building the .framework which doesn't need to
export C++ symbols.

Bug: webrtc:12408
Change-Id: Ied775811a72a06b9ad678c9fb549bca286dd7f37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227089
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34613}
2021-07-30 22:54:59 +00:00
Jake Bromberg
48cd9dbc50 An RTCSessionDescription will now return nil from its initializer if the SDP passed to it is invalid.
Bug: webrtc:13022
Change-Id: I2f2ad96884cf2f43f5ea95c1210470dd6aa5c919
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226980
Commit-Queue: Jake Bromberg <jakebromberg@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34607}
2021-07-30 18:11:18 +00:00
Mirko Bonadei
2e6323e153 Fix OWNERS according to recent changes to path expressions.
See https://crbug.com/1231999#c7 and
https://chromium-review.googlesource.com/plugins/code-owners/Documentation/path-expressions.html#simplePathExpressions.

Bug: chromium:1231999
Change-Id: I8bce4f6e6bf53bf56b53b5bad54145727fd32389
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227090
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34602}
2021-07-30 13:36:20 +00:00
Mirko Bonadei
56c2406f8c Roll chromium_revision 03a29cf406..0549de0c2d (904346:907032)
This CL also includes the changes required to fix build errors on
Android builds.

Change log: 03a29cf406..0549de0c2d
Full diff: 03a29cf406..0549de0c2d

Changed dependencies
* src/base: 58887e6f2a..fe7fd7b2be
* src/build: 4638e26758..8aa210e09b
* src/buildtools/linux64: git_revision:d565aa3e72dd9e81da9595ee8c9d7b24cb45c48b..git_revision:c0a2d23c21e87f27f5af3e5dc2a99f2ef3480b9e
* src/buildtools/mac: git_revision:d565aa3e72dd9e81da9595ee8c9d7b24cb45c48b..git_revision:c0a2d23c21e87f27f5af3e5dc2a99f2ef3480b9e
* src/buildtools/third_party/libc++abi/trunk: e8bf577fbf..24e92c2bee
* src/buildtools/third_party/libunwind/trunk: d7b11d7989..cdb04dc77c
* src/buildtools/win: git_revision:d565aa3e72dd9e81da9595ee8c9d7b24cb45c48b..git_revision:c0a2d23c21e87f27f5af3e5dc2a99f2ef3480b9e
* src/ios: c172f6d55d..dafd1d1517
* src/testing: e6a8848e04..45ed21d9c9
* src/third_party: 43300033c5..be994fedb5
* src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib: version:2@1.5.10.cr0..version:2@1.5.21.cr0
* src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common: version:2@1.5.10.cr0..version:2@1.5.21.cr0
* src/third_party/android_sdk/public: 8LZujEmLjSh0g3JciDA3cslSptxKs9HOa_iUPXkOeYQC..tRoD45SCi7UleQqSV7MrMQO1_e5P8ysphkCcj6z_cCQC
* src/third_party/android_sdk/public: V__2Ycej-H2-6AcXX5A3gi7sIk74SuN44PBm2uC_N1sC..ZT3JmI6GMG4YVcZ1OtECRVMOLLJAWAdPbi-OclubJLMC
* src/third_party/android_sdk/public: A4EvXZUIuQho0QRDJopMUpgyp6NA3aiDQjGKPUKbowMC..gMHhUuoQRKfxr-MBn3fNNXZtkAVXtOwMwT7kfx8jkIgC
* src/third_party/android_sdk/public: 8tF0AOj7Dwlv4j7_nfkhxWB0jzrvWWYjEIpirt8FIWYC..qi_k82nm6j9nz4dQosOoqXew4_TFAy8rcGOHDLptx1sC
* src/third_party/android_sdk/public: YMUu9EHNZ__2Xcxl-KsaSf-dI5TMt_P62IseUVsxktMC..lL3IGexKjYlwjO_1Ga-xwxgwbE_w-lmi2Zi1uOlWUIAC
* src/third_party/android_sdk/public: 4gxhM8E62bvZpQs7Q3d0DinQaW0RLCIefhXrQBFkNy8C..n7svc8KYah-i4s8zwkVa85SI3_H0WFOniP0mpwNdFO0C
* src/third_party/androidx: hKpaz7h0NioWOEg8YP2hSuRaZ6uRCUEUcmNcvkxr9aYC..HHo3GgWHTJyTdX1eY15wQ40-pIfmMojudjRzMFoE8JoC
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/a10017c548..519c2986c7
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/9ac1fdf373..10f6e4b89b
* src/third_party/freetype/src: 801cd842e2..47b1a541cb
* src/third_party/googletest/src: 4ec4cd23f4..2d924d7a97
* src/third_party/libaom/source/libaom: https://aomedia.googlesource.com/aom.git/+log/aba245dde3..d80b8cecab
* src/third_party/libvpx/source/libvpx: eebc5cd487..977e77006e
* src/third_party/perfetto: 13482fe8f9..9edd589321
* src/tools: 2f3bb89f4e..f7be2d25c7
* src/tools/luci-go: git_revision:9ee8b1d719c0d3c268e0e19282351ca78024af2d..git_revision:63874080a20260642c8df82d4f4885ff30b33fb6
* src/tools/luci-go: git_revision:9ee8b1d719c0d3c268e0e19282351ca78024af2d..git_revision:63874080a20260642c8df82d4f4885ff30b33fb6
* src/tools/luci-go: git_revision:9ee8b1d719c0d3c268e0e19282351ca78024af2d..git_revision:63874080a20260642c8df82d4f4885ff30b33fb6
DEPS diff: 03a29cf406..0549de0c2d/DEPS

Clang version changed llvmorg-13-init-15163-g98033fdc:llvmorg-13-init-15561-gf98ed74f
Details: 03a29cf406..0549de0c2d/tools/clang/scripts/update.py

TBR=xalep@webrtc.org,marpan@webrtc.org, jianj@chromium.org,
BUG=None

No-Try: True
Change-Id: Iceca2600ab3aeff37d325ec68565c06f9db5b0fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227280
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34599}
2021-07-30 09:56:45 +00:00
Saúl Ibarra Corretgé
f7aa267dc0 Add missing header file in mac framework target
Bug: webrtc:13025
Change-Id: I16c31717dd8ffa4075386b403827729099b567da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227163
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34592}
2021-07-29 07:42:36 +00:00
Mirko Bonadei
3707793a57 [sigslot] - Remove sigslot form NetworkMonitorInterface.
Bug: webrtc:11943
Change-Id: Iddedb2840e437dfbffcb0d6cbf71a09b0030fbab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226869
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34573}
2021-07-27 19:27:52 +00:00
Artem Titov
d7ac581045 Use backticks not vertical bars to denote variables in comments for /sdk
Bug: webrtc:12338
Change-Id: Ifaad29ccb63b0f2f3aeefb77dae061ebc7f87e6c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227024
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34561}
2021-07-27 14:39:06 +00:00
Sergey Silkin
00fd3e352a Fetch and update encoder info in ctor
This allows to get encoder implementation name and other properties
without the need of initializing encoder.

Bug: none
Change-Id: I263a358d562a65a31c420ddb7c4b195316fa5ec8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226867
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34559}
2021-07-27 13:48:49 +00:00
Sergey Silkin
ac1c984dc1 Add ssilkin to android/OWNERS
Need someone from video team devs to be in the list. Working on projects
related to Android media codecs for couple of years and have enough
experience to review the changes. A concrete short-term motivation is
the need to land https://webrtc-review.googlesource.com/c/src/+/226867

Bug: none
Change-Id: I1d0a672f6b497bbe1e2d446386284d568f84664a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226951
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34556}
2021-07-27 12:49:02 +00:00
Mirko Bonadei
7750d802a5 Rename rtc_base/ssl_stream_adapter.h constants.
Uppercase constants are more likely to conflict with macros (for
example rtc::SRTP_AES128_CM_SHA1_80 and OpenSSL SRTP_AES128_CM_SHA1_80).

This CL renames some constants and follows the C++ style guide.

Bug: webrtc:12997
Change-Id: I2398232568b352f88afed571a9b698040bb81c30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226564
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34553}
2021-07-26 16:33:54 +00:00
Byoungchan Lee
f740c252e7 Use the underlying type of Java Video Buffer on Java -> C++ Frame Buffer
Just like the C++ API, add a method in Java VideoFrame.Buffer that
describes the underlying implementation.
Use this method to properly select AndroidVideoBuffer
or AndroidVideoI420Buffer in Java -> C++ Video Frame Conversion.

Also, add a test case for WrappedNativeI420Buffer
in VideoFrameBufferTest for consistency.

Bug: webrtc:12602
Change-Id: I4c0444e8af6f6a1109bc514e7ab6c2214f1f6d60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223080
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34545}
2021-07-24 01:04:40 +00:00
Byoungchan Lee
d33d0e8765 Hide AndroidVideoBuffer class and use factory function
This is a step to ensure that the Java to C++ Video Frame Buffer
conversion respects its types.

Bug: webrtc:12602
Change-Id: I1b688b1f421f44474e022b433f9075e75744d86f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223082
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34487}
2021-07-16 13:54:45 +00:00
Byoungchan Lee
9fc2663712 Hide VideoCodecType from Android SDK
This has not been used since
https://webrtc-review.googlesource.com/c/src/+/172721 .

Bug: None
Change-Id: Id617b9f6770b342b324fe0da84bf402cea1e783c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223081
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/master@{#34480}
2021-07-15 18:33:47 +00:00
Mirko Bonadei
2bbbd6686e Remove backwards compatible build targets.
Introduced by https://webrtc-review.googlesource.com/c/src/+/224200,
they can be now removed.

Bug: webrtc:11516
Change-Id: Idee5925e1ab10eba1b7b5cf7e673758281ac1492
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225204
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34440}
2021-07-08 20:26:49 +00:00
Jordan Rose
53d3fc9b1c iOS: Get WebRTC building for Mac Catalyst
- Add an option for disabling the OpenGL renderer
- Change the build script to use correct header location
- Use Metal compatibility for h264 CoreVideo buffers

Bug: webrtc:11516
Change-Id: Ia34a9305648e75904ac36e69593ffefedd833bfb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224200
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34426}
2021-07-06 21:07:59 +00:00
Mirko Bonadei
6b09c451dc Silence OpenGLES deprecation warning.
The deprecation warning started to trigger after the iOS deployment
target has been updated from 10 to 12 by
https://webrtc-review.googlesource.com/c/src/+/224543.

This macro was not defined in tests because the relevant bots were
excluded from CQ when that happened.

Bug: webrtc:12928, webrtc:12937
Change-Id: I6e1891c5080b172cbd74649e0a115b25d6c87d56
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225020
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34417}
2021-07-05 15:50:18 +00:00
Björn Terelius
02768ae4f8 Increase iOS deployment target from 10 to 12.
TBR=kthelgason@webrtc.org

Bug: webrtc:12928
Change-Id: I50de09972bf012e78a9bc9f1d98d8d07aab4e180
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224543
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34409}
2021-07-02 17:02:27 +00:00
Jordan Rose
51072c339d iOS: Use Metal compatibility for h264 CoreVideo buffers under Catalyst
Based on Filip Bajaník's work in webrtc:11516.
2021-06-25 17:22:44 -07:00
Jordan Rose
2a4a54030f iOS: Disable the OpenGL renderer under Catalyst 2021-06-25 17:22:44 -07:00
Jake Bromberg
fb7fd24b3d Removing RTC_SUPPORTS_METAL compilation flag. This flag is a holdover from before either macOS or the iOS Simulator supported Metal rendering.
Bug: webrtc:12638
Change-Id: Iced21bfac40192f609b65f5ea1dc3393ee1695fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222461
Commit-Queue: Jake Bromberg <jakebromberg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34347}
2021-06-21 22:47:44 +00:00
Xavier Lepaul
afb28116d3 Catch possible RuntimeException from getCameraCharacteristics
Also changed the logging of exceptions to give more details

Bug: webrtc:10804
Change-Id: Ifba6dee3d1c8ba4ecab408ca7715c3b792d9c004
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222641
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34325}
2021-06-17 15:32:42 +00:00
Fabian Bergmark
1bb36d2c77 Change YuvConverter.convert to catch GLExceptions and return null.
With https://webrtc-review.googlesource.com/c/src/+/222582,
I420 conversion is allowed to fail.

Bug: webrtc:12877
Change-Id: Iadae21ad889f084b8027206af4478223d7733d3e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222653
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Fabian Bergmark <fabianbergmark@google.com>
Cr-Commit-Position: refs/heads/master@{#34320}
2021-06-17 11:33:54 +00:00
Xavier Lepaul
72b79986a5 Remove the createDecoder(String) overload
This method has been deprecated since 2018-07:
https://webrtc-review.googlesource.com/c/src/+/88368/

It is never called by WebRTC itself.

Custom `VideoDecoderFactory` implementations overriding this method can
switch to the overload accepting a `VideoCodecInfo` object.

This is also adding a `toString()` implementation to `VideoCodecInfo`,
to make logging of the value more useful.

Bug: webrtc:7925
Change-Id: I70ec07a0cd4ffa07d165c9851e393439fcc5870b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221960
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34302}
2021-06-16 12:31:52 +00:00
Fabian Bergmark
c03d6e965e Support Java_Buffer_toI420 returning null
Bug: webrtc:12877
Change-Id: Ib9c8c62b350e644b17a3194e4208df6b06a4d9b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222582
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Fabian Bergmark <fabianbergmark@google.com>
Cr-Commit-Position: refs/heads/master@{#34296}
2021-06-16 07:27:47 +00:00
Peter Hanspers
74cc9eaca3 Don't register invalid encode complete callbacks.
Bug: webrtc:12866
Change-Id: Ia225b2f211155b4623ba07b61cee85366d822b29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221741
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34277}
2021-06-14 10:45:46 +00:00
Sergey Silkin
1b63db956f Move AV1X-AV1 mapping to VideoCodecTypeMime
AV1X->AV1 mapping added to SdpVideoFormatToVideoCodecInfo in
https://webrtc-review.googlesource.com/c/src/+/215586 results in
discrepancy of codec name between SDP and VideoCodecInfo. That violates
VideoCodecInfo design and breaks downstream projects.

This CL moves the mapping from VideoCodecInfoToSdpVideoFormat and
SdpVideoFormatToVideoCodecInfo to VideoCodecTypeMime.

Bug: b/181690054
Change-Id: I2a76524c29b082241f2ec72a60a209ce9b0c7c5f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221205
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34230}
2021-06-04 15:38:48 +00:00
Jesús Leganés-Combarro 'piranna
ffbfba979f Added PeerConnectionObserverJni::OnRemoveTrack()
Change-Id: I0880caa77a1097f56c560152e85c9ca29242f825

This PR add support for the `PeerConnectionObserverJni::OnRemoveTrack()`
event on Java, allowing to be notified when a remote track has been
removed. It's a very thing JNI wrapper on top of C++ API, being mostly
similar to other already available events like `track` and `addTrack`.

In Javascript API, tracks are not "removed" explicitly from the
PeerConnection, but instead receiver PeerConnection gets notified that
they have been removed from the streams they are associated to, and when
no `MediaStream` object has that track, it's considered that the track
has been removed from the PeerConnection. In Java and C++ APIs there's no
`MediaStreamObserver` class, so there's no way to listen to the
`removeTrack` event the same way happens in Javascript API, but instead
C++ API has a `removeTrack` event at PeerConnection level. This patchset
just only wraps and expose this `removeTrack` event from the C++ API to
the Java API.

This PR has been sponsored by Atos Research and Innovation
(https://atos.net/en/about-us/innovation-and-research).

Bug: webrtc:12850
Change-Id: I0880caa77a1097f56c560152e85c9ca29242f825
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218847
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34225}
2021-06-03 19:24:55 +00:00
Peter Hanspers
5981bf2eb6 Add resolution alignment properties to RTCVideoEncoder protocol.
With this change, RTCVideoEncoder can specify:
- requested_resolution_alignment,
- apply_alignment_to_all_simulcast_layers
in the same way scaling_settings is specified.

Change-Id: I3de79a2eabaae581d6a9f2ef3e39496b9545a4f5

Bug: webrtc:12829
Change-Id: I3de79a2eabaae581d6a9f2ef3e39496b9545a4f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220933
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Abby Yeh <abbyyeh@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34196}
2021-06-02 09:30:06 +00:00
Byoungchan Lee
cc84c980c2 Fix typo in a URL in the comment
Bug: None
Change-Id: I8ec4daa95e2602da7c1df747a6ddda193449eea1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220620
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34175}
2021-05-31 20:15:17 +00:00
Markus Handell
a1b8201009 Move proxies into pc/.
Bug: webrtc:12787
Change-Id: Ia244d9d22d35436a02cf5a448bd1520cb66ff352
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220321
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34141}
2021-05-27 09:56:42 +00:00
Harald Alvestrand
a9af50f151 Introduce CreateDataChannelOrError
Deprecate CreateDataChannel, and make it a simple wrapper function.

Bug: webrtc:12796
Change-Id: I053d75a264596ba87ca734a29df9241de93a80c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219784
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34130}
2021-05-26 09:43:29 +00:00
Byoungchan Lee
a39d96666b Remove unused property isLocked from RTCAudioSession
This property doesn't have a getter and it is not required anymore.

Bug: None
Change-Id: Ie3f057cd6928d7fdef4e7971476fb1257900ccc6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215261
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34125}
2021-05-26 08:08:40 +00:00
Byoungchan Lee
0a52ede821 Support for map of string keys to uint64_t / double values in RTCStats
Bug: webrtc:10685
Change-Id: I047d784bd20c3fca8b96391653f90fd8803140d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219141
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34121}
2021-05-25 20:38:08 +00:00
Tian Tan
c2310b2619 Set nativeObserver to 0 to avoid double release.
Bug: webrtc:12769
Change-Id: Ifcd3e8148e999740a697b27ddd12f6aca36c5440
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218780
Commit-Queue: Tian Tan <tiantan@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34029}
2021-05-17 19:53:43 +00:00
Björn Terelius
99261af5a4 Revert "Define cricket::MediaType in terms of webrtc::MediaType"
This reverts commit 3ce6391b38.

Reason for revert: Breaks downstream test

Original change's description:
> Define cricket::MediaType in terms of webrtc::MediaType
>
> This is one step in getting rid of cricket::MediaType.
>
> Bug: webrtc:12754
> Fixes: webrtc:12764
> Change-Id: Idee832572bdc4c0e3bfdec6fb31ec0ba9db3e995
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218346
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33994}

TBR=mbonadei@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I64772018dea55e4f0946464364a60a39cec7e9ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12754
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/218603
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34000}
2021-05-12 17:06:58 +00:00