create_modular_peer_connection_factory.h (1395B)
1 /* 2 * Copyright 2025 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef API_CREATE_MODULAR_PEER_CONNECTION_FACTORY_H_ 12 #define API_CREATE_MODULAR_PEER_CONNECTION_FACTORY_H_ 13 14 #include "api/peer_connection_interface.h" 15 #include "api/scoped_refptr.h" 16 #include "rtc_base/system/rtc_export.h" 17 18 namespace webrtc { 19 // Creates a new instance of PeerConnectionFactoryInterface with optional 20 // dependencies. 21 // 22 // If an application knows it will only require certain modules, it can reduce 23 // webrtc's impact on its binary size by depending only on this target and the 24 // modules the application requires, using CreateModularPeerConnectionFactory. 25 // For example, if an application only uses WebRTC for audio, it can pass in 26 // null pointers for the video-specific interfaces, and omit the corresponding 27 // modules from its build. 28 RTC_EXPORT scoped_refptr<PeerConnectionFactoryInterface> 29 CreateModularPeerConnectionFactory( 30 PeerConnectionFactoryDependencies dependencies); 31 32 } // namespace webrtc 33 34 #endif // API_CREATE_MODULAR_PEER_CONNECTION_FACTORY_H_