3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/external/cricket/IceConnectionState.h"
7#include "mc/external/cricket/MediaType.h"
8#include "mc/external/rtc/SSLRole.h"
9#include "mc/external/webrtc/AudioDeviceModule.h"
10#include "mc/external/webrtc/Call.h"
11#include "mc/external/webrtc/DataChannelInterface.h"
12#include "mc/external/webrtc/JsepTransportController.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/UsageEvent.h"
19#include "mc/external/webrtc/scoped_refptr.h"
33namespace rtc {
class Thread; }
34namespace webrtc {
class Call; }
88 struct InitializePortAllocatorResult {
97 InitializePortAllocatorResult& operator=(InitializePortAllocatorResult
const&);
98 InitializePortAllocatorResult(InitializePortAllocatorResult
const&);
99 InitializePortAllocatorResult();
145 PeerConnection& operator=(PeerConnection
const&);
146 PeerConnection(PeerConnection
const&);
152 virtual ::webrtc::scoped_refptr<::webrtc::StreamCollectionInterface> local_streams() ;
154 virtual ::webrtc::scoped_refptr<::webrtc::StreamCollectionInterface> remote_streams() ;
160 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>> AddTrack(
162 ::std::vector<::std::string>
const& stream_ids
165 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>> AddTrack(
167 ::std::vector<::std::string>
const& stream_ids,
168 ::std::vector<::webrtc::RtpEncodingParameters>
const& init_send_encodings
171 virtual ::webrtc::RTCError
174 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>>
177 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>> AddTransceiver(
182 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>>
183 AddTransceiver(::cricket::MediaType media_type) ;
185 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>>
188 virtual ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface>> AddTransceiver(
189 ::cricket::MediaType media_type,
192 bool update_negotiation_needed
195 virtual ::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>
196 CreateSender(::std::string
const& kind, ::std::string
const& stream_id) ;
198 virtual ::std::vector<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface>> GetSenders() const ;
206 CreateDataChannelOrError(::
std::
string const& label, ::webrtc::
DataChannelInit const* config) ;
208 virtual
bool GetStats(
216 virtual
void GetStats(
221 virtual
void GetStats(
226 virtual
void ClearStatsCache() ;
240 virtual ::
std::optional<
bool> can_trickle_ice_candidates() ;
254 virtual
void RestartIce() ;
256 virtual
void CreateOffer(
261 virtual
void CreateAnswer(
266 virtual
void SetLocalDescription(
274 virtual
void SetLocalDescription(
281 virtual
void SetRemoteDescription(
286 virtual
void SetRemoteDescription(
298 virtual
void AddIceCandidate(
303 virtual
bool RemoveIceCandidates(::
std::vector<::cricket::Candidate> const& candidates) ;
309 virtual
void SetAudioPlayout(
bool playout) ;
311 virtual
void SetAudioRecording(
bool recording) ;
314 LookupDtlsTransportByMid(::
std::
string const& mid) ;
321 StartRtcEventLog(::
std::unique_ptr<::webrtc::
RtcEventLogOutput> output, int64 output_period_ms) ;
325 virtual
void StopRtcEventLog() ;
327 virtual
void Close() ;
329 virtual ::rtc::Thread* signaling_thread() const ;
331 virtual ::rtc::Thread* network_thread() const ;
333 virtual ::rtc::Thread* worker_thread() const ;
335 virtual ::
std::
string session_id() const ;
337 virtual
bool initial_offerer() const ;
340 GetTransceiversInternal() const ;
344 virtual ::
std::optional<::
std::
string> sctp_transport_name() const ;
346 virtual ::
std::optional<::
std::
string> sctp_mid() const ;
348 virtual ::
std::vector<::cricket::CandidateStats> GetPooledCandidateStats() const ;
350 virtual ::
std::map<::
std::
string, ::cricket::TransportStats>
351 GetTransportStatsByNames(::
std::set<::
std::
string> const& transport_names) ;
353 virtual ::webrtc::
Call::Stats GetCallStats() ;
357 virtual
bool GetLocalCertificate(
358 ::
std::
string const& transport_name,
362 virtual ::
std::unique_ptr<::rtc::SSLCertChain>
363 GetRemoteSSLCertChain(::
std::
string const& transport_name) ;
365 virtual
bool IceRestartPending(::
std::
string const& content_name) const ;
367 virtual
bool NeedsIceRestart(::
std::
string const& content_name) const ;
369 virtual
bool GetSslRole(::
std::
string const& content_name, ::rtc::SSLRole* role) ;
371 virtual
void NoteDataAddedEvent() ;
375 virtual
bool IsClosed() const ;
377 virtual ::
std::optional<::rtc::SSLRole> GetSctpSslRole_n() ;
380 OnSctpDataChannelStateChanged(
int channel_id, ::webrtc::
DataChannelInterface::DataState state) ;
382 virtual
bool ShouldFireNegotiationNeededEvent(uint event_id) ;
388 virtual
bool dtls_enabled() const ;
402 virtual ::cricket::PortAllocator* port_allocator() ;
404 virtual ::webrtc::
Call* call_ptr() ;
410 virtual
void NoteUsageEvent(::webrtc::UsageEvent event) ;
412 virtual
void AddRemoteCandidate(::
std::
string const& mid, ::cricket::Candidate const& candidate) ;
416 virtual
bool IsUnifiedPlan() const ;
418 virtual
bool ValidateBundleSettings(
419 ::cricket::SessionDescription const* desc,
420 ::
std::map<::
std::
string, ::cricket::ContentGroup const*> const& bundle_groups_by_mid
423 virtual
bool CreateDataChannelTransport(::
std::string_view mid) ;
425 virtual
void DestroyDataChannelTransport(::webrtc::
RTCError error) ;
427 virtual
void StartSctpTransport(
int local_port,
int remote_port,
int max_message_size) ;
431 virtual
bool SrtpRequired() const ;
435 virtual ~PeerConnection() ;
437 virtual
bool OnTransportChanged(
438 ::
std::
string const& mid,
450 ::
std::vector<::
std::
string> const& stream_ids,
463 ::
std::set<::rtc::SocketAddress> const& stun_servers,
464 ::
std::vector<::cricket::RelayServerConfig> const& turn_servers,
465 ::
std::vector<::
std::pair<::rtc::SocketAddress, ::rtc::SocketAddress>> const& mapped_ports,
477 ::
std::
string const& transport_name,
478 ::
std::vector<::cricket::Candidate> const& candidates
483 MCNAPI PeerConnection(
487 bool is_unified_plan,
488 ::
std::unique_ptr<::webrtc::
Call> call,
514 ::
std::unique_ptr<::webrtc::
Call> call,
521 ::cricket::TransportStats const& stats,
522 ::
std::set<::cricket::MediaType> const& media_types
533 bool is_unified_plan,
534 ::
std::unique_ptr<::webrtc::
Call> call,
559 ::
std::vector<::
std::
string> const& stream_ids
564 ::
std::vector<::
std::
string> const& stream_ids,
585 ::cricket::MediaType media_type,
588 bool update_negotiation_needed
743 MCNAPI ::
std::map<::
std::
string, ::cricket::TransportStats>
751 ::
std::
string const& transport_name,
761 MCNAPI
bool $GetSslRole(::
std::
string const& content_name, ::rtc::SSLRole* role);
810 ::cricket::SessionDescription const* desc,
811 ::
std::map<::
std::
string, ::cricket::ContentGroup const*> const& bundle_groups_by_mid
827 ::
std::
string const& mid,
Definition CandidateStats.h:7
Definition Candidate.h:15
Definition ContentGroup.h:7
Definition PortAllocator.h:25
Definition SessionDescription.h:18
Definition RTCCertificate.h:18
Definition SSLCertChain.h:13
Definition SocketAddress.h:12
Definition AudioDeviceModule.h:15
Definition ConnectionContext.h:17
Definition CreateSessionDescriptionObserver.h:16
Definition DataChannelController.h:29
Definition DataChannelInterface.h:19
Definition DataChannelTransportInterface.h:15
Definition DtlsTransportInterface.h:18
Definition DtlsTransport.h:19
Definition Environment.h:7
Definition FieldTrialsView.h:7
Definition IceCandidateInterface.h:12
Definition JsepTransportController.h:51
Definition JsepTransportController.h:42
Definition LegacyStatsCollector.h:29
Definition PeerConnectionFactoryInterface.h:30
Definition PeerConnectionInterface.h:44
Definition PeerConnectionInternal.h:28
Definition PeerConnectionMessageHandler.h:17
Definition PeerConnectionObserver.h:22
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 ::std::vector<::cricket::CandidateStats > $GetPooledCandidateStats() const
MCAPI bool $CreateDataChannelTransport(::std::string_view mid)
MCAPI void SetSctpTransportName(::std::string sctp_transport_name)
MCAPI ::std::optional<::webrtc::AudioDeviceModule::Stats > $GetAudioDeviceStats()
MCAPI void $NoteDataAddedEvent()
MCAPI void $SetAudioPlayout(bool playout)
MCAPI::webrtc::SessionDescriptionInterface const * $remote_description() const
MCAPI void $SetRemoteDescription(::std::unique_ptr<::webrtc::SessionDescriptionInterface > desc, ::webrtc::scoped_refptr<::webrtc::SetRemoteDescriptionObserverInterface > observer)
MCAPI::webrtc::RTCError $SetBitrate(::webrtc::BitrateSettings const &bitrate)
MCAPI bool $StartRtcEventLog(::std::unique_ptr<::webrtc::RtcEventLogOutput > output, int64 output_period_ms)
MCAPI void $NoteUsageEvent(::webrtc::UsageEvent event)
MCAPI bool $ValidateBundleSettings(::cricket::SessionDescription const *desc, ::std::map<::std::string, ::cricket::ContentGroup const * > const &bundle_groups_by_mid)
MCAPI void * $ctor(::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, bool dtls_enabled)
MCAPI void $StartSctpTransport(int local_port, int remote_port, int max_message_size)
MCAPI::webrtc::SessionDescriptionInterface const * $local_description() const
MCAPI void $DestroyDataChannelTransport(::webrtc::RTCError error)
MCAPI void $CreateOffer(::webrtc::CreateSessionDescriptionObserver *observer, ::webrtc::PeerConnectionInterface::RTCOfferAnswerOptions const &options)
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::JsepTransportController * InitializeTransportController_n(::webrtc::PeerConnectionInterface::RTCConfiguration const &configuration, ::webrtc::PeerConnectionDependencies const &dependencies)
MCAPI::webrtc::RTCError Initialize(::webrtc::PeerConnectionInterface::RTCConfiguration const &configuration, ::webrtc::PeerConnectionDependencies dependencies)
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::rtc::Thread * $network_thread() const
MCAPI bool $dtls_enabled() const
MCAPI void OnTransportControllerCandidatesGathered(::std::string const &transport_name, ::std::vector<::cricket::Candidate > const &candidates)
MCAPI bool $GetSslRole(::std::string const &content_name, ::rtc::SSLRole *role)
MCAPI ::webrtc::scoped_refptr<::webrtc::SctpTransportInterface > $GetSctpTransport() const
MCAPI::webrtc::RtpTransmissionManager * $rtp_manager()
MCAPI::webrtc::PeerConnectionMessageHandler * $message_handler()
MCAPI ::std::optional<::rtc::SSLRole > $GetSctpSslRole_n()
MCAPI bool $RemoveIceCandidates(::std::vector<::cricket::Candidate > const &candidates)
MCAPI::webrtc::JsepTransportController * $transport_controller_n()
MCAPI void ReportTransportStats(::std::vector<::webrtc::scoped_refptr<::webrtc::RtpTransceiverProxyWithInternal<::webrtc::RtpTransceiver > > > transceivers)
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 ::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 void $ReconfigureBandwidthEstimation(::webrtc::BandwidthEstimationSettings const &settings)
MCAPI bool $NeedsIceRestart(::std::string const &content_name) const
static MCAPI void ** $vftable()
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::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpTransceiverInterface > > $AddTransceiver(::webrtc::scoped_refptr<::webrtc::MediaStreamTrackInterface > track)
MCAPI::webrtc::PeerConnection::InitializePortAllocatorResult InitializePortAllocator_n(::std::set<::rtc::SocketAddress > const &stun_servers, ::std::vector<::cricket::RelayServerConfig > const &turn_servers, ::std::vector<::std::pair<::rtc::SocketAddress, ::rtc::SocketAddress > > const &mapped_ports, ::webrtc::PeerConnectionInterface::RTCConfiguration const &configuration)
MCAPI bool $IsUnifiedPlan() const
MCAPI void $SetLocalDescription(::std::unique_ptr<::webrtc::SessionDescriptionInterface > desc, ::webrtc::scoped_refptr<::webrtc::SetLocalDescriptionObserverInterface > observer)
MCAPI bool $GetStats(::webrtc::StatsObserver *observer, ::webrtc::MediaStreamTrackInterface *track, ::webrtc::PeerConnectionInterface::StatsOutputLevel level)
MCAPI ::std::map<::std::string, ::cricket::TransportStats > $GetTransportStatsByNames(::std::set<::std::string > const &transport_names)
MCAPI void TeardownDataChannelTransport_n(::webrtc::RTCError error)
MCAPI ::std::optional<::std::string > $sctp_transport_name() const
MCAPI::webrtc::PeerConnectionInterface::IceConnectionState $standardized_ice_connection_state()
MCAPI bool $AddIceCandidate(::webrtc::IceCandidateInterface const *ice_candidate)
static MCAPI void ** $vftableForPeerConnectionInterface()
MCAPI void OnTransportControllerConnectionState(::cricket::IceConnectionState state)
MCAPI void $ReportSdpBundleUsage(::webrtc::SessionDescriptionInterface const &remote_description)
MCAPI::rtc::Thread * $signaling_thread() const
MCAPI void ReportFirstConnectUsageMetrics()
MCAPI ::std::unique_ptr<::rtc::SSLCertChain > $GetRemoteSSLCertChain(::std::string const &transport_name)
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::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 ::std::optional<::std::string > SetupDataChannelTransport_n(::std::string_view mid)
MCAPI void $ClearStatsCache()
MCAPI::cricket::PortAllocator * $port_allocator()
MCAPI ::webrtc::scoped_refptr<::webrtc::RtpSenderInterface > $CreateSender(::std::string const &kind, ::std::string const &stream_id)
MCAPI void $RemoveStream(::webrtc::MediaStreamInterface *local_stream)
MCAPI ::webrtc::RTCErrorOr<::webrtc::scoped_refptr<::webrtc::RtpSenderInterface > > $AddTrack(::webrtc::scoped_refptr<::webrtc::MediaStreamTrackInterface > track, ::std::vector<::std::string > const &stream_ids)
MCAPI::webrtc::CryptoOptions $GetCryptoOptions()
MCAPI bool $ShouldFireNegotiationNeededEvent(uint event_id)
MCAPI::webrtc::Call * $call_ptr()
MCAPI::webrtc::PeerConnectionObserver * $Observer() const
MCAPI void $AddRemoteCandidate(::std::string const &mid, ::cricket::Candidate const &candidate)
MCAPI bool $GetLocalCertificate(::std::string const &transport_name, ::webrtc::scoped_refptr<::rtc::RTCCertificate > *certificate)
MCAPI::rtc::Thread * $worker_thread() const
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)
static MCAPI ::webrtc::RTCErrorOr<::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)
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)
static MCAPI void ReportNegotiatedCiphers(bool dtls_enabled, ::cricket::TransportStats const &stats, ::std::set<::cricket::MediaType > const &media_types)
Definition RTCErrorOr.h:8
Definition RTCStatsCollectorCallback.h:16
Definition RtcEventLogOutput.h:7
Definition RtpReceiverInterface.h:24
Definition RtpSenderInterface.h:26
Definition RtpTransceiverInterface.h:22
Definition RtpTransceiverProxyWithInternal.h:8
Definition RtpTransceiver.h:37
Definition RtpTransmissionManager.h:37
Definition RtpTransportInternal.h:21
Definition SctpTransportInterface.h:18
Definition SessionDescriptionInterface.h:18
Definition SetLocalDescriptionObserverInterface.h:15
Definition SetRemoteDescriptionObserverInterface.h:15
Definition SetSessionDescriptionObserver.h:15
Definition StatsObserver.h:15
Definition StreamCollectionInterface.h:16
Definition scoped_refptr.h:8
Definition RelayServerConfig.h:15
Definition TransportStats.h:7
Definition BandwidthEstimationSettings.h:7
Definition BitrateSettings.h:7
Definition CryptoOptions.h:7
Definition DataChannelInit.h:7
Definition DataChannelStats.h:7
Definition PeerConnectionDependencies.h:12
Definition PeerConnectionInterface.h:198
Definition PeerConnectionInterface.h:282
Definition PeerConnection.h:88
Definition RtpEncodingParameters.h:7
Definition RtpTransceiverInit.h:7