Skip to content

Conversation

@hiroshihorie
Copy link
Member

@hiroshihorie hiroshihorie commented Nov 30, 2022

Now, if all audio tracks are muted(disabled), recording will stop and mic indicator will turn off.
Unmuting(enabling) any audio track will restart audio recording.

This is possible because of #52
Works(tested) with iOS / macOS.

macOS:
https://user-images.githubusercontent.com/548776/204782648-db38668f-21d6-46ac-876a-728376b716f2.mov

Copy link
Member

@cloudwebrtc cloudwebrtc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hiroshihorie hiroshihorie merged commit c0209ef into m104_release Dec 6, 2022
@hiroshihorie hiroshihorie deleted the stop-recording-on-mute branch December 6, 2022 06:09
cloudwebrtc pushed a commit that referenced this pull request Jan 18, 2023
* initial impl

* more comments

* more comment

* adjust indent

* comments
cloudwebrtc pushed a commit that referenced this pull request Jun 6, 2023
* initial impl

* more comments

* more comment

* adjust indent

* comments
cloudwebrtc added a commit that referenced this pull request Jun 12, 2023
allow listen-only mode in AudioUnit, adjust when category changes

release mic when category changes (#5)

Change defaults to iOS defaults (#7)

Sync audio session config (#8)

* use `AVAudioSession` defaults
* remove isRecordingEnabled

feat: support bypass voice processing for iOS. (#15)

Remove MacBookPro audio pan right code (#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (#29)

feat: add audio device changes detect for windows. (#41)

* feat: add audio device changes detect for windows.

* Update audio_device_core_win.cc

fix iOS/macOS/Android compile.

fix Linux compile (#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (#52)

* progress

* tweak

* clean

* simplify audio unit restart

call to SetupAudioBuffersForActiveAudioSession() might not be needed since sample rate won't change during restart. This might help reduce the unwanted noise when restarting audio unit.

* clean

Stop recording on mute (turn off mic indicator) (#55)

* initial impl

* more comments

* more comment

* adjust indent

* comments

Cherry pick audio selection from m97 release (#35)

* [Mac] Allow audio device selection (#21)

* first attempt

* remove unused dep

* init playout / recording

* use AudioDeviceID as guid

* switch device method

* equality

* default device

* `isDefault` property

* dont format default device name

* type param

* bypass

* refactor

* fix

* append Audio to thread labels

* ref

* lk headers

* low level apis

* fix thread checks

Some methods of ADM needs to be run on worker thread, otherwise RTC's thread check will fail.

* switch to default device when removed

* close mixerManager if didn't switch to default device

* default audio device switched

* expose devices update handler

* fix ios compile

* fix bug: don't always recreate RTCAudioDeviceModule

* handle guid.

Co-authored-by: Hiroshi Horie <[email protected]>
cloudwebrtc added a commit that referenced this pull request Jun 12, 2023
allow listen-only mode in AudioUnit, adjust when category changes (#2)

release mic when category changes (#5)

Change defaults to iOS defaults (#7)

Sync audio session config (#8)

feat: support bypass voice processing for iOS. (#15)

Remove MacBookPro audio pan right code (#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (#29)

feat: add audio device changes detect for windows. (#41)

fix Linux compile (#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (#52)

Stop recording on mute (turn off mic indicator) (#55)

Cherry pick audio selection from m97 release (#35)

[Mac] Allow audio device selection (#21)

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
cloudwebrtc added a commit that referenced this pull request Jun 12, 2023
allow listen-only mode in AudioUnit, adjust when category changes (#2)

release mic when category changes (#5)

Change defaults to iOS defaults (#7)

Sync audio session config (#8)

feat: support bypass voice processing for iOS. (#15)

Remove MacBookPro audio pan right code (#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (#29)

feat: add audio device changes detect for windows. (#41)

fix Linux compile (#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (#52)

Stop recording on mute (turn off mic indicator) (#55)

Cherry pick audio selection from m97 release (#35)

[Mac] Allow audio device selection (#21)

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
@cloudwebrtc cloudwebrtc mentioned this pull request Jun 12, 2023
cloudwebrtc added a commit that referenced this pull request Jun 12, 2023
allow listen-only mode in AudioUnit, adjust when category changes (#2)

release mic when category changes (#5)

Change defaults to iOS defaults (#7)

Sync audio session config (#8)

feat: support bypass voice processing for iOS. (#15)

Remove MacBookPro audio pan right code (#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (#29)

feat: add audio device changes detect for windows. (#41)

fix Linux compile (#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (#52)

Stop recording on mute (turn off mic indicator) (#55)

Cherry pick audio selection from m97 release (#35)

[Mac] Allow audio device selection (#21)

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
cloudwebrtc added a commit that referenced this pull request Jul 12, 2023
allow listen-only mode in AudioUnit, adjust when category changes (#2)

release mic when category changes (#5)

Change defaults to iOS defaults (#7)

Sync audio session config (#8)

feat: support bypass voice processing for iOS. (#15)

Remove MacBookPro audio pan right code (#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (#29)

feat: add audio device changes detect for windows. (#41)

fix Linux compile (#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (#52)

Stop recording on mute (turn off mic indicator) (#55)

Cherry pick audio selection from m97 release (#35)

[Mac] Allow audio device selection (#21)

RTCAudioDeviceModule.outputDevice / inputDevice getter and setter (#80)

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
cloudwebrtc added a commit that referenced this pull request Jul 13, 2023
allow listen-only mode in AudioUnit, adjust when category changes (#2)

release mic when category changes (#5)

Change defaults to iOS defaults (#7)

Sync audio session config (#8)

feat: support bypass voice processing for iOS. (#15)

Remove MacBookPro audio pan right code (#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (#29)

feat: add audio device changes detect for windows. (#41)

fix Linux compile (#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (#52)

Stop recording on mute (turn off mic indicator) (#55)

Cherry pick audio selection from m97 release (#35)

[Mac] Allow audio device selection (#21)

RTCAudioDeviceModule.outputDevice / inputDevice getter and setter (#80)

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
cloudwebrtc added a commit that referenced this pull request May 20, 2024
allow listen-only mode in AudioUnit, adjust when category changes (#2)

release mic when category changes (#5)

Change defaults to iOS defaults (#7)

Sync audio session config (#8)

feat: support bypass voice processing for iOS. (#15)

Remove MacBookPro audio pan right code (#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (#29)

feat: add audio device changes detect for windows. (#41)

fix Linux compile (#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (#52)

Stop recording on mute (turn off mic indicator) (#55)

Cherry pick audio selection from m97 release (#35)

[Mac] Allow audio device selection (#21)

RTCAudioDeviceModule.outputDevice / inputDevice getter and setter (#80)

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
cloudwebrtc added a commit that referenced this pull request May 20, 2024
allow listen-only mode in AudioUnit, adjust when category changes (#2)

release mic when category changes (#5)

Change defaults to iOS defaults (#7)

Sync audio session config (#8)

feat: support bypass voice processing for iOS. (#15)

Remove MacBookPro audio pan right code (#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (#29)

feat: add audio device changes detect for windows. (#41)

fix Linux compile (#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (#52)

Stop recording on mute (turn off mic indicator) (#55)

Cherry pick audio selection from m97 release (#35)

[Mac] Allow audio device selection (#21)

RTCAudioDeviceModule.outputDevice / inputDevice getter and setter (#80)

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
cloudwebrtc added a commit that referenced this pull request May 21, 2024
allow listen-only mode in AudioUnit, adjust when category changes (#2)

release mic when category changes (#5)

Change defaults to iOS defaults (#7)

Sync audio session config (#8)

feat: support bypass voice processing for iOS. (#15)

Remove MacBookPro audio pan right code (#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (#29)

feat: add audio device changes detect for windows. (#41)

fix Linux compile (#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (#52)

Stop recording on mute (turn off mic indicator) (#55)

Cherry pick audio selection from m97 release (#35)

[Mac] Allow audio device selection (#21)

RTCAudioDeviceModule.outputDevice / inputDevice getter and setter (#80)

Allow custom audio processing by exposing AudioProcessingModule (#85)

Expose audio sample buffers for Android (#89)

feat: add external audio processor for android. (#103)

android: make audio output attributes modifiable (#118)

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
Co-authored-by: davidliu <[email protected]>
cloudwebrtc added a commit that referenced this pull request May 21, 2024
allow listen-only mode in AudioUnit, adjust when category changes (#2)

release mic when category changes (#5)

Change defaults to iOS defaults (#7)

Sync audio session config (#8)

feat: support bypass voice processing for iOS. (#15)

Remove MacBookPro audio pan right code (#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (#29)

feat: add audio device changes detect for windows. (#41)

fix Linux compile (#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (#52)

Stop recording on mute (turn off mic indicator) (#55)

Cherry pick audio selection from m97 release (#35)

[Mac] Allow audio device selection (#21)

RTCAudioDeviceModule.outputDevice / inputDevice getter and setter (#80)

Allow custom audio processing by exposing AudioProcessingModule (#85)

Expose audio sample buffers for Android (#89)

feat: add external audio processor for android. (#103)

android: make audio output attributes modifiable (#118)

Fix external audio processor sample rate calculation (#108)

Expose remote audio sample buffers on RTCAudioTrack (#84)

Fix memory leak when creating audio CMSampleBuffer #86

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
Co-authored-by: davidliu <[email protected]>
@cloudwebrtc cloudwebrtc mentioned this pull request May 21, 2024
cloudwebrtc added a commit that referenced this pull request Jun 12, 2024
Use M125 as the latest version and migrate historical patches to m125

Patches Group:

## 1. Update README.md
b6c65fc
* Add Apache-2.0 license and some note to README.md. (#9)
* Updated readme detailing changes from original (#42)
* Adding membrane framework (#51)
* Updated readme (#83)

## 2. Audio Device Optimization
7454824
* allow listen-only mode in AudioUnit, adjust when category changes
(#2)
* release mic when category changes
(#5)
* Change defaults to iOS defaults
(#7)
* Sync audio session config
(#8)
* feat: support bypass voice processing for iOS.
(#15)
* Remove MacBookPro audio pan right code
(#22)
* fix: Fix can't open mic alone when built-in AEC is enabled.
(#29)
* feat: add audio device changes detect for windows.
(#41)
* fix Linux compile (#47)
* AudioUnit: Don't rely on category switch for mic indicator to turn off
(#52)
* Stop recording on mute (turn off mic indicator)
(#55)
* Cherry pick audio selection from m97 release
(#35)
* [Mac] Allow audio device selection
(#21)
* RTCAudioDeviceModule.outputDevice / inputDevice getter and setter
(#80)
* Allow custom audio processing by exposing AudioProcessingModule
(#85)
* Expose audio sample buffers for Android
(#89)
* feat: add external audio processor for android.
(#103)
* android: make audio output attributes modifiable
(#118)
* Fix external audio processor sample rate calculation
(#108)
* Expose remote audio sample buffers on RTCAudioTrack
(#84)
* Fix memory leak when creating audio CMSampleBuffer
#86

## 3. Simulcast/SVC support for iOS/Android.
b0b9fe9
    
- Simulcast support for iOS SDK (#4)
- Support for simulcast in Android SDK (#3)
- include simulcast headers for mac also (#10)
- Fix simulcast using hardware encoder on Android (#48)
- Add scalabilityMode support for AV1/VP9. (#90)

## 4. Android improvements.
9aaaab5
- Start/Stop receiving stream method for VideoTrack (#25)
- Properly remove observer upon deconstruction (#26)
- feat: Expose setCodecPreferences/getCapabilities for android. (#61)
- fix: add WrappedVideoDecoderFactory.java. (#74)

## 5. Darwin improvements
a13ea17
- [Mac/iOS] feat: Add RTCYUVHelper for darwin. (#28)
- Cross-platform `RTCMTLVideoView` for both iOS / macOS (#40)
- rotationOverride should not be assign (#44)
- [ObjC] Expose properties / methods required for AV1 codec support
(#60)
- Workaround: Render PixelBuffer in RTCMTLVideoView (#58)
- Improve iOS/macOS H264 encoder (#70)
- fix: fix video encoder not resuming correctly upon foregrounding
(#75).
- add PrivacyInfo.xcprivacy to darwin frameworks. (#112)
- Add NSPrivacyCollectedDataTypes key to xcprivacy file (#114)
- Thread-safe `RTCInitFieldTrialDictionary` (#116)
- Set RTCCameraVideoCapturer initial zoom factor (#121)
- Unlock configuration before starting capture session (#122)

## 6. Desktop Capture for macOS.
841d78f
- [Mac] feat: Support screen capture for macOS. (#24) (#36)
- fix: Get thumbnails asynchronously. (#37)
- fix: Use CVPixelBuffer to build DesktopCapture Frame, fix the crash
caused by non-CVPixelBuffer frame in RTCVideoEncoderH264 that cannot be
cropped. (#63)
- Fix the crash when setting the fps of the virtual camera. (#62)

## 7. Frame Cryptor Support.
fc08745
- feat: Frame Cryptor (aes gcm/cbc). (#54)
- feat: key ratchet/derive. (#66)
- fix: skip invalid key when decryption failed. (#81)
- Improve e2ee, add setSharedKey to KeyProvider. (#88)
- add failure tolerance for framecryptor. (#91)
- fix h264 freeze. (#93)
- Fix/send frame cryptor events from signaling thread (#95)
- more improvements for E2EE. (#96)
- remove too verbose logs (#107)
- Add key ring size to keyProviderOptions. (#109)

## 8. Other improvements.
eed6c8a
- Added yuv_helper (#57)
- ABGRToI420, ARGBToI420 & ARGBToRGB24 (#65)
- more yuv wrappers (#87)
- Fix naming for yuv helper (#113)
- Fix missing `RTC_OBJC_TYPE` macros (#100)

---------

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
Co-authored-by: davidliu <[email protected]>
Co-authored-by: Angelika Serwa <[email protected]>
Co-authored-by: Théo Monnom <[email protected]>
npazkevich pushed a commit to npazkevich/webrtc that referenced this pull request Jun 24, 2024
allow listen-only mode in AudioUnit, adjust when category changes (webrtc-sdk#2)

release mic when category changes (webrtc-sdk#5)

Change defaults to iOS defaults (webrtc-sdk#7)

Sync audio session config (webrtc-sdk#8)

feat: support bypass voice processing for iOS. (webrtc-sdk#15)

Remove MacBookPro audio pan right code (webrtc-sdk#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (webrtc-sdk#29)

feat: add audio device changes detect for windows. (webrtc-sdk#41)

fix Linux compile (webrtc-sdk#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (webrtc-sdk#52)

Stop recording on mute (turn off mic indicator) (webrtc-sdk#55)

Cherry pick audio selection from m97 release (webrtc-sdk#35)

[Mac] Allow audio device selection (webrtc-sdk#21)

RTCAudioDeviceModule.outputDevice / inputDevice getter and setter (webrtc-sdk#80)

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
hiroshihorie added a commit that referenced this pull request Oct 14, 2024
santhoshvai pushed a commit to GetStream/webrtc that referenced this pull request Nov 20, 2024
Use M125 as the latest version and migrate historical patches to m125

Patches Group:

## 1. Update README.md
webrtc-sdk/webrtc@b6c65fc
* Add Apache-2.0 license and some note to README.md. (#9)
* Updated readme detailing changes from original (#42)
* Adding membrane framework (#51)
* Updated readme (#83)

## 2. Audio Device Optimization
webrtc-sdk/webrtc@7454824
* allow listen-only mode in AudioUnit, adjust when category changes
(webrtc-sdk/webrtc#2)
* release mic when category changes
(webrtc-sdk/webrtc#5)
* Change defaults to iOS defaults
(webrtc-sdk/webrtc#7)
* Sync audio session config
(webrtc-sdk/webrtc#8)
* feat: support bypass voice processing for iOS.
(webrtc-sdk/webrtc#15)
* Remove MacBookPro audio pan right code
(webrtc-sdk/webrtc#22)
* fix: Fix can't open mic alone when built-in AEC is enabled.
(webrtc-sdk/webrtc#29)
* feat: add audio device changes detect for windows.
(webrtc-sdk/webrtc#41)
* fix Linux compile (webrtc-sdk/webrtc#47)
* AudioUnit: Don't rely on category switch for mic indicator to turn off
(webrtc-sdk/webrtc#52)
* Stop recording on mute (turn off mic indicator)
(webrtc-sdk/webrtc#55)
* Cherry pick audio selection from m97 release
(webrtc-sdk/webrtc#35)
* [Mac] Allow audio device selection
(webrtc-sdk/webrtc#21)
* RTCAudioDeviceModule.outputDevice / inputDevice getter and setter
(webrtc-sdk/webrtc#80)
* Allow custom audio processing by exposing AudioProcessingModule
(webrtc-sdk/webrtc#85)
* Expose audio sample buffers for Android
(webrtc-sdk/webrtc#89)
* feat: add external audio processor for android.
(webrtc-sdk/webrtc#103)
* android: make audio output attributes modifiable
(webrtc-sdk/webrtc#118)
* Fix external audio processor sample rate calculation
(webrtc-sdk/webrtc#108)
* Expose remote audio sample buffers on RTCAudioTrack
(webrtc-sdk/webrtc#84)
* Fix memory leak when creating audio CMSampleBuffer
webrtc-sdk/webrtc#86

## 3. Simulcast/SVC support for iOS/Android.
webrtc-sdk/webrtc@b0b9fe9

- Simulcast support for iOS SDK (#4)
- Support for simulcast in Android SDK (#3)
- include simulcast headers for mac also (#10)
- Fix simulcast using hardware encoder on Android (#48)
- Add scalabilityMode support for AV1/VP9. (#90)

## 4. Android improvements.
webrtc-sdk/webrtc@9aaaab5
- Start/Stop receiving stream method for VideoTrack (#25)
- Properly remove observer upon deconstruction (#26)
- feat: Expose setCodecPreferences/getCapabilities for android. (#61)
- fix: add WrappedVideoDecoderFactory.java. (#74)

## 5. Darwin improvements
webrtc-sdk/webrtc@a13ea17
- [Mac/iOS] feat: Add RTCYUVHelper for darwin. (#28)
- Cross-platform `RTCMTLVideoView` for both iOS / macOS (#40)
- rotationOverride should not be assign (#44)
- [ObjC] Expose properties / methods required for AV1 codec support
(#60)
- Workaround: Render PixelBuffer in RTCMTLVideoView (#58)
- Improve iOS/macOS H264 encoder (#70)
- fix: fix video encoder not resuming correctly upon foregrounding
(#75).
- add PrivacyInfo.xcprivacy to darwin frameworks. (#112)
- Add NSPrivacyCollectedDataTypes key to xcprivacy file (#114)
- Thread-safe `RTCInitFieldTrialDictionary` (#116)
- Set RTCCameraVideoCapturer initial zoom factor (#121)
- Unlock configuration before starting capture session (#122)

## 6. Desktop Capture for macOS.
webrtc-sdk/webrtc@841d78f
- [Mac] feat: Support screen capture for macOS. (#24) (#36)
- fix: Get thumbnails asynchronously. (#37)
- fix: Use CVPixelBuffer to build DesktopCapture Frame, fix the crash
caused by non-CVPixelBuffer frame in RTCVideoEncoderH264 that cannot be
cropped. (#63)
- Fix the crash when setting the fps of the virtual camera. (#62)

## 7. Frame Cryptor Support.
webrtc-sdk/webrtc@fc08745
- feat: Frame Cryptor (aes gcm/cbc). (#54)
- feat: key ratchet/derive. (#66)
- fix: skip invalid key when decryption failed. (#81)
- Improve e2ee, add setSharedKey to KeyProvider. (#88)
- add failure tolerance for framecryptor. (#91)
- fix h264 freeze. (#93)
- Fix/send frame cryptor events from signaling thread (#95)
- more improvements for E2EE. (#96)
- remove too verbose logs (#107)
- Add key ring size to keyProviderOptions. (#109)

## 8. Other improvements.
webrtc-sdk/webrtc@eed6c8a
- Added yuv_helper (#57)
- ABGRToI420, ARGBToI420 & ARGBToRGB24 (#65)
- more yuv wrappers (#87)
- Fix naming for yuv helper (#113)
- Fix missing `RTC_OBJC_TYPE` macros (#100)

---------

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
Co-authored-by: davidliu <[email protected]>
Co-authored-by: Angelika Serwa <[email protected]>
Co-authored-by: Théo Monnom <[email protected]>
# Conflicts:
#	README.md
#	media/engine/webrtc_video_engine.cc
#	media/engine/webrtc_video_engine.h
#	modules/audio_device/audio_device_impl.cc
#	sdk/BUILD.gn
#	sdk/android/BUILD.gn
#	sdk/android/api/org/webrtc/RtpParameters.java
#	sdk/android/api/org/webrtc/SimulcastVideoEncoder.java
#	sdk/android/api/org/webrtc/SimulcastVideoEncoderFactory.java
#	sdk/android/api/org/webrtc/VideoCodecInfo.java
#	sdk/android/src/jni/pc/rtp_parameters.cc
#	sdk/android/src/jni/simulcast_video_encoder.cc
#	sdk/android/src/jni/simulcast_video_encoder.h
#	sdk/android/src/jni/video_codec_info.cc
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule+Private.h
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule.h
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule.mm
#	sdk/objc/api/peerconnection/RTCAudioTrack.mm
#	sdk/objc/api/peerconnection/RTCIODevice+Private.h
#	sdk/objc/api/peerconnection/RTCIODevice.mm
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory.h
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
#	sdk/objc/api/video_codec/RTCVideoEncoderSimulcast.h
#	sdk/objc/api/video_codec/RTCVideoEncoderSimulcast.mm
#	sdk/objc/base/RTCAudioRenderer.h
#	sdk/objc/components/video_codec/RTCVideoEncoderFactorySimulcast.h
#	sdk/objc/components/video_codec/RTCVideoEncoderFactorySimulcast.mm
kanat pushed a commit to GetStream/webrtc that referenced this pull request Nov 22, 2024
* Update to m125. (#119)

Use M125 as the latest version and migrate historical patches to m125

Patches Group:

## 1. Update README.md
webrtc-sdk/webrtc@b6c65fc
* Add Apache-2.0 license and some note to README.md. (#9)
* Updated readme detailing changes from original (#42)
* Adding membrane framework (#51)
* Updated readme (#83)

## 2. Audio Device Optimization
webrtc-sdk/webrtc@7454824
* allow listen-only mode in AudioUnit, adjust when category changes
(webrtc-sdk/webrtc#2)
* release mic when category changes
(webrtc-sdk/webrtc#5)
* Change defaults to iOS defaults
(webrtc-sdk/webrtc#7)
* Sync audio session config
(webrtc-sdk/webrtc#8)
* feat: support bypass voice processing for iOS.
(webrtc-sdk/webrtc#15)
* Remove MacBookPro audio pan right code
(webrtc-sdk/webrtc#22)
* fix: Fix can't open mic alone when built-in AEC is enabled.
(webrtc-sdk/webrtc#29)
* feat: add audio device changes detect for windows.
(webrtc-sdk/webrtc#41)
* fix Linux compile (webrtc-sdk/webrtc#47)
* AudioUnit: Don't rely on category switch for mic indicator to turn off
(webrtc-sdk/webrtc#52)
* Stop recording on mute (turn off mic indicator)
(webrtc-sdk/webrtc#55)
* Cherry pick audio selection from m97 release
(webrtc-sdk/webrtc#35)
* [Mac] Allow audio device selection
(webrtc-sdk/webrtc#21)
* RTCAudioDeviceModule.outputDevice / inputDevice getter and setter
(webrtc-sdk/webrtc#80)
* Allow custom audio processing by exposing AudioProcessingModule
(webrtc-sdk/webrtc#85)
* Expose audio sample buffers for Android
(webrtc-sdk/webrtc#89)
* feat: add external audio processor for android.
(webrtc-sdk/webrtc#103)
* android: make audio output attributes modifiable
(webrtc-sdk/webrtc#118)
* Fix external audio processor sample rate calculation
(webrtc-sdk/webrtc#108)
* Expose remote audio sample buffers on RTCAudioTrack
(webrtc-sdk/webrtc#84)
* Fix memory leak when creating audio CMSampleBuffer
webrtc-sdk/webrtc#86

## 3. Simulcast/SVC support for iOS/Android.
webrtc-sdk/webrtc@b0b9fe9

- Simulcast support for iOS SDK (#4)
- Support for simulcast in Android SDK (#3)
- include simulcast headers for mac also (#10)
- Fix simulcast using hardware encoder on Android (#48)
- Add scalabilityMode support for AV1/VP9. (#90)

## 4. Android improvements.
webrtc-sdk/webrtc@9aaaab5
- Start/Stop receiving stream method for VideoTrack (#25)
- Properly remove observer upon deconstruction (#26)
- feat: Expose setCodecPreferences/getCapabilities for android. (#61)
- fix: add WrappedVideoDecoderFactory.java. (#74)

## 5. Darwin improvements
webrtc-sdk/webrtc@a13ea17
- [Mac/iOS] feat: Add RTCYUVHelper for darwin. (#28)
- Cross-platform `RTCMTLVideoView` for both iOS / macOS (#40)
- rotationOverride should not be assign (#44)
- [ObjC] Expose properties / methods required for AV1 codec support
(#60)
- Workaround: Render PixelBuffer in RTCMTLVideoView (#58)
- Improve iOS/macOS H264 encoder (#70)
- fix: fix video encoder not resuming correctly upon foregrounding
(#75).
- add PrivacyInfo.xcprivacy to darwin frameworks. (#112)
- Add NSPrivacyCollectedDataTypes key to xcprivacy file (#114)
- Thread-safe `RTCInitFieldTrialDictionary` (#116)
- Set RTCCameraVideoCapturer initial zoom factor (#121)
- Unlock configuration before starting capture session (#122)

## 6. Desktop Capture for macOS.
webrtc-sdk/webrtc@841d78f
- [Mac] feat: Support screen capture for macOS. (#24) (#36)
- fix: Get thumbnails asynchronously. (#37)
- fix: Use CVPixelBuffer to build DesktopCapture Frame, fix the crash
caused by non-CVPixelBuffer frame in RTCVideoEncoderH264 that cannot be
cropped. (#63)
- Fix the crash when setting the fps of the virtual camera. (#62)

## 7. Frame Cryptor Support.
webrtc-sdk/webrtc@fc08745
- feat: Frame Cryptor (aes gcm/cbc). (#54)
- feat: key ratchet/derive. (#66)
- fix: skip invalid key when decryption failed. (#81)
- Improve e2ee, add setSharedKey to KeyProvider. (#88)
- add failure tolerance for framecryptor. (#91)
- fix h264 freeze. (#93)
- Fix/send frame cryptor events from signaling thread (#95)
- more improvements for E2EE. (#96)
- remove too verbose logs (#107)
- Add key ring size to keyProviderOptions. (#109)

## 8. Other improvements.
webrtc-sdk/webrtc@eed6c8a
- Added yuv_helper (#57)
- ABGRToI420, ARGBToI420 & ARGBToRGB24 (#65)
- more yuv wrappers (#87)
- Fix naming for yuv helper (#113)
- Fix missing `RTC_OBJC_TYPE` macros (#100)

---------

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
Co-authored-by: davidliu <[email protected]>
Co-authored-by: Angelika Serwa <[email protected]>
Co-authored-by: Théo Monnom <[email protected]>
# Conflicts:
#	README.md
#	media/engine/webrtc_video_engine.cc
#	media/engine/webrtc_video_engine.h
#	modules/audio_device/audio_device_impl.cc
#	sdk/BUILD.gn
#	sdk/android/BUILD.gn
#	sdk/android/api/org/webrtc/RtpParameters.java
#	sdk/android/api/org/webrtc/SimulcastVideoEncoder.java
#	sdk/android/api/org/webrtc/SimulcastVideoEncoderFactory.java
#	sdk/android/api/org/webrtc/VideoCodecInfo.java
#	sdk/android/src/jni/pc/rtp_parameters.cc
#	sdk/android/src/jni/simulcast_video_encoder.cc
#	sdk/android/src/jni/simulcast_video_encoder.h
#	sdk/android/src/jni/video_codec_info.cc
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule+Private.h
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule.h
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule.mm
#	sdk/objc/api/peerconnection/RTCAudioTrack.mm
#	sdk/objc/api/peerconnection/RTCIODevice+Private.h
#	sdk/objc/api/peerconnection/RTCIODevice.mm
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory.h
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
#	sdk/objc/api/video_codec/RTCVideoEncoderSimulcast.h
#	sdk/objc/api/video_codec/RTCVideoEncoderSimulcast.mm
#	sdk/objc/base/RTCAudioRenderer.h
#	sdk/objc/components/video_codec/RTCVideoEncoderFactorySimulcast.h
#	sdk/objc/components/video_codec/RTCVideoEncoderFactorySimulcast.mm

* fix: duplicate simulcast entries

* remove duplicate declaration

* remove duplicate audioDeviceModule

* fix: removed livekit's external audio processor

* fix: add back simulcast factories

* Fix missing RTC_OBJC_TYPE macros

* Fix missing headers and Metal linking

# Conflicts:
#	sdk/BUILD.gn

* Fix Mac Catalyst `RTCCameraVideoCapturer` rotation (#126)

* Fix set frame transformer (#125)

* Fix webrtc_voice_engine not notifying mute change (#128)

Looks like this line was missed during the m125 update.

webrtc-sdk/webrtc@272127d#diff-56f5e0c459b287281ef3b0431d3f4129e8e4be4c6955d845bcb22210f08b7ba5R2289

Adding it back in so that mic is properly released when muted.
# Conflicts:
#	media/engine/webrtc_voice_engine.cc

* android: Allow for skipping checking the audio playstate if needed (#129)

Pausing/stopping the audio track can lead to a race condition against
the AudioTrackThread due to this assert. Normally this is fine since
directly pausing/stopping isn't possible, but user is using reflection
to workaround another audio issue (muted participants still have a
sending audio stream which keeps the audio alive, affecting global sound
if in the background).

Not a full fix, as would like to manually control the audio track
directly (needs a bigger fix to handle proper synchronization before
allowing public access), but this will work through reflection (user
takes responsibility for usage).

* Allow to pass in capture session to RTCCameraVideoCapturer (#132)

Expose initializers to pass in capture session to RTCCameraVideoCapturer
so we can use AVCaptureMultiCamSession etc to capture front and back
simultaneously for iOS.

* Fix NetworkMonitor race condition when dispatching native observers (#135)

There is a race condition in NetworkMonitor where native observers may
be removed concurrently with a notification being dispatched, leading to
a dangling pointer dereference (trying to dispatch an observer that was
already removed and destroyed), and from there a crash with access
violation.

By ensuring dispatching to native observers is done within the
synchronization lock that guards additions/removals of native observers
protects against this race condition. Since native observers callbacks
are posted to the networking thread in the C++ side anyway, there should
be no risk of deadlock/starvation due to long-running observers.

Bug: webrtc:15837
Change-Id: Id2b788f102dbd25de76ceed434c4cd68aa9a569e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338643
Reviewed-by: Taylor Brandstetter <[email protected]>
Commit-Queue: Harald Alvestrand <[email protected]>
Reviewed-by: Harald Alvestrand <[email protected]>
Cr-Commit-Position: refs/heads/main@{#42256}

Co-authored-by: Guy Hershenbaum <[email protected]>

* Support for Vision Pro (#131)

TODO:
- [x]  fix compile for RTCCameraVideoCapturer
- [ ]  fix RTCMTLRenderer ?

---------

Co-authored-by: Hiroshi Horie <[email protected]>

* Multicam support (#137)

TODO: 
- [x] Return `.systemPreferredCamera` for devices (visionOS only).
- [x] Use `AVCaptureMultiCamSession` only if `isMultiCamSupported` is
true.
- [x] Silence statusBarOrientation warning.

---------

Co-authored-by: [email protected] <[email protected]>

* tvOS support (#139)

17.0+ only atm

---------

Co-authored-by: cloudwebrtc <[email protected]>

* Add isDisposed to MediaStreamTrack (#140)

* chore: handle invalid cipher from key size. (#142)

* Allow software AEC for Simulator (#143)

~Allow to use "googEchoCancellation" constraint for software AEC.
For devices "googEchoCancellation" should be false to use
VoiceProcessingIO.~

* Fix AudioRenderer crash & expose AVAudioPCMBuffer (#144)

* fix: Fix bug for bypass voice processing. (#147)

* chore: remove aes cbc for framecryptor. (#145)

* Change audio renderer output format (#149)

Instead of converting to Float, output original Int data without
conversion.
Output the raw format and convert when required.

* Fixed issue with missing network interfaces on iOS (#151)

Related issue: webrtc-sdk/webrtc#148
Cherry-pick :
https://webrtc.googlesource.com/src/+/fea60ef8e72fb17b4f8a5363aff7e63ab8027b4f

Fixed issue with network interfaces due to a missing return value in the
"nw_path_enumerate_interfaces(...)" block. Exposed in iOS 18,
RTCNetworkMonitor::initWithObserver will only enumerate the first
interface, instead of all device interfaces

Bug: webrtc:359245764
Change-Id: Ifb9f28c33306c0096476a4afb0cdb4d734e87b2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359541
Auto-Submit: Corby <[email protected]>
Commit-Queue: Jonas Oreland <[email protected]>
Reviewed-by: Kári Helgason <[email protected]>
Reviewed-by: Jonas Oreland <[email protected]>
Cr-Commit-Position: refs/heads/main@{#42818}

Co-authored-by: Corby Hoback <[email protected]>

* Custom audio input for Android (#154)

# Conflicts:
#	sdk/android/api/org/webrtc/audio/JavaAudioDeviceModule.java
#	sdk/android/src/java/org/webrtc/audio/WebRtcAudioRecord.java

---------

Co-authored-by: CloudWebRTC <[email protected]>
Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: davidliu <[email protected]>
Co-authored-by: Guy Hershenbaum <[email protected]>
Co-authored-by: Corby Hoback <[email protected]>
hiroshihorie added a commit that referenced this pull request Dec 9, 2024
commit 102940838f859941a41b2f3062d4eb8a61be6414
Author: Hiroshi Horie <[email protected]>
Date:   Thu Dec 5 15:27:34 2024 +0700

    audio engine 1

commit d31187b
Author: Hiroshi Horie <[email protected]>
Date:   Thu Dec 5 15:26:38 2024 +0700

    Connect voice engine mute to adm

commit 3df68d4
Author: Hiroshi Horie <[email protected]>
Date:   Fri Oct 11 20:41:44 2024 +0900

    Revert "Stop recording on mute (turn off mic indicator) (#55)"

    This reverts commit c0209ef.

commit b99fd2c
Author: Michael Sloan <[email protected]>
Date:   Mon Dec 2 18:59:22 2024 -0700

    Use `rtc::ToString` instead of `std::to_string` in `SocketAddress::PortAsString()` (#156)

    Justification for this change is that `std::to_string` should be avoided
    as it uses the user's locale and calls to it get serialized, which is
    bad for concurrency.

    My actual motivation for this is quite bizarre. Before this change, with
    Zed's use of the LiveKit Rust SDK, I was getting connection strings that
    were not valid utf-8, instead having a port of
    `3\u0000\u0000\u001c\u0000`. I have not figured out how that could
    happen or why this change fixes it.

commit 543121b
Author: davidliu <[email protected]>
Date:   Wed Oct 30 20:33:46 2024 -0700

    Custom audio input for Android (#154)
hiroshihorie added a commit that referenced this pull request Dec 10, 2024
hiroshihorie added a commit that referenced this pull request Jan 29, 2025
commit 98dc0ac
Author: Hiroshi Horie <[email protected]>
Date:   Thu Jan 23 03:27:20 2025 +0900

    Rendering fix

commit 345f8b7
Author: Hiroshi Horie <[email protected]>
Date:   Thu Jan 23 00:41:35 2025 +0900

    Manual rendering

commit be003d5
Author: Hiroshi Horie <[email protected]>
Date:   Wed Jan 22 12:03:18 2025 +0900

    RTCAudioDeviceModuleDelegate

commit 2babb14
Author: Hiroshi Horie <[email protected]>
Date:   Fri Jan 17 16:18:39 2025 +0900

    Squashed recent improvements

    Pre initialize mode
    Pre initialize logic
    Persistent
    Checks
    Fix buffer logic
    Patch default input_mute state
    Buffer checks
    Start buffer on enable
    Delay estimate 0
    Stop engine on interrupt
    Pass should_resume
    Silence warning
    Correct session config
    Fix state
    Start logic
    Misc
    Rem ses
    Rem ses2
    State helper
    Minor patch
    Simplify
    Change stop create order
    Working state
    Ref
    State helpers

commit 235da97
Author: Hiroshi Horie <[email protected]>
Date:   Tue Jan 14 15:52:32 2025 +0900

    Squashed recent progress

commit 6ba820c
Author: Hiroshi Horie <[email protected]>
Date:   Tue Dec 31 01:57:09 2024 +0900

    Squashed recent progress

    Fix adm selection

    Fixes

    Revert adm selection in audio_device_impl

    Rename IsManualRenderingMode

    Simplify pcm buffer delegate

    Fixes

    Fixes

    Ducking config

    Strip manual rendering logic

    Runtime-ducking config

    Fix compile

    Fix start recording

    Connect output

    Buffer logic

    Enable output when input is enabled

commit 49ca1ee
Author: Hiroshi Horie <[email protected]>
Date:   Sun Dec 22 04:32:07 2024 +0700

    Check AGC

commit 5bbeb48
Author: Hiroshi Horie <[email protected]>
Date:   Sat Dec 21 14:15:31 2024 +0700

    Debug print audio graph

commit 631126f
Author: Hiroshi Horie <[email protected]>
Date:   Fri Dec 20 23:24:42 2024 +0700

    Fix macOS vp

commit e07b814
Author: Hiroshi Horie <[email protected]>
Date:   Tue Dec 17 12:28:55 2024 +0700

    Clean up imports

commit 1bdb158
Author: Hiroshi Horie <[email protected]>
Date:   Wed Dec 11 12:35:12 2024 +0700

    Muted talker detection

commit 0324b22
Author: Hiroshi Horie <[email protected]>
Date:   Mon Dec 16 21:11:45 2024 +0700

    Rename AudioDeviceSink

commit ed22ffb
Author: Hiroshi Horie <[email protected]>
Date:   Tue Dec 17 01:11:23 2024 +0700

    Move to private method

commit db00fe4
Author: Hiroshi Horie <[email protected]>
Date:   Wed Dec 11 00:16:55 2024 +0700

    Other audio ducking

commit a7282bd
Author: Hiroshi Horie <[email protected]>
Date:   Thu Dec 5 15:27:34 2024 +0700

    AudioEngine

commit d31187b
Author: Hiroshi Horie <[email protected]>
Date:   Thu Dec 5 15:26:38 2024 +0700

    Connect voice engine mute to adm

commit 3df68d4
Author: Hiroshi Horie <[email protected]>
Date:   Fri Oct 11 20:41:44 2024 +0900

    Revert "Stop recording on mute (turn off mic indicator) (#55)"

    This reverts commit c0209ef.
pblazej pushed a commit that referenced this pull request Jun 12, 2025
allow listen-only mode in AudioUnit, adjust when category changes (#2)

release mic when category changes (#5)

Change defaults to iOS defaults (#7)

Sync audio session config (#8)

feat: support bypass voice processing for iOS. (#15)

Remove MacBookPro audio pan right code (#22)

fix: Fix can't open mic alone when built-in AEC is enabled. (#29)

feat: add audio device changes detect for windows. (#41)

fix Linux compile (#47)

AudioUnit: Don't rely on category switch for mic indicator to turn off (#52)

Stop recording on mute (turn off mic indicator) (#55)

Cherry pick audio selection from m97 release (#35)

[Mac] Allow audio device selection (#21)

RTCAudioDeviceModule.outputDevice / inputDevice getter and setter (#80)

Allow custom audio processing by exposing AudioProcessingModule (#85)

Expose audio sample buffers for Android (#89)

feat: add external audio processor for android. (#103)

android: make audio output attributes modifiable (#118)

Fix external audio processor sample rate calculation (#108)

Expose remote audio sample buffers on RTCAudioTrack (#84)

Fix memory leak when creating audio CMSampleBuffer #86

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
Co-authored-by: davidliu <[email protected]>
(cherry picked from commit 7454824)

# Conflicts:
#	audio/audio_state.cc
#	call/audio_state.h
#	media/engine/webrtc_voice_engine.h
#	modules/audio_device/audio_device_impl.cc
#	modules/audio_device/include/audio_device.h
#	modules/audio_device/mac/audio_device_mac.cc
#	modules/audio_device/mac/audio_device_mac.h
#	sdk/objc/api/peerconnection/RTCAudioTrack+Private.h
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory+Native.h
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.mm
#	sdk/objc/components/audio/RTCAudioSessionConfiguration.m
#	sdk/objc/native/src/audio/audio_device_ios.mm
#	sdk/objc/native/src/audio/audio_device_module_ios.mm
#	sdk/objc/native/src/audio/voice_processing_audio_unit.mm
hiroshihorie added a commit that referenced this pull request Jul 10, 2025
commit 47b4b71
Author: Hiroshi Horie <[email protected]>
Date:   Thu Jul 10 17:01:34 2025 +0900

    Simplify AudioCustomProcessingAdapter

commit 09ec011
Author: Hiroshi Horie <[email protected]>
Date:   Thu Jul 10 15:26:06 2025 +0900

    Fix typo

commit 70272d0
Author: Hiroshi Horie <[email protected]>
Date:   Tue Jul 1 16:41:23 2025 +0900

    Revert LK prefix

commit 81a78b6
Merge: 316d768 bfcfa65
Author: Hiroshi Horie <[email protected]>
Date:   Sun Jun 29 19:57:16 2025 +0900

    Merge branch 'm125_release' into hiroshi/livekit-m125-adm-audioengine

commit bfcfa65
Author: Hiroshi Horie <[email protected]>
Date:   Sun Jun 29 19:55:16 2025 +0900

    Fix audio frame sample rate (#175)

    Fix audio frame sample rate when no senders are attached

commit 0df968e
Author: Harsh Shandilya <[email protected]>
Date:   Wed Jun 25 22:49:45 2025 +0530

    Fix missing `RTC_OBJC_TYPE` macro (#174)

    Specifying the `rtc_objc_prefix` flag fails the build for these symbols
    since the macro wasn't applied to them.

commit 316d768
Author: Hiroshi Horie <[email protected]>
Date:   Tue Jun 24 16:53:10 2025 +0900

    Change workaround sleep time to 0.1 sec

commit daeb79d
Author: Hiroshi Horie <[email protected]>
Date:   Sat May 24 01:05:49 2025 +0900

    Audio device symbols

commit 6e5f1c6
Author: Hiroshi Horie <[email protected]>
Date:   Sat May 24 00:50:03 2025 +0900

    Fix logging

commit 6a49562
Merge: 212f078 ed96590
Author: Hiroshi Horie <[email protected]>
Date:   Tue Jun 24 15:35:31 2025 +0900

    Merge branch 'm125_release' into hiroshi/livekit-m125-adm-audioengine

commit 212f078
Merge: a58a087 7ec4c03
Author: Hiroshi Horie <[email protected]>
Date:   Thu May 22 10:56:54 2025 +0900

    Merge branch 'm125_release' into hiroshi/livekit-m125-adm-audioengine

commit a58a087
Author: Hiroshi Horie <[email protected]>
Date:   Thu May 15 15:36:56 2025 +0900

    macOS device patch 1

    Format

    Log device name

    Default patch 1

    Engine start bug workaround

    Change sleep time

    Restart engine only if stopped

    Patch

    Default device update count

    Recreate on device change

commit a1bb19a
Author: Hiroshi Horie <[email protected]>
Date:   Sat May 3 15:13:47 2025 +0900

    Move back device config timing

commit 6566dd4
Author: Hiroshi Horie <[email protected]>
Date:   Sat May 3 00:11:51 2025 +0900

    Rollback logic

commit fa864f3
Author: Hiroshi Horie <[email protected]>
Date:   Fri May 2 23:37:38 2025 +0900

    Only update state if apply succeeds

commit 9f27f86
Author: Hiroshi Horie <[email protected]>
Date:   Fri May 2 23:37:01 2025 +0900

    Move set device logic earlier

commit 21ee7f0
Author: Hiroshi Horie <[email protected]>
Date:   Thu Apr 10 23:56:28 2025 +0800

    input mixer mute mode

commit e114436
Author: Hiroshi Horie <[email protected]>
Date:   Thu Apr 3 18:25:09 2025 +0800

    Unmute on stop recording

commit a940515
Author: Hiroshi Horie <[email protected]>
Date:   Sat Mar 29 00:19:40 2025 +0800

    Inline input output node check

commit 07ae103
Author: Hiroshi Horie <[email protected]>
Date:   Thu Mar 27 17:48:32 2025 +0800

    Specify adm type on pc init

commit adfee74
Author: Hiroshi Horie <[email protected]>
Date:   Thu Mar 27 18:01:05 2025 +0800

    Simplify pc factory init

    p3

commit 68ef845
Author: Hiroshi Horie <[email protected]>
Date:   Wed Mar 26 02:41:46 2025 +0800

    Don't mute when removing audio stream

commit 081cc0f
Author: Hiroshi Horie <[email protected]>
Date:   Thu Apr 3 15:19:46 2025 +0800

    Revert "Engine state transition"

    This reverts commit 821c91a.

commit e6614c9
Author: Hiroshi Horie <[email protected]>
Date:   Thu Mar 20 18:06:37 2025 +0800

    Fix state check

commit 584715e
Merge: 3c0a82e 1d5d3b8
Author: Hiroshi Horie <[email protected]>
Date:   Thu Mar 20 16:24:33 2025 +0800

    Merge branch 'm125_release' into hiroshi/livekit-m125-adm-audioengine

commit 3c0a82e
Merge: 821c91a 762d567
Author: Hiroshi Horie <[email protected]>
Date:   Thu Mar 20 16:21:45 2025 +0800

    Merge branch 'hiroshi/livekit-m125-adm-audioengine-fix-stop-crash' into hiroshi/livekit-m125-adm-audioengine

commit 762d567
Author: Hiroshi Horie <[email protected]>
Date:   Thu Mar 20 16:19:44 2025 +0800

    setMicrophoneMuted

commit 1d91e93
Author: Hiroshi Horie <[email protected]>
Date:   Thu Mar 13 01:16:12 2025 +0900

    Metal renderer scale patch

commit 9dbf95c
Author: Hiroshi Horie <[email protected]>
Date:   Tue Mar 11 23:39:42 2025 +0900

    Safe node detach

commit 821c91a
Author: Hiroshi Horie <[email protected]>
Date:   Sun Mar 9 00:49:56 2025 +0900

    Engine state transition

    Squashed:
    Rename AudioEngineState
    Refactor engine observer
    Refactor EngineStateTransition
    Move EngineStateTransition
    Refactor EngineState
    State as class

commit 0b84894
Author: Hiroshi Horie <[email protected]>
Date:   Fri Mar 7 19:33:08 2025 +0900

    adm return error code

commit b1074f3
Author: Hiroshi Horie <[email protected]>
Date:   Thu Mar 6 05:57:11 2025 +0900

    propagate error codes

commit 01f1554
Author: Hiroshi Horie <[email protected]>
Date:   Thu Mar 6 05:18:29 2025 +0900

    Fix buffer state check

commit 4a5ac4c
Author: Hiroshi Horie <[email protected]>
Date:   Wed Mar 5 18:29:27 2025 +0900

    Fix device format error crash & return error

    Squashed:
    Buffer checks only when modify state success
    Create converter only when required
    Catch output device errors also
    Return error if input not available
    Define error codes
    ApplyEngineState
    ModifyEngineState

commit a890367
Author: Hiroshi Horie <[email protected]>
Date:   Tue Feb 18 19:33:38 2025 +0900

    set vp enabled property

commit e2a567b
Author: Hiroshi Horie <[email protected]>
Date:   Mon Feb 17 18:07:46 2025 +0900

    Explicit Int16 conversion

commit fa4cddc
Author: Hiroshi Horie <[email protected]>
Date:   Sat Feb 15 03:36:28 2025 +0900

    set audio device buffer from rtc format

commit 6732a8c
Author: Hiroshi Horie <[email protected]>
Date:   Fri Feb 14 16:59:58 2025 +0900

    Fix input mixer connection count

commit 37f9711
Author: Hiroshi Horie <[email protected]>
Date:   Mon Feb 10 20:59:53 2025 +0900

    Initial unmute for restart mute mode

commit 24117ac
Author: Hiroshi Horie <[email protected]>
Date:   Mon Feb 10 10:22:29 2025 +0900

    Refactor

commit cbccb5d
Author: Hiroshi Horie <[email protected]>
Date:   Sun Feb 9 17:54:35 2025 +0900

    is microphone muted property

commit d8903c8
Author: Hiroshi Horie <[email protected]>
Date:   Sun Feb 9 13:38:17 2025 +0900

    is engine running property

commit 712009d
Author: Hiroshi Horie <[email protected]>
Date:   Sun Feb 9 00:27:48 2025 +0900

    Fix state getters

commit 4f65581
Author: Hiroshi Horie <[email protected]>
Date:   Mon Feb 10 21:15:38 2025 +0900

    Simplify logic

commit 40e7d20
Author: Hiroshi Horie <[email protected]>
Date:   Sat Feb 8 20:21:43 2025 +0900

    Mute mode

commit 2fd53d6
Author: Hiroshi Horie <[email protected]>
Date:   Sat Feb 8 00:31:41 2025 +0900

    Fix audio frame sample rate when no senders

commit 1b4bcce
Author: Hiroshi Horie <[email protected]>
Date:   Fri Feb 7 22:03:45 2025 +0900

    apm mute / unmute

commit 0b96f9a
Author: Hiroshi Horie <[email protected]>
Date:   Mon Feb 3 20:12:00 2025 +0900

    Update io node connection methods

commit 1460fb4
Author: Hiroshi Horie <[email protected]>
Date:   Fri Jan 31 02:29:52 2025 +0900

    Catch exception at start

commit fbb0ed7
Author: Hiroshi Horie <[email protected]>
Date:   Thu Jan 30 12:17:44 2025 +0900

    Fix engine state

commit 1c01168
Author: Hiroshi Horie <[email protected]>
Date:   Thu Jan 30 04:12:13 2025 +0900

    Disable apm option manipulation for ios mac

commit 2ba3fd6
Author: Hiroshi Horie <[email protected]>
Date:   Wed Jan 29 18:37:01 2025 +0900

    macos device logic

commit 7f0aadb
Author: Hiroshi Horie <[email protected]>
Date:   Tue Jan 28 15:52:17 2025 +0900

    Start fail workaround

commit 151ac87
Merge: 83551f3 0397078
Author: Hiroshi Horie <[email protected]>
Date:   Tue Jan 28 11:42:46 2025 +0900

    Merge branch 'hiroshi/livekit-m125' into hiroshi/livekit-m125-adm-audioengine

commit 0397078
Merge: bbe4412 844bafa
Author: Hiroshi Horie <[email protected]>
Date:   Tue Jan 28 11:41:47 2025 +0900

    Merge branch 'm125_release' into hiroshi/livekit-m125

commit 83551f3
Author: Hiroshi Horie <[email protected]>
Date:   Tue Jan 28 11:36:18 2025 +0900

    Update delegate nullable node for output

commit 85a0628
Author: Hiroshi Horie <[email protected]>
Date:   Mon Jan 27 13:04:14 2025 +0900

    Fix build

commit d9c7165
Author: Hiroshi Horie <[email protected]>
Date:   Sun Jan 26 17:02:28 2025 +0900

    Mac device

commit 261126c
Author: Hiroshi Horie <[email protected]>
Date:   Sun Jan 26 16:49:29 2025 +0900

    AGC & AEC available

commit 78c9425
Author: Hiroshi Horie <[email protected]>
Date:   Sun Jan 26 08:54:06 2025 +0900

    Engine reconfigure

commit 536e8ff
Author: Hiroshi Horie <[email protected]>
Date:   Fri Jan 24 00:29:33 2025 +0900

    Mac aec off by default

    AudioOptions initially false

commit 7ece395
Author: Hiroshi Horie <[email protected]>
Date:   Sat Jan 25 07:06:43 2025 +0900

    bypass & agc

commit 591eb97
Author: Hiroshi Horie <[email protected]>
Date:   Fri Jan 24 05:06:52 2025 +0900

    Re-wire manual audio input

commit 917c720
Author: Hiroshi Horie <[email protected]>
Date:   Thu Jan 23 23:41:20 2025 +0900

    Squashed commit of the following:

    commit 98dc0ac
    Author: Hiroshi Horie <[email protected]>
    Date:   Thu Jan 23 03:27:20 2025 +0900

        Rendering fix

    commit 345f8b7
    Author: Hiroshi Horie <[email protected]>
    Date:   Thu Jan 23 00:41:35 2025 +0900

        Manual rendering

    commit be003d5
    Author: Hiroshi Horie <[email protected]>
    Date:   Wed Jan 22 12:03:18 2025 +0900

        RTCAudioDeviceModuleDelegate

    commit 2babb14
    Author: Hiroshi Horie <[email protected]>
    Date:   Fri Jan 17 16:18:39 2025 +0900

        Squashed recent improvements

        Pre initialize mode
        Pre initialize logic
        Persistent
        Checks
        Fix buffer logic
        Patch default input_mute state
        Buffer checks
        Start buffer on enable
        Delay estimate 0
        Stop engine on interrupt
        Pass should_resume
        Silence warning
        Correct session config
        Fix state
        Start logic
        Misc
        Rem ses
        Rem ses2
        State helper
        Minor patch
        Simplify
        Change stop create order
        Working state
        Ref
        State helpers

    commit 235da97
    Author: Hiroshi Horie <[email protected]>
    Date:   Tue Jan 14 15:52:32 2025 +0900

        Squashed recent progress

    commit 6ba820c
    Author: Hiroshi Horie <[email protected]>
    Date:   Tue Dec 31 01:57:09 2024 +0900

        Squashed recent progress

        Fix adm selection

        Fixes

        Revert adm selection in audio_device_impl

        Rename IsManualRenderingMode

        Simplify pcm buffer delegate

        Fixes

        Fixes

        Ducking config

        Strip manual rendering logic

        Runtime-ducking config

        Fix compile

        Fix start recording

        Connect output

        Buffer logic

        Enable output when input is enabled

    commit 49ca1ee
    Author: Hiroshi Horie <[email protected]>
    Date:   Sun Dec 22 04:32:07 2024 +0700

        Check AGC

    commit 5bbeb48
    Author: Hiroshi Horie <[email protected]>
    Date:   Sat Dec 21 14:15:31 2024 +0700

        Debug print audio graph

    commit 631126f
    Author: Hiroshi Horie <[email protected]>
    Date:   Fri Dec 20 23:24:42 2024 +0700

        Fix macOS vp

    commit e07b814
    Author: Hiroshi Horie <[email protected]>
    Date:   Tue Dec 17 12:28:55 2024 +0700

        Clean up imports

    commit 1bdb158
    Author: Hiroshi Horie <[email protected]>
    Date:   Wed Dec 11 12:35:12 2024 +0700

        Muted talker detection

    commit 0324b22
    Author: Hiroshi Horie <[email protected]>
    Date:   Mon Dec 16 21:11:45 2024 +0700

        Rename AudioDeviceSink

    commit ed22ffb
    Author: Hiroshi Horie <[email protected]>
    Date:   Tue Dec 17 01:11:23 2024 +0700

        Move to private method

    commit db00fe4
    Author: Hiroshi Horie <[email protected]>
    Date:   Wed Dec 11 00:16:55 2024 +0700

        Other audio ducking

    commit a7282bd
    Author: Hiroshi Horie <[email protected]>
    Date:   Thu Dec 5 15:27:34 2024 +0700

        AudioEngine

    commit d31187b
    Author: Hiroshi Horie <[email protected]>
    Date:   Thu Dec 5 15:26:38 2024 +0700

        Connect voice engine mute to adm

    commit 3df68d4
    Author: Hiroshi Horie <[email protected]>
    Date:   Fri Oct 11 20:41:44 2024 +0900

        Revert "Stop recording on mute (turn off mic indicator) (#55)"

        This reverts commit c0209ef.

commit bbe4412
Merge: 0aca080 f5243e3
Author: Hiroshi Horie <[email protected]>
Date:   Fri Jan 17 09:43:21 2025 +0900

    Merge branch 'm125_release' into hiroshi/livekit-m125

commit 0aca080
Merge: d29d62c b99fd2c
Author: Hiroshi Horie <[email protected]>
Date:   Mon Dec 9 17:12:33 2024 +0700

    Merge branch 'm125_release' into hiroshi/livekit-m125

commit d29d62c
Author: Hiroshi Horie <[email protected]>
Date:   Sat Oct 19 17:12:57 2024 +0900

    Remove duplicate RTCCameraVideoCapturer init methods

commit f50e159
Merge: 9742a13 cd6792e
Author: Hiroshi Horie <[email protected]>
Date:   Sat Oct 19 16:57:24 2024 +0900

    Merge branch 'm125_release' into livekit-prefixed-m125

commit 9742a13
Merge: 7c29b54 c38ce7f
Author: Hiroshi Horie <[email protected]>
Date:   Sat Oct 19 16:25:03 2024 +0900

    Merge branch 'm125_release' into livekit-prefixed-m125

commit 7c29b54
Merge: 6902a18 0ae5688
Author: Hiroshi Horie <[email protected]>
Date:   Fri Oct 18 04:34:17 2024 +0900

    Merge branch 'm125_release' into livekit-prefixed-m125

commit 6902a18
Merge: 00fd89c 7662c43
Author: Hiroshi Horie <[email protected]>
Date:   Tue Sep 24 03:14:40 2024 +0900

    Merge branch 'm125_release' into livekit-prefixed-m125

commit 00fd89c
Merge: bd25079 3c17c96
Author: Hiroshi Horie <[email protected]>
Date:   Mon Sep 23 18:42:48 2024 +0900

    Merge branch 'm125_release' into livekit-prefixed-m125

commit bd25079
Merge: f8f9dc1 cdc3bba
Author: Hiroshi Horie <[email protected]>
Date:   Tue Sep 17 11:24:07 2024 +0900

    Merge branch 'm125_release' into livekit-prefixed-m125

commit f8f9dc1
Merge: 67cf254 c852b0e
Author: Hiroshi Horie <[email protected]>
Date:   Wed Aug 21 01:36:38 2024 +0900

    Merge branch 'm125_release' into livekit-prefixed-m125

commit 67cf254
Author: Hiroshi Horie <[email protected]>
Date:   Wed Aug 14 01:48:35 2024 +0900

    Prefix RTCDevice category

commit d05816e
Merge: 634b7d0 6bb47f5
Author: Hiroshi Horie <[email protected]>
Date:   Wed Aug 14 01:27:36 2024 +0900

    Merge branch 'm125_release' into livekit-prefixed-m125

commit 634b7d0
Merge: 07d9a46 d1b814a
Author: Hiroshi Horie <[email protected]>
Date:   Tue Jul 16 15:19:04 2024 +0800

    Merge branch 'm125_release' into livekit-prefixed-m125

commit d1b814a
Author: Hiroshi Horie <[email protected]>
Date:   Sun Jul 14 01:45:07 2024 +0900

    Allow to pass in capture session to RTCCameraVideoCapturer

commit 07d9a46
Merge: b6d07b8 7ddfc43
Author: Hiroshi Horie <[email protected]>
Date:   Tue Jul 9 15:06:55 2024 +0900

    Merge branch 'm125_release' into livekit-prefixed-m125

commit b6d07b8
Merge: 8b1c7f3 432a28b
Author: Hiroshi Horie <[email protected]>
Date:   Fri Jun 21 04:52:40 2024 +0900

    Merge branch 'm125_release' into livekit-prefixed-m125

commit 8b1c7f3
Author: Hiroshi Horie <[email protected]>
Date:   Fri Jun 14 18:07:04 2024 +0900

    LK prefixed framework

commit aeef504
Author: Hiroshi Horie <[email protected]>
Date:   Fri Jun 14 16:53:16 2024 +0900

    Network monitor always enabled

commit fd6c13d
Author: Hiroshi Horie <[email protected]>
Date:   Fri Jun 14 18:10:54 2024 +0900

    Fix missing headers and Metal linking

commit b1f993d
Author: Hiroshi Horie <[email protected]>
Date:   Fri Jun 14 16:58:13 2024 +0900

    Fix missing RTC_OBJC_TYPE macros
ipavlidakis pushed a commit to GetStream/webrtc that referenced this pull request Jul 28, 2025
* Update to m125. (#119)

Use M125 as the latest version and migrate historical patches to m125

Patches Group:

## 1. Update README.md
webrtc-sdk/webrtc@b6c65fc
* Add Apache-2.0 license and some note to README.md. (#9)
* Updated readme detailing changes from original (#42)
* Adding membrane framework (#51)
* Updated readme (#83)

## 2. Audio Device Optimization
webrtc-sdk/webrtc@7454824
* allow listen-only mode in AudioUnit, adjust when category changes
(webrtc-sdk/webrtc#2)
* release mic when category changes
(webrtc-sdk/webrtc#5)
* Change defaults to iOS defaults
(webrtc-sdk/webrtc#7)
* Sync audio session config
(webrtc-sdk/webrtc#8)
* feat: support bypass voice processing for iOS.
(webrtc-sdk/webrtc#15)
* Remove MacBookPro audio pan right code
(webrtc-sdk/webrtc#22)
* fix: Fix can't open mic alone when built-in AEC is enabled.
(webrtc-sdk/webrtc#29)
* feat: add audio device changes detect for windows.
(webrtc-sdk/webrtc#41)
* fix Linux compile (webrtc-sdk/webrtc#47)
* AudioUnit: Don't rely on category switch for mic indicator to turn off
(webrtc-sdk/webrtc#52)
* Stop recording on mute (turn off mic indicator)
(webrtc-sdk/webrtc#55)
* Cherry pick audio selection from m97 release
(webrtc-sdk/webrtc#35)
* [Mac] Allow audio device selection
(webrtc-sdk/webrtc#21)
* RTCAudioDeviceModule.outputDevice / inputDevice getter and setter
(webrtc-sdk/webrtc#80)
* Allow custom audio processing by exposing AudioProcessingModule
(webrtc-sdk/webrtc#85)
* Expose audio sample buffers for Android
(webrtc-sdk/webrtc#89)
* feat: add external audio processor for android.
(webrtc-sdk/webrtc#103)
* android: make audio output attributes modifiable
(webrtc-sdk/webrtc#118)
* Fix external audio processor sample rate calculation
(webrtc-sdk/webrtc#108)
* Expose remote audio sample buffers on RTCAudioTrack
(webrtc-sdk/webrtc#84)
* Fix memory leak when creating audio CMSampleBuffer
webrtc-sdk/webrtc#86

## 3. Simulcast/SVC support for iOS/Android.
webrtc-sdk/webrtc@b0b9fe9

- Simulcast support for iOS SDK (#4)
- Support for simulcast in Android SDK (#3)
- include simulcast headers for mac also (#10)
- Fix simulcast using hardware encoder on Android (#48)
- Add scalabilityMode support for AV1/VP9. (#90)

## 4. Android improvements.
webrtc-sdk/webrtc@9aaaab5
- Start/Stop receiving stream method for VideoTrack (#25)
- Properly remove observer upon deconstruction (#26)
- feat: Expose setCodecPreferences/getCapabilities for android. (#61)
- fix: add WrappedVideoDecoderFactory.java. (#74)

## 5. Darwin improvements
webrtc-sdk/webrtc@a13ea17
- [Mac/iOS] feat: Add RTCYUVHelper for darwin. (#28)
- Cross-platform `RTCMTLVideoView` for both iOS / macOS (#40)
- rotationOverride should not be assign (#44)
- [ObjC] Expose properties / methods required for AV1 codec support
(#60)
- Workaround: Render PixelBuffer in RTCMTLVideoView (#58)
- Improve iOS/macOS H264 encoder (#70)
- fix: fix video encoder not resuming correctly upon foregrounding
(#75).
- add PrivacyInfo.xcprivacy to darwin frameworks. (#112)
- Add NSPrivacyCollectedDataTypes key to xcprivacy file (#114)
- Thread-safe `RTCInitFieldTrialDictionary` (#116)
- Set RTCCameraVideoCapturer initial zoom factor (#121)
- Unlock configuration before starting capture session (#122)

## 6. Desktop Capture for macOS.
webrtc-sdk/webrtc@841d78f
- [Mac] feat: Support screen capture for macOS. (#24) (#36)
- fix: Get thumbnails asynchronously. (#37)
- fix: Use CVPixelBuffer to build DesktopCapture Frame, fix the crash
caused by non-CVPixelBuffer frame in RTCVideoEncoderH264 that cannot be
cropped. (#63)
- Fix the crash when setting the fps of the virtual camera. (#62)

## 7. Frame Cryptor Support.
webrtc-sdk/webrtc@fc08745
- feat: Frame Cryptor (aes gcm/cbc). (#54)
- feat: key ratchet/derive. (#66)
- fix: skip invalid key when decryption failed. (#81)
- Improve e2ee, add setSharedKey to KeyProvider. (#88)
- add failure tolerance for framecryptor. (#91)
- fix h264 freeze. (#93)
- Fix/send frame cryptor events from signaling thread (#95)
- more improvements for E2EE. (#96)
- remove too verbose logs (#107)
- Add key ring size to keyProviderOptions. (#109)

## 8. Other improvements.
webrtc-sdk/webrtc@eed6c8a
- Added yuv_helper (#57)
- ABGRToI420, ARGBToI420 & ARGBToRGB24 (#65)
- more yuv wrappers (#87)
- Fix naming for yuv helper (#113)
- Fix missing `RTC_OBJC_TYPE` macros (#100)

---------

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
Co-authored-by: davidliu <[email protected]>
Co-authored-by: Angelika Serwa <[email protected]>
Co-authored-by: Théo Monnom <[email protected]>
# Conflicts:
#	README.md
#	media/engine/webrtc_video_engine.cc
#	media/engine/webrtc_video_engine.h
#	modules/audio_device/audio_device_impl.cc
#	sdk/BUILD.gn
#	sdk/android/BUILD.gn
#	sdk/android/api/org/webrtc/RtpParameters.java
#	sdk/android/api/org/webrtc/SimulcastVideoEncoder.java
#	sdk/android/api/org/webrtc/SimulcastVideoEncoderFactory.java
#	sdk/android/api/org/webrtc/VideoCodecInfo.java
#	sdk/android/src/jni/pc/rtp_parameters.cc
#	sdk/android/src/jni/simulcast_video_encoder.cc
#	sdk/android/src/jni/simulcast_video_encoder.h
#	sdk/android/src/jni/video_codec_info.cc
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule+Private.h
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule.h
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule.mm
#	sdk/objc/api/peerconnection/RTCAudioTrack.mm
#	sdk/objc/api/peerconnection/RTCIODevice+Private.h
#	sdk/objc/api/peerconnection/RTCIODevice.mm
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory.h
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
#	sdk/objc/api/video_codec/RTCVideoEncoderSimulcast.h
#	sdk/objc/api/video_codec/RTCVideoEncoderSimulcast.mm
#	sdk/objc/base/RTCAudioRenderer.h
#	sdk/objc/components/video_codec/RTCVideoEncoderFactorySimulcast.h
#	sdk/objc/components/video_codec/RTCVideoEncoderFactorySimulcast.mm

* fix: duplicate simulcast entries

* remove duplicate declaration

* remove duplicate audioDeviceModule

* fix: removed livekit's external audio processor

* fix: add back simulcast factories

* Fix missing RTC_OBJC_TYPE macros

* Fix missing headers and Metal linking

# Conflicts:
#	sdk/BUILD.gn

* Fix Mac Catalyst `RTCCameraVideoCapturer` rotation (#126)

* Fix set frame transformer (#125)

* Fix webrtc_voice_engine not notifying mute change (#128)

Looks like this line was missed during the m125 update.

webrtc-sdk/webrtc@272127d#diff-56f5e0c459b287281ef3b0431d3f4129e8e4be4c6955d845bcb22210f08b7ba5R2289

Adding it back in so that mic is properly released when muted.
# Conflicts:
#	media/engine/webrtc_voice_engine.cc

* android: Allow for skipping checking the audio playstate if needed (#129)

Pausing/stopping the audio track can lead to a race condition against
the AudioTrackThread due to this assert. Normally this is fine since
directly pausing/stopping isn't possible, but user is using reflection
to workaround another audio issue (muted participants still have a
sending audio stream which keeps the audio alive, affecting global sound
if in the background).

Not a full fix, as would like to manually control the audio track
directly (needs a bigger fix to handle proper synchronization before
allowing public access), but this will work through reflection (user
takes responsibility for usage).

* Allow to pass in capture session to RTCCameraVideoCapturer (#132)

Expose initializers to pass in capture session to RTCCameraVideoCapturer
so we can use AVCaptureMultiCamSession etc to capture front and back
simultaneously for iOS.

* Fix NetworkMonitor race condition when dispatching native observers (#135)

There is a race condition in NetworkMonitor where native observers may
be removed concurrently with a notification being dispatched, leading to
a dangling pointer dereference (trying to dispatch an observer that was
already removed and destroyed), and from there a crash with access
violation.

By ensuring dispatching to native observers is done within the
synchronization lock that guards additions/removals of native observers
protects against this race condition. Since native observers callbacks
are posted to the networking thread in the C++ side anyway, there should
be no risk of deadlock/starvation due to long-running observers.

Bug: webrtc:15837
Change-Id: Id2b788f102dbd25de76ceed434c4cd68aa9a569e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338643
Reviewed-by: Taylor Brandstetter <[email protected]>
Commit-Queue: Harald Alvestrand <[email protected]>
Reviewed-by: Harald Alvestrand <[email protected]>
Cr-Commit-Position: refs/heads/main@{#42256}

Co-authored-by: Guy Hershenbaum <[email protected]>

* Support for Vision Pro (#131)

TODO:
- [x]  fix compile for RTCCameraVideoCapturer
- [ ]  fix RTCMTLRenderer ?

---------

Co-authored-by: Hiroshi Horie <[email protected]>

* Multicam support (#137)

TODO:
- [x] Return `.systemPreferredCamera` for devices (visionOS only).
- [x] Use `AVCaptureMultiCamSession` only if `isMultiCamSupported` is
true.
- [x] Silence statusBarOrientation warning.

---------

Co-authored-by: [email protected] <[email protected]>

* tvOS support (#139)

17.0+ only atm

---------

Co-authored-by: cloudwebrtc <[email protected]>

* Add isDisposed to MediaStreamTrack (#140)

* chore: handle invalid cipher from key size. (#142)

* Allow software AEC for Simulator (#143)

~Allow to use "googEchoCancellation" constraint for software AEC.
For devices "googEchoCancellation" should be false to use
VoiceProcessingIO.~

* Fix AudioRenderer crash & expose AVAudioPCMBuffer (#144)

* fix: Fix bug for bypass voice processing. (#147)

* chore: remove aes cbc for framecryptor. (#145)

* Change audio renderer output format (#149)

Instead of converting to Float, output original Int data without
conversion.
Output the raw format and convert when required.

* Fixed issue with missing network interfaces on iOS (#151)

Related issue: webrtc-sdk/webrtc#148
Cherry-pick :
https://webrtc.googlesource.com/src/+/fea60ef8e72fb17b4f8a5363aff7e63ab8027b4f

Fixed issue with network interfaces due to a missing return value in the
"nw_path_enumerate_interfaces(...)" block. Exposed in iOS 18,
RTCNetworkMonitor::initWithObserver will only enumerate the first
interface, instead of all device interfaces

Bug: webrtc:359245764
Change-Id: Ifb9f28c33306c0096476a4afb0cdb4d734e87b2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359541
Auto-Submit: Corby <[email protected]>
Commit-Queue: Jonas Oreland <[email protected]>
Reviewed-by: Kári Helgason <[email protected]>
Reviewed-by: Jonas Oreland <[email protected]>
Cr-Commit-Position: refs/heads/main@{#42818}

Co-authored-by: Corby Hoback <[email protected]>

* Custom audio input for Android (#154)

# Conflicts:
#	sdk/android/api/org/webrtc/audio/JavaAudioDeviceModule.java
#	sdk/android/src/java/org/webrtc/audio/WebRtcAudioRecord.java

---------

Co-authored-by: CloudWebRTC <[email protected]>
Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: davidliu <[email protected]>
Co-authored-by: Guy Hershenbaum <[email protected]>
Co-authored-by: Corby Hoback <[email protected]>
ipavlidakis pushed a commit to GetStream/webrtc that referenced this pull request Jul 29, 2025
* Update to m125. (#119)

Use M125 as the latest version and migrate historical patches to m125

Patches Group:

## 1. Update README.md
webrtc-sdk/webrtc@b6c65fc
* Add Apache-2.0 license and some note to README.md. (#9)
* Updated readme detailing changes from original (#42)
* Adding membrane framework (#51)
* Updated readme (#83)

## 2. Audio Device Optimization
webrtc-sdk/webrtc@7454824
* allow listen-only mode in AudioUnit, adjust when category changes
(webrtc-sdk/webrtc#2)
* release mic when category changes
(webrtc-sdk/webrtc#5)
* Change defaults to iOS defaults
(webrtc-sdk/webrtc#7)
* Sync audio session config
(webrtc-sdk/webrtc#8)
* feat: support bypass voice processing for iOS.
(webrtc-sdk/webrtc#15)
* Remove MacBookPro audio pan right code
(webrtc-sdk/webrtc#22)
* fix: Fix can't open mic alone when built-in AEC is enabled.
(webrtc-sdk/webrtc#29)
* feat: add audio device changes detect for windows.
(webrtc-sdk/webrtc#41)
* fix Linux compile (webrtc-sdk/webrtc#47)
* AudioUnit: Don't rely on category switch for mic indicator to turn off
(webrtc-sdk/webrtc#52)
* Stop recording on mute (turn off mic indicator)
(webrtc-sdk/webrtc#55)
* Cherry pick audio selection from m97 release
(webrtc-sdk/webrtc#35)
* [Mac] Allow audio device selection
(webrtc-sdk/webrtc#21)
* RTCAudioDeviceModule.outputDevice / inputDevice getter and setter
(webrtc-sdk/webrtc#80)
* Allow custom audio processing by exposing AudioProcessingModule
(webrtc-sdk/webrtc#85)
* Expose audio sample buffers for Android
(webrtc-sdk/webrtc#89)
* feat: add external audio processor for android.
(webrtc-sdk/webrtc#103)
* android: make audio output attributes modifiable
(webrtc-sdk/webrtc#118)
* Fix external audio processor sample rate calculation
(webrtc-sdk/webrtc#108)
* Expose remote audio sample buffers on RTCAudioTrack
(webrtc-sdk/webrtc#84)
* Fix memory leak when creating audio CMSampleBuffer
webrtc-sdk/webrtc#86

## 3. Simulcast/SVC support for iOS/Android.
webrtc-sdk/webrtc@b0b9fe9

- Simulcast support for iOS SDK (#4)
- Support for simulcast in Android SDK (#3)
- include simulcast headers for mac also (#10)
- Fix simulcast using hardware encoder on Android (#48)
- Add scalabilityMode support for AV1/VP9. (#90)

## 4. Android improvements.
webrtc-sdk/webrtc@9aaaab5
- Start/Stop receiving stream method for VideoTrack (#25)
- Properly remove observer upon deconstruction (#26)
- feat: Expose setCodecPreferences/getCapabilities for android. (#61)
- fix: add WrappedVideoDecoderFactory.java. (#74)

## 5. Darwin improvements
webrtc-sdk/webrtc@a13ea17
- [Mac/iOS] feat: Add RTCYUVHelper for darwin. (#28)
- Cross-platform `RTCMTLVideoView` for both iOS / macOS (#40)
- rotationOverride should not be assign (#44)
- [ObjC] Expose properties / methods required for AV1 codec support
(#60)
- Workaround: Render PixelBuffer in RTCMTLVideoView (#58)
- Improve iOS/macOS H264 encoder (#70)
- fix: fix video encoder not resuming correctly upon foregrounding
(#75).
- add PrivacyInfo.xcprivacy to darwin frameworks. (#112)
- Add NSPrivacyCollectedDataTypes key to xcprivacy file (#114)
- Thread-safe `RTCInitFieldTrialDictionary` (#116)
- Set RTCCameraVideoCapturer initial zoom factor (#121)
- Unlock configuration before starting capture session (#122)

## 6. Desktop Capture for macOS.
webrtc-sdk/webrtc@841d78f
- [Mac] feat: Support screen capture for macOS. (#24) (#36)
- fix: Get thumbnails asynchronously. (#37)
- fix: Use CVPixelBuffer to build DesktopCapture Frame, fix the crash
caused by non-CVPixelBuffer frame in RTCVideoEncoderH264 that cannot be
cropped. (#63)
- Fix the crash when setting the fps of the virtual camera. (#62)

## 7. Frame Cryptor Support.
webrtc-sdk/webrtc@fc08745
- feat: Frame Cryptor (aes gcm/cbc). (#54)
- feat: key ratchet/derive. (#66)
- fix: skip invalid key when decryption failed. (#81)
- Improve e2ee, add setSharedKey to KeyProvider. (#88)
- add failure tolerance for framecryptor. (#91)
- fix h264 freeze. (#93)
- Fix/send frame cryptor events from signaling thread (#95)
- more improvements for E2EE. (#96)
- remove too verbose logs (#107)
- Add key ring size to keyProviderOptions. (#109)

## 8. Other improvements.
webrtc-sdk/webrtc@eed6c8a
- Added yuv_helper (#57)
- ABGRToI420, ARGBToI420 & ARGBToRGB24 (#65)
- more yuv wrappers (#87)
- Fix naming for yuv helper (#113)
- Fix missing `RTC_OBJC_TYPE` macros (#100)

---------

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
Co-authored-by: davidliu <[email protected]>
Co-authored-by: Angelika Serwa <[email protected]>
Co-authored-by: Théo Monnom <[email protected]>
# Conflicts:
#	README.md
#	media/engine/webrtc_video_engine.cc
#	media/engine/webrtc_video_engine.h
#	modules/audio_device/audio_device_impl.cc
#	sdk/BUILD.gn
#	sdk/android/BUILD.gn
#	sdk/android/api/org/webrtc/RtpParameters.java
#	sdk/android/api/org/webrtc/SimulcastVideoEncoder.java
#	sdk/android/api/org/webrtc/SimulcastVideoEncoderFactory.java
#	sdk/android/api/org/webrtc/VideoCodecInfo.java
#	sdk/android/src/jni/pc/rtp_parameters.cc
#	sdk/android/src/jni/simulcast_video_encoder.cc
#	sdk/android/src/jni/simulcast_video_encoder.h
#	sdk/android/src/jni/video_codec_info.cc
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule+Private.h
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule.h
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule.mm
#	sdk/objc/api/peerconnection/RTCAudioTrack.mm
#	sdk/objc/api/peerconnection/RTCIODevice+Private.h
#	sdk/objc/api/peerconnection/RTCIODevice.mm
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory.h
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
#	sdk/objc/api/video_codec/RTCVideoEncoderSimulcast.h
#	sdk/objc/api/video_codec/RTCVideoEncoderSimulcast.mm
#	sdk/objc/base/RTCAudioRenderer.h
#	sdk/objc/components/video_codec/RTCVideoEncoderFactorySimulcast.h
#	sdk/objc/components/video_codec/RTCVideoEncoderFactorySimulcast.mm

* fix: duplicate simulcast entries

* remove duplicate declaration

* remove duplicate audioDeviceModule

* fix: removed livekit's external audio processor

* fix: add back simulcast factories

* Fix missing RTC_OBJC_TYPE macros

* Fix missing headers and Metal linking

# Conflicts:
#	sdk/BUILD.gn

* Fix Mac Catalyst `RTCCameraVideoCapturer` rotation (#126)

* Fix set frame transformer (#125)

* Fix webrtc_voice_engine not notifying mute change (#128)

Looks like this line was missed during the m125 update.

webrtc-sdk/webrtc@272127d#diff-56f5e0c459b287281ef3b0431d3f4129e8e4be4c6955d845bcb22210f08b7ba5R2289

Adding it back in so that mic is properly released when muted.
# Conflicts:
#	media/engine/webrtc_voice_engine.cc

* android: Allow for skipping checking the audio playstate if needed (#129)

Pausing/stopping the audio track can lead to a race condition against
the AudioTrackThread due to this assert. Normally this is fine since
directly pausing/stopping isn't possible, but user is using reflection
to workaround another audio issue (muted participants still have a
sending audio stream which keeps the audio alive, affecting global sound
if in the background).

Not a full fix, as would like to manually control the audio track
directly (needs a bigger fix to handle proper synchronization before
allowing public access), but this will work through reflection (user
takes responsibility for usage).

* Allow to pass in capture session to RTCCameraVideoCapturer (#132)

Expose initializers to pass in capture session to RTCCameraVideoCapturer
so we can use AVCaptureMultiCamSession etc to capture front and back
simultaneously for iOS.

* Fix NetworkMonitor race condition when dispatching native observers (#135)

There is a race condition in NetworkMonitor where native observers may
be removed concurrently with a notification being dispatched, leading to
a dangling pointer dereference (trying to dispatch an observer that was
already removed and destroyed), and from there a crash with access
violation.

By ensuring dispatching to native observers is done within the
synchronization lock that guards additions/removals of native observers
protects against this race condition. Since native observers callbacks
are posted to the networking thread in the C++ side anyway, there should
be no risk of deadlock/starvation due to long-running observers.

Bug: webrtc:15837
Change-Id: Id2b788f102dbd25de76ceed434c4cd68aa9a569e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338643
Reviewed-by: Taylor Brandstetter <[email protected]>
Commit-Queue: Harald Alvestrand <[email protected]>
Reviewed-by: Harald Alvestrand <[email protected]>
Cr-Commit-Position: refs/heads/main@{#42256}

Co-authored-by: Guy Hershenbaum <[email protected]>

* Support for Vision Pro (#131)

TODO:
- [x]  fix compile for RTCCameraVideoCapturer
- [ ]  fix RTCMTLRenderer ?

---------

Co-authored-by: Hiroshi Horie <[email protected]>

* Multicam support (#137)

TODO:
- [x] Return `.systemPreferredCamera` for devices (visionOS only).
- [x] Use `AVCaptureMultiCamSession` only if `isMultiCamSupported` is
true.
- [x] Silence statusBarOrientation warning.

---------

Co-authored-by: [email protected] <[email protected]>

* tvOS support (#139)

17.0+ only atm

---------

Co-authored-by: cloudwebrtc <[email protected]>

* Add isDisposed to MediaStreamTrack (#140)

* chore: handle invalid cipher from key size. (#142)

* Allow software AEC for Simulator (#143)

~Allow to use "googEchoCancellation" constraint for software AEC.
For devices "googEchoCancellation" should be false to use
VoiceProcessingIO.~

* Fix AudioRenderer crash & expose AVAudioPCMBuffer (#144)

* fix: Fix bug for bypass voice processing. (#147)

* chore: remove aes cbc for framecryptor. (#145)

* Change audio renderer output format (#149)

Instead of converting to Float, output original Int data without
conversion.
Output the raw format and convert when required.

* Fixed issue with missing network interfaces on iOS (#151)

Related issue: webrtc-sdk/webrtc#148
Cherry-pick :
https://webrtc.googlesource.com/src/+/fea60ef8e72fb17b4f8a5363aff7e63ab8027b4f

Fixed issue with network interfaces due to a missing return value in the
"nw_path_enumerate_interfaces(...)" block. Exposed in iOS 18,
RTCNetworkMonitor::initWithObserver will only enumerate the first
interface, instead of all device interfaces

Bug: webrtc:359245764
Change-Id: Ifb9f28c33306c0096476a4afb0cdb4d734e87b2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359541
Auto-Submit: Corby <[email protected]>
Commit-Queue: Jonas Oreland <[email protected]>
Reviewed-by: Kári Helgason <[email protected]>
Reviewed-by: Jonas Oreland <[email protected]>
Cr-Commit-Position: refs/heads/main@{#42818}

Co-authored-by: Corby Hoback <[email protected]>

* Custom audio input for Android (#154)

# Conflicts:
#	sdk/android/api/org/webrtc/audio/JavaAudioDeviceModule.java
#	sdk/android/src/java/org/webrtc/audio/WebRtcAudioRecord.java

---------

Co-authored-by: CloudWebRTC <[email protected]>
Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: davidliu <[email protected]>
Co-authored-by: Guy Hershenbaum <[email protected]>
Co-authored-by: Corby Hoback <[email protected]>
ipavlidakis pushed a commit to GetStream/webrtc that referenced this pull request Sep 11, 2025
* Update to m125. (#119)

Use M125 as the latest version and migrate historical patches to m125

Patches Group:

## 1. Update README.md
webrtc-sdk/webrtc@b6c65fc
* Add Apache-2.0 license and some note to README.md. (#9)
* Updated readme detailing changes from original (#42)
* Adding membrane framework (#51)
* Updated readme (#83)

## 2. Audio Device Optimization
webrtc-sdk/webrtc@7454824
* allow listen-only mode in AudioUnit, adjust when category changes
(webrtc-sdk/webrtc#2)
* release mic when category changes
(webrtc-sdk/webrtc#5)
* Change defaults to iOS defaults
(webrtc-sdk/webrtc#7)
* Sync audio session config
(webrtc-sdk/webrtc#8)
* feat: support bypass voice processing for iOS.
(webrtc-sdk/webrtc#15)
* Remove MacBookPro audio pan right code
(webrtc-sdk/webrtc#22)
* fix: Fix can't open mic alone when built-in AEC is enabled.
(webrtc-sdk/webrtc#29)
* feat: add audio device changes detect for windows.
(webrtc-sdk/webrtc#41)
* fix Linux compile (webrtc-sdk/webrtc#47)
* AudioUnit: Don't rely on category switch for mic indicator to turn off
(webrtc-sdk/webrtc#52)
* Stop recording on mute (turn off mic indicator)
(webrtc-sdk/webrtc#55)
* Cherry pick audio selection from m97 release
(webrtc-sdk/webrtc#35)
* [Mac] Allow audio device selection
(webrtc-sdk/webrtc#21)
* RTCAudioDeviceModule.outputDevice / inputDevice getter and setter
(webrtc-sdk/webrtc#80)
* Allow custom audio processing by exposing AudioProcessingModule
(webrtc-sdk/webrtc#85)
* Expose audio sample buffers for Android
(webrtc-sdk/webrtc#89)
* feat: add external audio processor for android.
(webrtc-sdk/webrtc#103)
* android: make audio output attributes modifiable
(webrtc-sdk/webrtc#118)
* Fix external audio processor sample rate calculation
(webrtc-sdk/webrtc#108)
* Expose remote audio sample buffers on RTCAudioTrack
(webrtc-sdk/webrtc#84)
* Fix memory leak when creating audio CMSampleBuffer
webrtc-sdk/webrtc#86

## 3. Simulcast/SVC support for iOS/Android.
webrtc-sdk/webrtc@b0b9fe9

- Simulcast support for iOS SDK (#4)
- Support for simulcast in Android SDK (#3)
- include simulcast headers for mac also (#10)
- Fix simulcast using hardware encoder on Android (#48)
- Add scalabilityMode support for AV1/VP9. (#90)

## 4. Android improvements.
webrtc-sdk/webrtc@9aaaab5
- Start/Stop receiving stream method for VideoTrack (#25)
- Properly remove observer upon deconstruction (#26)
- feat: Expose setCodecPreferences/getCapabilities for android. (#61)
- fix: add WrappedVideoDecoderFactory.java. (#74)

## 5. Darwin improvements
webrtc-sdk/webrtc@a13ea17
- [Mac/iOS] feat: Add RTCYUVHelper for darwin. (#28)
- Cross-platform `RTCMTLVideoView` for both iOS / macOS (#40)
- rotationOverride should not be assign (#44)
- [ObjC] Expose properties / methods required for AV1 codec support
(#60)
- Workaround: Render PixelBuffer in RTCMTLVideoView (#58)
- Improve iOS/macOS H264 encoder (#70)
- fix: fix video encoder not resuming correctly upon foregrounding
(#75).
- add PrivacyInfo.xcprivacy to darwin frameworks. (#112)
- Add NSPrivacyCollectedDataTypes key to xcprivacy file (#114)
- Thread-safe `RTCInitFieldTrialDictionary` (#116)
- Set RTCCameraVideoCapturer initial zoom factor (#121)
- Unlock configuration before starting capture session (#122)

## 6. Desktop Capture for macOS.
webrtc-sdk/webrtc@841d78f
- [Mac] feat: Support screen capture for macOS. (#24) (#36)
- fix: Get thumbnails asynchronously. (#37)
- fix: Use CVPixelBuffer to build DesktopCapture Frame, fix the crash
caused by non-CVPixelBuffer frame in RTCVideoEncoderH264 that cannot be
cropped. (#63)
- Fix the crash when setting the fps of the virtual camera. (#62)

## 7. Frame Cryptor Support.
webrtc-sdk/webrtc@fc08745
- feat: Frame Cryptor (aes gcm/cbc). (#54)
- feat: key ratchet/derive. (#66)
- fix: skip invalid key when decryption failed. (#81)
- Improve e2ee, add setSharedKey to KeyProvider. (#88)
- add failure tolerance for framecryptor. (#91)
- fix h264 freeze. (#93)
- Fix/send frame cryptor events from signaling thread (#95)
- more improvements for E2EE. (#96)
- remove too verbose logs (#107)
- Add key ring size to keyProviderOptions. (#109)

## 8. Other improvements.
webrtc-sdk/webrtc@eed6c8a
- Added yuv_helper (#57)
- ABGRToI420, ARGBToI420 & ARGBToRGB24 (#65)
- more yuv wrappers (#87)
- Fix naming for yuv helper (#113)
- Fix missing `RTC_OBJC_TYPE` macros (#100)

---------

Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: David Zhao <[email protected]>
Co-authored-by: davidliu <[email protected]>
Co-authored-by: Angelika Serwa <[email protected]>
Co-authored-by: Théo Monnom <[email protected]>
# Conflicts:
#	README.md
#	media/engine/webrtc_video_engine.cc
#	media/engine/webrtc_video_engine.h
#	modules/audio_device/audio_device_impl.cc
#	sdk/BUILD.gn
#	sdk/android/BUILD.gn
#	sdk/android/api/org/webrtc/RtpParameters.java
#	sdk/android/api/org/webrtc/SimulcastVideoEncoder.java
#	sdk/android/api/org/webrtc/SimulcastVideoEncoderFactory.java
#	sdk/android/api/org/webrtc/VideoCodecInfo.java
#	sdk/android/src/jni/pc/rtp_parameters.cc
#	sdk/android/src/jni/simulcast_video_encoder.cc
#	sdk/android/src/jni/simulcast_video_encoder.h
#	sdk/android/src/jni/video_codec_info.cc
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule+Private.h
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule.h
#	sdk/objc/api/peerconnection/RTCAudioDeviceModule.mm
#	sdk/objc/api/peerconnection/RTCAudioTrack.mm
#	sdk/objc/api/peerconnection/RTCIODevice+Private.h
#	sdk/objc/api/peerconnection/RTCIODevice.mm
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory.h
#	sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
#	sdk/objc/api/video_codec/RTCVideoEncoderSimulcast.h
#	sdk/objc/api/video_codec/RTCVideoEncoderSimulcast.mm
#	sdk/objc/base/RTCAudioRenderer.h
#	sdk/objc/components/video_codec/RTCVideoEncoderFactorySimulcast.h
#	sdk/objc/components/video_codec/RTCVideoEncoderFactorySimulcast.mm

* fix: duplicate simulcast entries

* remove duplicate declaration

* remove duplicate audioDeviceModule

* fix: removed livekit's external audio processor

* fix: add back simulcast factories

* Fix missing RTC_OBJC_TYPE macros

* Fix missing headers and Metal linking

# Conflicts:
#	sdk/BUILD.gn

* Fix Mac Catalyst `RTCCameraVideoCapturer` rotation (#126)

* Fix set frame transformer (#125)

* Fix webrtc_voice_engine not notifying mute change (#128)

Looks like this line was missed during the m125 update.

webrtc-sdk/webrtc@272127d#diff-56f5e0c459b287281ef3b0431d3f4129e8e4be4c6955d845bcb22210f08b7ba5R2289

Adding it back in so that mic is properly released when muted.
# Conflicts:
#	media/engine/webrtc_voice_engine.cc

* android: Allow for skipping checking the audio playstate if needed (#129)

Pausing/stopping the audio track can lead to a race condition against
the AudioTrackThread due to this assert. Normally this is fine since
directly pausing/stopping isn't possible, but user is using reflection
to workaround another audio issue (muted participants still have a
sending audio stream which keeps the audio alive, affecting global sound
if in the background).

Not a full fix, as would like to manually control the audio track
directly (needs a bigger fix to handle proper synchronization before
allowing public access), but this will work through reflection (user
takes responsibility for usage).

* Allow to pass in capture session to RTCCameraVideoCapturer (#132)

Expose initializers to pass in capture session to RTCCameraVideoCapturer
so we can use AVCaptureMultiCamSession etc to capture front and back
simultaneously for iOS.

* Fix NetworkMonitor race condition when dispatching native observers (#135)

There is a race condition in NetworkMonitor where native observers may
be removed concurrently with a notification being dispatched, leading to
a dangling pointer dereference (trying to dispatch an observer that was
already removed and destroyed), and from there a crash with access
violation.

By ensuring dispatching to native observers is done within the
synchronization lock that guards additions/removals of native observers
protects against this race condition. Since native observers callbacks
are posted to the networking thread in the C++ side anyway, there should
be no risk of deadlock/starvation due to long-running observers.

Bug: webrtc:15837
Change-Id: Id2b788f102dbd25de76ceed434c4cd68aa9a569e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338643
Reviewed-by: Taylor Brandstetter <[email protected]>
Commit-Queue: Harald Alvestrand <[email protected]>
Reviewed-by: Harald Alvestrand <[email protected]>
Cr-Commit-Position: refs/heads/main@{#42256}

Co-authored-by: Guy Hershenbaum <[email protected]>

* Support for Vision Pro (#131)

TODO:
- [x]  fix compile for RTCCameraVideoCapturer
- [ ]  fix RTCMTLRenderer ?

---------

Co-authored-by: Hiroshi Horie <[email protected]>

* Multicam support (#137)

TODO:
- [x] Return `.systemPreferredCamera` for devices (visionOS only).
- [x] Use `AVCaptureMultiCamSession` only if `isMultiCamSupported` is
true.
- [x] Silence statusBarOrientation warning.

---------

Co-authored-by: [email protected] <[email protected]>

* tvOS support (#139)

17.0+ only atm

---------

Co-authored-by: cloudwebrtc <[email protected]>

* Add isDisposed to MediaStreamTrack (#140)

* chore: handle invalid cipher from key size. (#142)

* Allow software AEC for Simulator (#143)

~Allow to use "googEchoCancellation" constraint for software AEC.
For devices "googEchoCancellation" should be false to use
VoiceProcessingIO.~

* Fix AudioRenderer crash & expose AVAudioPCMBuffer (#144)

* fix: Fix bug for bypass voice processing. (#147)

* chore: remove aes cbc for framecryptor. (#145)

* Change audio renderer output format (#149)

Instead of converting to Float, output original Int data without
conversion.
Output the raw format and convert when required.

* Fixed issue with missing network interfaces on iOS (#151)

Related issue: webrtc-sdk/webrtc#148
Cherry-pick :
https://webrtc.googlesource.com/src/+/fea60ef8e72fb17b4f8a5363aff7e63ab8027b4f

Fixed issue with network interfaces due to a missing return value in the
"nw_path_enumerate_interfaces(...)" block. Exposed in iOS 18,
RTCNetworkMonitor::initWithObserver will only enumerate the first
interface, instead of all device interfaces

Bug: webrtc:359245764
Change-Id: Ifb9f28c33306c0096476a4afb0cdb4d734e87b2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359541
Auto-Submit: Corby <[email protected]>
Commit-Queue: Jonas Oreland <[email protected]>
Reviewed-by: Kári Helgason <[email protected]>
Reviewed-by: Jonas Oreland <[email protected]>
Cr-Commit-Position: refs/heads/main@{#42818}

Co-authored-by: Corby Hoback <[email protected]>

* Custom audio input for Android (#154)

# Conflicts:
#	sdk/android/api/org/webrtc/audio/JavaAudioDeviceModule.java
#	sdk/android/src/java/org/webrtc/audio/WebRtcAudioRecord.java

---------

Co-authored-by: CloudWebRTC <[email protected]>
Co-authored-by: Hiroshi Horie <[email protected]>
Co-authored-by: davidliu <[email protected]>
Co-authored-by: Guy Hershenbaum <[email protected]>
Co-authored-by: Corby Hoback <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants