-
Notifications
You must be signed in to change notification settings - Fork 3
[Enhancement]Implement reworked audio pipeline #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ipavlidakis
wants to merge
15
commits into
patch/m137.5
Choose a base branch
from
enhancement/implement-reworked-audio-pipeline
base: patch/m137.5
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[Enhancement]Implement reworked audio pipeline #55
ipavlidakis
wants to merge
15
commits into
patch/m137.5
from
enhancement/implement-reworked-audio-pipeline
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- api/peer_connection_interface.h:1564 adds a standalone_audio_source boolean (defaulting to false) to CreateAudioSource, preserving existing call sites but enabling downstream selection of alternate audio pipelines. - pc/peer_connection_factory.h:76 & pc/peer_connection_factory.cc:200 now accept/forward the flag, with an RTC_DCHECK guarding the yet-to-be-implemented standalone path so behavior stays unchanged. - pc/peer_connection_factory_proxy.h:46 and api/test/mock_peer_connection_factory_interface.h:58 propagate the extra argument through the proxy layer and gMock facade to keep tests and thread marshaling in sync. - sdk/objc/api/peerconnection/RTCPeerConnectionFactory.h:90 & .mm:368-385 expose audioSourceWithConstraints:standalone: on the ObjC API, wiring the new boolean straight to the native factory without touching AudioOptions or media constraints.
- Added the native StandaloneAudioTrackSource implementation (sdk/objc/native/src/standalone_audio_track_source.{h,cc}) plus focused unit coverage (…_unittest.cc). The source keeps start/stop state, fans frames to registered sinks, and exposes a scoped CreateSendStream helper; the test confirms frame delivery, ignores pushes before start, and verifies sink removal. - sdk/BUILD.gn:1908 now only exposes a minimal standalone_audio_track_source library with the direct dependencies it needs and, behind rtc_include_tests, the companion XCTest bundle—no other GN changes remain after your revert. - Formatted the new sources with clang-format and ran the required bundle exec fastlane ios build … flow, which completed successfully
- Introduced RTCAudioFrame (sdk/objc/api/peerconnection/RTCAudioFrame.h, .mm) to wrap raw 16-bit PCM payloads along with metadata (sample rate, channels, frame count, timestamps) for Objective-C callers. - Added RTCStandaloneAudioSource (sdk/objc/api/peerconnection/RTCStandaloneAudioSource.h, .mm, plus RTCStandaloneAudioSource+Private.h) to build on RTCAudioSource, own the native StandaloneAudioTrackSource, expose start/stop, and forward RTCAudioFrame data through PushAudioFrame. - Updated sdk/BUILD.gn:1042,1208,1473 so the new bridge files are compiled, the umbrella exports the headers, and the ObjC peerconnection library links our existing native standalone_audio_track_source target.
- Added StandaloneAudioSendHelper (sdk/objc/native/src/standalone_audio_send_helper.h, .cc) to own the per-source AudioSendStream, expose voe::ChannelSendInterface/RtpRtcpInterface, and tear it down safely with RAII. - Hooked StandaloneAudioTrackSource::CreateSendStream to return the new helper (sdk/objc/native/src/standalone_audio_track_source.h, .cc), keeping existing frame push logic intact. - Expanded the unit test suite with StandaloneAudioSendHelperTest, building a minimal Call/AudioState scaffold and verifying the helper returns valid stream, channel, and RTP handles (sdk/objc/native/src/standalone_audio_track_source_unittest.cc). - Updated GN wiring so both the helper and test compile and link with the needed call/audio-mixer/device components (sdk/BUILD.gn).
- Updated the factory branching so PeerConnectionFactory::CreateAudioSource now returns StandaloneAudioTrackSource when the standalone flag is set on iOS, while leaving other platforms on the legacy path (pc/peer_connection_factory.cc:204). - Wired the ObjC factory to import the standalone bridge, detect standalone requests, and wrap the returned native source in RTCStandaloneAudioSource, including a safe cast to the native implementation (sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm:11, sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm:386). - Added a private initializer so RTCStandaloneAudioSource can take an existing native standalone source, and refactored the designated initializer to share that path (sdk/objc/api/peerconnection/RTCStandaloneAudioSource+Private.h:27, sdk/objc/api/peerconnection/RTCStandaloneAudioSource.mm:36). - Taught the GN target to pull in the standalone audio source library when building for iOS, satisfying the new dependency (pc/BUILD.gn:1577).
… preserving the legacy AudioTransportImpl path; add tests covering both source types. Run the Fastlane command afterward. - Added AudioSourceInterface::is_standalone() and implemented it in the iOS standalone source so we can detect standalone producers without RTTI (api/media_stream_interface.h:266-273, sdk/objc/native/src/standalone_audio_track_source.h:42-56). - On iOS the audio sender now swaps to a StandaloneAudioFrameForwarder that pushes 10 ms PCM straight into the per-SSRC AudioSendStream, while legacy sources continue through the existing sink adapter (pc/rtp_sender.h:343-441, pc/rtp_sender.cc:680-744, pc/rtp_sender.cc:819-965). - Voice-channel plumbing exposes GetAudioSendStream and the fake call gains a send-frame counter, letting the standalone path drive real streams in both production and tests (media/base/media_channel.h:889-903, media/base/fake_media_engine.cc:277-349, media/engine/webrtc_voice_engine.cc:867-1874, media/engine/fake_webrtc_call.h:74-117). - RtpSenderReceiver tests now accept arbitrary audio sources and include an iOS-only regression that pushes PCM through StandaloneAudioTrackSource, asserting the fake send stream records delivery (pc/rtp_sender_receiver_unittest.cc:195-210, pc/rtp_sender_receiver_unittest.cc:345-357, pc/rtp_sender_receiver_unittest.cc:602-626).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.