Improve WebRTC build scripts and add external_audio_source patch#1053
Improve WebRTC build scripts and add external_audio_source patch#1053xianshijing-lk wants to merge 3 commits intomainfrom
Conversation
- Add external_audio_source.patch for NativeAudioSource support - Remove unused use_clang_modules build arg (fixes license generation) - Use vpython3 for license generation (Python version compatibility) - Make license generation failures non-critical
ChangesetThe following package versions will be affected by this PR:
|
| enable_iterator_debugging=false \ | ||
| android_package_prefix=\"livekit\" \ | ||
| use_custom_libcxx=false \ | ||
| use_clang_modules=false \ |
There was a problem hiding this comment.
use_clang_modules=false seem to make the licence generate script fail, @cloudwebrtc , any concern of removing this flag ?
There was a problem hiding this comment.
Yeah, use_clang_modules=false was introduced in the m144 upgrade; I'll double-check if it's a required parameter.
| + // Check if this is an external audio source (delivers audio via AddSink). | ||
| + // If so, mark the config so AudioState doesn't send device audio to this | ||
| + // stream. This must be done before UpdateSendState() calls Start(). | ||
| + if (source->is_external_source() && !config_.external_source) { |
There was a problem hiding this comment.
QQ: This method (AudioSource::is_external_source() const) is looks like not overridden in any inherited class.
In another Rust PR, is_external_source is overridden to webrtc::AudioSourceInterface, but it doesn't seem to be associated with webrtc::AudioSource. I suspect that source->is_external_source() here will always return false.
Perhaps we're missing a copy of the is_external_source state from webrtc::AudioSourceInterface to webrtc::AudioSrouce? The class associated with webrtc::AudioSource is LocalAudioSinkAdapter.
There was a problem hiding this comment.
Good point, I think the problem with the current approach is that it will send both the external source file and mic source to one track.
which will result in duplicating the mic data with some drift there.
I try patching it, can you check it again ?
It might worth coming up with some integration tests, let me work on it
Before you submit your PR
Make sure the following is true before submitting your PR:
PR description
This PR improves the WebRTC build scripts and adds a patch required for external audio source support (NativeAudioSource).
Changes:
Breaking changes
None. These are build script improvements only and do not affect the Rust API.
MSRV
No changes to MSRV.
Testing
The changes were tested by running:
./build_macos.sh --arch arm64 --profile release
The build completes successfully and LICENSE.md is now generated without errors.
The external_audio_source.patch was verified to apply cleanly to a fresh WebRTC m144_release checkout:
cd webrtc-sys/libwebrtc/src
git checkout -- .
git apply ../patches/external_audio_source.patch -v
Async
N/A - This PR only modifies shell build scripts, no Rust code changes.