3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/external/absl/AnyInvocable.h"
7#include "mc/external/webrtc/AudioDeviceModule.h"
8#include "mc/external/webrtc/Call.h"
9#include "mc/external/webrtc/DataChannelInterface.h"
10#include "mc/external/webrtc/IceConnectionState.h"
11#include "mc/external/webrtc/JsepTransportController.h"
12#include "mc/external/webrtc/MediaType.h"
13#include "mc/external/webrtc/PeerConnectionFactoryInterface.h"
14#include "mc/external/webrtc/PeerConnectionInterface.h"
15#include "mc/external/webrtc/PeerConnectionInternal.h"
16#include "mc/external/webrtc/RTCErrorOr.h"
17#include "mc/external/webrtc/RtpTransceiverProxyWithInternal.h"
18#include "mc/external/webrtc/SSLRole.h"
19#include "mc/external/webrtc/UsageEvent.h"
20#include "mc/external/webrtc/scoped_refptr.h"
24namespace webrtc {
class Call; }
70namespace webrtc {
class Thread; }
94 struct InitializePortAllocatorResult {
103 InitializePortAllocatorResult& operator=(InitializePortAllocatorResult
const&);
104 InitializePortAllocatorResult(InitializePortAllocatorResult
const&);
105 InitializePortAllocatorResult();
154 PeerConnection& operator=(PeerConnection
const&);
155 PeerConnection(PeerConnection
const&);
161 virtual ::webrtc::scoped_refptr<::webrtc::StreamCollectionInterface> local_streams() ;
163 virtual ::webrtc::scoped_refptr<::webrtc::StreamCollectionInterface> remote_streams() ;
169 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>> AddTrack(
171 ::std::vector<::std::string>
const& stream_ids,
172 ::std::vector<::webrtc::RtpEncodingParameters>
const& init_send_encodings
175 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>> AddTrack(
177 ::std::vector<::std::string>
const& stream_ids
180 virtual ::webrtc::RTCError
183 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>> AddTransceiver(
184 ::webrtc::MediaType media_type,
187 bool update_negotiation_needed
190 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>>
193 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>>
194 AddTransceiver(::webrtc::MediaType media_type) ;
196 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>> AddTransceiver(
201 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>>
204 virtual ::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>
205 CreateSender(::std::string
const& kind, ::std::string
const& stream_id) ;
207 virtual ::std::vector<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>> GetSenders() const ;
215 CreateDataChannelOrError(::
std::
string const& label, ::webrtc::
DataChannelInit const* config) ;
217 virtual
void GetStats(
222 virtual
void GetStats(
229 virtual
bool GetStats(
235 virtual
void ClearStatsCache() ;
249 virtual ::
std::optional<
bool> can_trickle_ice_candidates() ;
263 virtual
void RestartIce() ;
265 virtual
void CreateOffer(
270 virtual
void CreateAnswer(
277 virtual
void SetLocalDescription(
285 virtual
void SetLocalDescription(
290 virtual
void SetRemoteDescription(
295 virtual
void SetRemoteDescription(
305 virtual
void AddIceCandidate(
310 virtual
bool AddIceCandidate(::webrtc::
IceCandidate const* ice_candidate) ;
312 virtual
bool RemoveIceCandidate(::webrtc::
IceCandidate const* candidate) ;
314 virtual
bool RemoveIceCandidates(::
std::vector<::webrtc::
Candidate> const& candidates) ;
320 virtual
void SetAudioPlayout(
bool playout) ;
322 virtual
void SetAudioRecording(
bool recording) ;
325 LookupDtlsTransportByMid(::
std::
string const& mid) ;
334 StartRtcEventLog(::
std::unique_ptr<::webrtc::
RtcEventLogOutput> output, int64 output_period_ms) ;
336 virtual
void StopRtcEventLog() ;
341 virtual
void Close() ;
343 virtual ::webrtc::
Thread* signaling_thread() const ;
345 virtual ::webrtc::
Thread* network_thread() const ;
347 virtual ::webrtc::
Thread* worker_thread() const ;
349 virtual ::
std::
string session_id() const ;
351 virtual
bool initial_offerer() const ;
354 GetTransceiversInternal() const ;
358 virtual ::
std::optional<::
std::
string> sctp_transport_name() const ;
360 virtual ::
std::optional<::
std::
string> sctp_mid() const ;
362 virtual ::
std::vector<::webrtc::
CandidateStats> GetPooledCandidateStats() const ;
365 GetTransportStatsByNames(::
std::set<::
std::
string> const& transport_names) ;
367 virtual ::webrtc::
Call::Stats GetCallStats() ;
371 virtual
bool GetLocalCertificate(
372 ::
std::
string const& transport_name,
377 GetRemoteSSLCertChain(::
std::
string const& transport_name) ;
379 virtual
bool IceRestartPending(::
std::
string const& content_name) const ;
381 virtual
bool NeedsIceRestart(::
std::
string const& content_name) const ;
383 virtual
bool GetSslRole(::
std::
string const& content_name, ::webrtc::SSLRole* role) ;
385 virtual
void NoteDataAddedEvent() ;
389 virtual
bool IsClosed() const ;
391 virtual ::
std::optional<::webrtc::SSLRole> GetSctpSslRole_n() ;
394 OnSctpDataChannelStateChanged(
int channel_id, ::webrtc::
DataChannelInterface::DataState state) ;
396 virtual
bool ShouldFireNegotiationNeededEvent(uint event_id) ;
402 virtual
bool dtls_enabled() const ;
418 virtual ::webrtc::
Call* call_ptr() ;
424 virtual
void NoteUsageEvent(::webrtc::UsageEvent event) ;
426 virtual
void AddRemoteCandidate(::
std::string_view mid, ::webrtc::
Candidate const& candidate) ;
430 virtual
bool IsUnifiedPlan() const ;
432 virtual
bool ValidateBundleSettings(
437 virtual
bool CreateDataChannelTransport(::
std::string_view mid) ;
439 virtual
void DestroyDataChannelTransport(::webrtc::
RTCError error) ;
445 virtual
bool SrtpRequired() const ;
453 virtual ~PeerConnection() ;
455 virtual
bool OnTransportChanged(
456 ::
std::
string const& mid,
468 ::
std::vector<::
std::
string> const& stream_ids,
490 ::
std::
string const& transport_name,
496 MCNAPI PeerConnection(
501 bool is_unified_plan,
502 ::
std::unique_ptr<::webrtc::
Call> call,
530 ::
std::unique_ptr<::webrtc::
Call> call,
540 ::
std::set<::webrtc::MediaType> const& media_types
552 bool is_unified_plan,
553 ::
std::unique_ptr<::webrtc::
Call> call,
580 ::
std::vector<::
std::
string> const& stream_ids,
586 ::
std::vector<::
std::
string> const& stream_ids
592 ::webrtc::MediaType media_type,
595 bool update_negotiation_needed
776 ::
std::
string const& transport_name,
786 MCNAPI
bool $GetSslRole(::
std::
string const& content_name, ::webrtc::SSLRole* role);
856 ::
std::
string const& mid,
Definition AudioDeviceModule.h:15
Definition CandidateStats.h:7
Definition Candidate.h:15
Definition ConnectionContext.h:17
Definition ContentGroup.h:7
Definition CreateSessionDescriptionObserver.h:16
Definition DataChannelController.h:33
Definition DataChannelEventObserverInterface.h:7
Definition DataChannelInterface.h:19
Definition DataChannelTransportInterface.h:16
Definition DtlsTransportInterface.h:18
Definition DtlsTransport.h:19
Definition Environment.h:7
Definition FieldTrialsView.h:7
Definition IceCandidate.h:12
Definition JsepTransportController.h:59
Definition JsepTransportController.h:50
Definition LegacyStatsCollector.h:30
Definition NetworkControllerInterface.h:24
Definition PayloadTypePicker.h:18
Definition PeerConnectionFactoryInterface.h:27
Definition PeerConnectionInterface.h:46
Definition PeerConnectionInternal.h:28
Definition PeerConnectionMessageHandler.h:17
Definition PeerConnectionObserver.h:22
MCAPI::webrtc::JsepTransportController * InitializeTransportController_n(::webrtc::PeerConnectionInterface::RTCConfiguration const &configuration)
MCAPI::webrtc::SessionDescriptionInterface const * $pending_remote_description() const
MCAPI ::webrtc::scoped_refptr<::webrtc::StreamCollectionInterface > $remote_streams()
MCAPI::webrtc::PeerConnectionInterface::IceGatheringState $ice_gathering_state()
MCAPI bool $IceRestartPending(::std::string const &content_name) const
MCAPI bool $RemoveIceCandidate(::webrtc::IceCandidate const *candidate)
MCAPI bool $RemoveIceCandidates(::std::vector<::webrtc::Candidate > const &candidates)
MCAPI bool $CreateDataChannelTransport(::std::string_view mid)
MCAPI void SetSctpTransportName(::std::string sctp_transport_name)
MCAPI ::std::optional<::webrtc::AudioDeviceModule::Stats > $GetAudioDeviceStats()
MCAPI ::std::optional<::webrtc::SSLRole > $GetSctpSslRole_n()
MCAPI ::std::map<::std::string, ::webrtc::TransportStats > $GetTransportStatsByNames(::std::set<::std::string > const &transport_names)
MCAPI void $NoteDataAddedEvent()
MCAPI void $SetAudioPlayout(bool playout)
MCAPI::webrtc::SessionDescriptionInterface const * $remote_description() const
static MCAPI void ReportNegotiatedCiphers(bool dtls_enabled, ::webrtc::TransportStats const &stats, ::std::set<::webrtc::MediaType > const &media_types)
MCAPI::webrtc::RTCError $SetBitrate(::webrtc::BitrateSettings const &bitrate)
MCAPI void $NoteUsageEvent(::webrtc::UsageEvent event)
MCAPI::webrtc::NetworkControllerInterface * $GetNetworkController()
MCAPI::webrtc::SessionDescriptionInterface const * $local_description() const
MCAPI void $DestroyDataChannelTransport(::webrtc::RTCError error)
MCAPI::webrtc::Thread * $network_thread() const
MCAPI void $AddRemoteCandidate(::std::string_view mid, ::webrtc::Candidate const &candidate)
MCAPI void $CreateOffer(::webrtc::CreateSessionDescriptionObserver *observer, ::webrtc::PeerConnectionInterface::RTCOfferAnswerOptions const &options)
MCAPI::webrtc::Thread * $signaling_thread() const
MCAPI::webrtc::PeerConnectionInterface::IceConnectionState $ice_connection_state_internal()
MCAPI::webrtc::Call::Stats $GetCallStats()
MCAPI ::std::vector<::webrtc::scoped_refptr<::webrtc::RtpReceiverInterface > > $GetReceivers() const
MCAPI::webrtc::RTCError $RemoveTrackOrError(::webrtc::scoped_refptr<::webrtc::RtpSenderInterface > sender)
MCAPI::webrtc::PeerConnectionInterface::PeerConnectionState $peer_connection_state()
MCAPI::webrtc::FieldTrialsView const & $trials() const
MCAPI::std::string $session_id() const
MCAPI void $SetAudioRecording(bool recording)
MCAPI bool $SrtpRequired() const
MCAPI bool $dtls_enabled() const
MCAPI ::webrtc::scoped_refptr<::webrtc::SctpTransportInterface > $GetSctpTransport() const
MCAPI::webrtc::PeerConnectionMessageHandler * $message_handler()
MCAPI bool $ValidateBundleSettings(::webrtc::SessionDescription const *desc, ::std::map<::std::string, ::webrtc::ContentGroup const * > const &bundle_groups_by_mid)
MCAPI void $SetLocalDescription(::webrtc::SetSessionDescriptionObserver *observer)
MCAPI void $SetRemoteDescription(::webrtc::SetSessionDescriptionObserver *observer, ::webrtc::SessionDescriptionInterface *desc_ptr)
MCAPI::webrtc::JsepTransportController * $transport_controller_n()
MCAPI ::std::unique_ptr<::webrtc::SSLCertChain > $GetRemoteSSLCertChain(::std::string const &transport_name)
MCAPI void ReportTransportStats(::std::vector<::webrtc::scoped_refptr<::webrtc::RtpTransceiverProxyWithInternal<::webrtc::RtpTransceiver > > > transceivers)
MCAPI void OnTransportControllerCandidatesGathered(::std::string const &transport_name, ::std::vector<::webrtc::Candidate > const &candidates)
MCAPI void $OnSctpDataChannelStateChanged(int channel_id, ::webrtc::DataChannelInterface::DataState state)
MCAPI void $StopRtcEventLog()
MCAPI::webrtc::PeerConnectionInterface::IceConnectionState $ice_connection_state()
MCAPI ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::DataChannelInterface > > $CreateDataChannelOrError(::std::string const &label, ::webrtc::DataChannelInit const *config)
MCAPI bool $initial_offerer() const
MCAPI void $AddIceCandidate(::std::unique_ptr<::webrtc::IceCandidate > candidate, ::std::function< void(::webrtc::RTCError)> callback)
MCAPI ::std::vector<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface > > $GetTransceivers() const
static MCAPI void ** $vftableForPeerConnectionSdpMethods()
MCAPI ::webrtc::scoped_refptr<::webrtc::StreamCollectionInterface > $local_streams()
MCAPI void OnIceGatheringChange(::webrtc::PeerConnectionInterface::IceGatheringState new_state)
MCAPI bool CanAttemptDtlsStunPiggybacking()
MCAPI void $ReconfigureBandwidthEstimation(::webrtc::BandwidthEstimationSettings const &settings)
MCAPI bool $NeedsIceRestart(::std::string const &content_name) const
MCAPI void $SetDataChannelEventObserver(::std::unique_ptr<::webrtc::DataChannelEventObserverInterface > observer)
static MCAPI void ** $vftable()
MCAPI ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface > > $AddTrack(::webrtc::scoped_refptr<::webrtc::MediaStreamTrackInterface > track, ::std::vector<::std::string > const &stream_ids, ::std::vector<::webrtc::RtpEncodingParameters > const &init_send_encodings)
MCAPI::webrtc::SessionDescriptionInterface const * $pending_local_description() const
MCAPI ::std::vector<::webrtc::DataChannelStats > $GetDataChannelStats() const
MCAPI::webrtc::RTCError $SetConfiguration(::webrtc::PeerConnectionInterface::RTCConfiguration const &configuration)
MCAPI::webrtc::Thread * $worker_thread() const
static MCAPI ::webrtc::scoped_refptr<::webrtc::PeerConnection > Create(::webrtc::Environment const &env, ::webrtc::scoped_refptr<::webrtc::ConnectionContext > context, ::webrtc::PeerConnectionFactoryInterface::Options const &options, ::std::unique_ptr<::webrtc::Call > call, ::webrtc::PeerConnectionInterface::RTCConfiguration const &configuration, ::webrtc::PeerConnectionDependencies &dependencies, ::std::set<::webrtc::SocketAddress > const &stun_servers, ::std::vector<::webrtc::RelayServerConfig > const &turn_servers)
MCAPI bool $IsUnifiedPlan() const
MCAPI bool $GetLocalCertificate(::std::string const &transport_name, ::webrtc::scoped_refptr<::webrtc::RTCCertificate > *certificate)
MCAPI void TeardownDataChannelTransport_n(::webrtc::RTCError error)
MCAPI ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface > > $AddTransceiver(::webrtc::MediaType media_type, ::webrtc::scoped_refptr<::webrtc::MediaStreamTrackInterface > track, ::webrtc::RtpTransceiverInit const &init, bool update_negotiation_needed)
MCAPI ::std::optional<::std::string > $sctp_transport_name() const
MCAPI::webrtc::PeerConnectionInterface::IceConnectionState $standardized_ice_connection_state()
MCAPI void * $ctor(::webrtc::PeerConnectionInterface::RTCConfiguration const &configuration, ::webrtc::Environment const &env, ::webrtc::scoped_refptr<::webrtc::ConnectionContext > context, ::webrtc::PeerConnectionFactoryInterface::Options const &options, bool is_unified_plan, ::std::unique_ptr<::webrtc::Call > call, ::webrtc::PeerConnectionDependencies &dependencies, ::std::set<::webrtc::SocketAddress > const &stun_servers, ::std::vector<::webrtc::RelayServerConfig > const &turn_servers, bool dtls_enabled)
MCAPI::webrtc::PortAllocator * $port_allocator()
static MCAPI void ** $vftableForPeerConnectionInterface()
MCAPI void $ReportSdpBundleUsage(::webrtc::SessionDescriptionInterface const &remote_description)
MCAPI void ReportFirstConnectUsageMetrics()
MCAPI bool $IsClosed() const
MCAPI ::std::vector<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface > > $GetSenders() const
MCAPI bool $AddStream(::webrtc::MediaStreamInterface *local_stream)
MCAPI::webrtc::SessionDescriptionInterface const * $current_local_description() const
MCAPI ::std::vector<::webrtc::CandidateStats > $GetPooledCandidateStats() const
MCAPI::webrtc::PeerConnectionInterface::SignalingState $signaling_state()
MCAPI::webrtc::LegacyStatsCollector * $legacy_stats()
MCAPI::webrtc::JsepTransportController * $transport_controller_s()
MCAPI::webrtc::SessionDescriptionInterface const * $current_remote_description() const
MCAPI bool $StartRtcEventLog(::std::unique_ptr<::webrtc::RtcEventLogOutput > output)
MCAPI::webrtc::PeerConnection::InitializePortAllocatorResult InitializePortAllocator_n(::std::set<::webrtc::SocketAddress > const &stun_servers, ::std::vector<::webrtc::RelayServerConfig > const &turn_servers, ::std::vector<::std::shared_ptr<::webrtc::StaticStunServer const > > const &static_stun_servers, ::webrtc::PeerConnectionInterface::RTCConfiguration const &configuration)
MCAPI bool $GetSslRole(::std::string const &content_name, ::webrtc::SSLRole *role)
MCAPI ::std::optional<::std::string > SetupDataChannelTransport_n(::std::string_view mid)
MCAPI void $ClearStatsCache()
MCAPI::webrtc::RtpTransmissionManager const * $rtp_manager() const
MCAPI ::webrtc::scoped_refptr<::webrtc::RtpSenderInterface > $CreateSender(::std::string const &kind, ::std::string const &stream_id)
MCAPI void $GetStats(::webrtc::scoped_refptr<::webrtc::RtpReceiverInterface > selector, ::webrtc::scoped_refptr<::webrtc::RTCStatsCollectorCallback > callback)
MCAPI void $RemoveStream(::webrtc::MediaStreamInterface *local_stream)
MCAPI::webrtc::CryptoOptions $GetCryptoOptions()
MCAPI void $RunWithObserver(::absl::AnyInvocable< void(::webrtc::PeerConnectionObserver *) && > task)
MCAPI bool $ShouldFireNegotiationNeededEvent(uint event_id)
MCAPI::webrtc::Call * $call_ptr()
MCAPI void OnTransportControllerConnectionState(::webrtc::IceConnectionState state)
MCAPI bool $OnTransportChanged(::std::string const &mid, ::webrtc::RtpTransportInternal *rtp_transport, ::webrtc::scoped_refptr<::webrtc::DtlsTransport > dtls_transport, ::webrtc::DataChannelTransportInterface *data_channel_transport)
MCAPI::webrtc::DataChannelController * $data_channel_controller()
MCAPI void $AddAdaptationResource(::webrtc::scoped_refptr<::webrtc::Resource > resource)
MCAPI ::std::optional< bool > $can_trickle_ice_candidates()
MCAPI::webrtc::PeerConnectionInterface::RTCConfiguration const * $configuration() const
MCAPI::webrtc::PeerConnectionInterface::RTCConfiguration $GetConfiguration()
MCAPI void $SetIceConnectionState(::webrtc::PeerConnectionInterface::IceConnectionState new_state)
MCAPI void $CreateAnswer(::webrtc::CreateSessionDescriptionObserver *observer, ::webrtc::PeerConnectionInterface::RTCOfferAnswerOptions const &options)
MCAPI ::std::vector<::webrtc::scoped_refptr<::webrtc::RtpTransceiverProxyWithInternal<::webrtc::RtpTransceiver > > > $GetTransceiversInternal() const
MCAPI ::webrtc::scoped_refptr<::webrtc::DtlsTransportInterface > $LookupDtlsTransportByMid(::std::string const &mid)
MCAPI ::std::optional<::std::string > $sctp_mid() const
MCAPI::webrtc::PeerConnectionFactoryInterface::Options const * $options() const
MCAPI ::webrtc::scoped_refptr<::webrtc::RtpTransceiverProxyWithInternal<::webrtc::RtpTransceiver > > FindTransceiverBySender(::webrtc::scoped_refptr<::webrtc::RtpSenderInterface > sender)
MCAPI::webrtc::PayloadTypePicker & $payload_type_picker()
MCAPI::webrtc::RTCError $StartSctpTransport(::webrtc::SctpOptions const &options)
Definition PortAllocator.h:26
Definition RTCCertificate.h:18
Definition RTCErrorOr.h:8
Definition RTCStatsCollectorCallback.h:16
Definition RtcEventLogOutput.h:7
Definition RtpReceiverInterface.h:25
Definition RtpSenderInterface.h:28
Definition RtpTransceiverInterface.h:23
Definition RtpTransceiverProxyWithInternal.h:8
Definition RtpTransceiver.h:40
Definition RtpTransmissionManager.h:40
Definition RtpTransportInternal.h:21
Definition SSLCertChain.h:13
Definition SctpTransportInterface.h:18
Definition SessionDescriptionInterface.h:17
Definition SessionDescription.h:18
Definition SetLocalDescriptionObserverInterface.h:15
Definition SetRemoteDescriptionObserverInterface.h:15
Definition SetSessionDescriptionObserver.h:15
Definition SocketAddress.h:15
Definition StaticStunServer.h:12
Definition StatsObserver.h:15
Definition StreamCollectionInterface.h:16
Definition scoped_refptr.h:8
Definition BandwidthEstimationSettings.h:7
Definition BitrateSettings.h:7
Definition CryptoOptions.h:12
Definition DataChannelInit.h:7
Definition DataChannelStats.h:7
Definition PeerConnectionDependencies.h:12
Definition PeerConnectionInterface.h:200
Definition PeerConnectionInterface.h:284
Definition PeerConnection.h:94
Definition RelayServerConfig.h:15
Definition RtpEncodingParameters.h:7
Definition RtpTransceiverInit.h:7
Definition SctpOptions.h:7
Definition TransportStats.h:7