Skip to content

Conversation

ipavlidakis
Copy link

No description provided.

- 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).
@ipavlidakis ipavlidakis self-assigned this Sep 23, 2025
@ipavlidakis ipavlidakis added the enhancement New feature or request label Sep 23, 2025
@ipavlidakis ipavlidakis changed the base branch from main to patch/m137.5 September 23, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant