123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398 |
- #ifndef PC_PEER_CONNECTION_H_
- #define PC_PEER_CONNECTION_H_
- #include <map>
- #include <memory>
- #include <set>
- #include <string>
- #include <utility>
- #include <vector>
- #include "api/peer_connection_interface.h"
- #include "api/transport/data_channel_transport_interface.h"
- #include "api/turn_customizer.h"
- #include "pc/data_channel_controller.h"
- #include "pc/ice_server_parsing.h"
- #include "pc/jsep_transport_controller.h"
- #include "pc/peer_connection_factory.h"
- #include "pc/peer_connection_internal.h"
- #include "pc/rtc_stats_collector.h"
- #include "pc/rtp_sender.h"
- #include "pc/rtp_transceiver.h"
- #include "pc/sctp_transport.h"
- #include "pc/stats_collector.h"
- #include "pc/stream_collection.h"
- #include "pc/webrtc_session_description_factory.h"
- #include "rtc_base/experiments/field_trial_parser.h"
- #include "rtc_base/operations_chain.h"
- #include "rtc_base/race_checker.h"
- #include "rtc_base/unique_id_generator.h"
- #include "rtc_base/weak_ptr.h"
- namespace webrtc {
- class MediaStreamObserver;
- class VideoRtpReceiver;
- class RtcEventLog;
- class PeerConnection : public PeerConnectionInternal,
- public JsepTransportController::Observer,
- public RtpSenderBase::SetStreamsObserver,
- public rtc::MessageHandler,
- public sigslot::has_slots<> {
- public:
-
-
- enum class UsageEvent : int {
- TURN_SERVER_ADDED = 0x01,
- STUN_SERVER_ADDED = 0x02,
- DATA_ADDED = 0x04,
- AUDIO_ADDED = 0x08,
- VIDEO_ADDED = 0x10,
-
- SET_LOCAL_DESCRIPTION_SUCCEEDED = 0x20,
-
- SET_REMOTE_DESCRIPTION_SUCCEEDED = 0x40,
-
-
- CANDIDATE_COLLECTED = 0x80,
-
- ADD_ICE_CANDIDATE_SUCCEEDED = 0x100,
- ICE_STATE_CONNECTED = 0x200,
- CLOSE_CALLED = 0x400,
-
- PRIVATE_CANDIDATE_COLLECTED = 0x800,
-
-
- REMOTE_PRIVATE_CANDIDATE_ADDED = 0x1000,
-
- MDNS_CANDIDATE_COLLECTED = 0x2000,
-
-
- REMOTE_MDNS_CANDIDATE_ADDED = 0x4000,
-
- IPV6_CANDIDATE_COLLECTED = 0x8000,
-
-
- REMOTE_IPV6_CANDIDATE_ADDED = 0x10000,
-
-
-
- REMOTE_CANDIDATE_ADDED = 0x20000,
-
-
-
-
-
- DIRECT_CONNECTION_SELECTED = 0x40000,
- MAX_VALUE = 0x80000,
- };
- explicit PeerConnection(PeerConnectionFactory* factory,
- std::unique_ptr<RtcEventLog> event_log,
- std::unique_ptr<Call> call);
- bool Initialize(
- const PeerConnectionInterface::RTCConfiguration& configuration,
- PeerConnectionDependencies dependencies);
- rtc::scoped_refptr<StreamCollectionInterface> local_streams() override;
- rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override;
- bool AddStream(MediaStreamInterface* local_stream) override;
- void RemoveStream(MediaStreamInterface* local_stream) override;
- RTCErrorOr<rtc::scoped_refptr<RtpSenderInterface>> AddTrack(
- rtc::scoped_refptr<MediaStreamTrackInterface> track,
- const std::vector<std::string>& stream_ids) override;
- bool RemoveTrack(RtpSenderInterface* sender) override;
- RTCError RemoveTrackNew(
- rtc::scoped_refptr<RtpSenderInterface> sender) override;
- RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>> AddTransceiver(
- rtc::scoped_refptr<MediaStreamTrackInterface> track) override;
- RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>> AddTransceiver(
- rtc::scoped_refptr<MediaStreamTrackInterface> track,
- const RtpTransceiverInit& init) override;
- RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>> AddTransceiver(
- cricket::MediaType media_type) override;
- RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>> AddTransceiver(
- cricket::MediaType media_type,
- const RtpTransceiverInit& init) override;
-
-
-
-
-
-
-
- std::unique_ptr<rtc::SSLCertificate> GetRemoteAudioSSLCertificate();
-
- std::unique_ptr<rtc::SSLCertChain> GetRemoteAudioSSLCertChain();
- rtc::scoped_refptr<RtpSenderInterface> CreateSender(
- const std::string& kind,
- const std::string& stream_id) override;
- std::vector<rtc::scoped_refptr<RtpSenderInterface>> GetSenders()
- const override;
- std::vector<rtc::scoped_refptr<RtpReceiverInterface>> GetReceivers()
- const override;
- std::vector<rtc::scoped_refptr<RtpTransceiverInterface>> GetTransceivers()
- const override;
- rtc::scoped_refptr<DataChannelInterface> CreateDataChannel(
- const std::string& label,
- const DataChannelInit* config) override;
-
- bool GetStats(StatsObserver* observer,
- webrtc::MediaStreamTrackInterface* track,
- StatsOutputLevel level) override;
-
- void GetStats(RTCStatsCollectorCallback* callback) override;
- void GetStats(
- rtc::scoped_refptr<RtpSenderInterface> selector,
- rtc::scoped_refptr<RTCStatsCollectorCallback> callback) override;
- void GetStats(
- rtc::scoped_refptr<RtpReceiverInterface> selector,
- rtc::scoped_refptr<RTCStatsCollectorCallback> callback) override;
- void ClearStatsCache() override;
- SignalingState signaling_state() override;
- IceConnectionState ice_connection_state() override;
- IceConnectionState standardized_ice_connection_state() override;
- PeerConnectionState peer_connection_state() override;
- IceGatheringState ice_gathering_state() override;
- absl::optional<bool> can_trickle_ice_candidates() override;
- const SessionDescriptionInterface* local_description() const override;
- const SessionDescriptionInterface* remote_description() const override;
- const SessionDescriptionInterface* current_local_description() const override;
- const SessionDescriptionInterface* current_remote_description()
- const override;
- const SessionDescriptionInterface* pending_local_description() const override;
- const SessionDescriptionInterface* pending_remote_description()
- const override;
- void RestartIce() override;
-
- void CreateOffer(CreateSessionDescriptionObserver* observer,
- const RTCOfferAnswerOptions& options) override;
- void CreateAnswer(CreateSessionDescriptionObserver* observer,
- const RTCOfferAnswerOptions& options) override;
- void SetLocalDescription(SetSessionDescriptionObserver* observer,
- SessionDescriptionInterface* desc) override;
- void SetLocalDescription(SetSessionDescriptionObserver* observer) override;
- void SetRemoteDescription(SetSessionDescriptionObserver* observer,
- SessionDescriptionInterface* desc) override;
- void SetRemoteDescription(
- std::unique_ptr<SessionDescriptionInterface> desc,
- rtc::scoped_refptr<SetRemoteDescriptionObserverInterface> observer)
- override;
- PeerConnectionInterface::RTCConfiguration GetConfiguration() override;
- RTCError SetConfiguration(
- const PeerConnectionInterface::RTCConfiguration& configuration) override;
- bool AddIceCandidate(const IceCandidateInterface* candidate) override;
- void AddIceCandidate(std::unique_ptr<IceCandidateInterface> candidate,
- std::function<void(RTCError)> callback) override;
- bool RemoveIceCandidates(
- const std::vector<cricket::Candidate>& candidates) override;
- RTCError SetBitrate(const BitrateSettings& bitrate) override;
- void SetAudioPlayout(bool playout) override;
- void SetAudioRecording(bool recording) override;
- rtc::scoped_refptr<DtlsTransportInterface> LookupDtlsTransportByMid(
- const std::string& mid) override;
- rtc::scoped_refptr<DtlsTransport> LookupDtlsTransportByMidInternal(
- const std::string& mid);
- rtc::scoped_refptr<SctpTransportInterface> GetSctpTransport() const override;
- void AddAdaptationResource(rtc::scoped_refptr<Resource> resource) override;
- bool StartRtcEventLog(std::unique_ptr<RtcEventLogOutput> output,
- int64_t output_period_ms) override;
- bool StartRtcEventLog(std::unique_ptr<RtcEventLogOutput> output) override;
- void StopRtcEventLog() override;
- void Close() override;
-
- rtc::Thread* network_thread() const final {
- return factory_->network_thread();
- }
- rtc::Thread* worker_thread() const final { return factory_->worker_thread(); }
- rtc::Thread* signaling_thread() const final {
- return factory_->signaling_thread();
- }
- std::string session_id() const override {
- RTC_DCHECK_RUN_ON(signaling_thread());
- return session_id_;
- }
- bool initial_offerer() const override {
- RTC_DCHECK_RUN_ON(signaling_thread());
- return transport_controller_ && transport_controller_->initial_offerer();
- }
- std::vector<
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>>
- GetTransceiversInternal() const override {
- RTC_DCHECK_RUN_ON(signaling_thread());
- return transceivers_;
- }
- sigslot::signal1<DataChannel*>& SignalDataChannelCreated() override {
- return data_channel_controller_.SignalDataChannelCreated();
- }
- cricket::RtpDataChannel* rtp_data_channel() const override {
- return data_channel_controller_.rtp_data_channel();
- }
- std::vector<DataChannel::Stats> GetDataChannelStats() const override;
- absl::optional<std::string> sctp_transport_name() const override;
- cricket::CandidateStatsList GetPooledCandidateStats() const override;
- std::map<std::string, std::string> GetTransportNamesByMid() const override;
- std::map<std::string, cricket::TransportStats> GetTransportStatsByNames(
- const std::set<std::string>& transport_names) override;
- Call::Stats GetCallStats() override;
- bool GetLocalCertificate(
- const std::string& transport_name,
- rtc::scoped_refptr<rtc::RTCCertificate>* certificate) override;
- std::unique_ptr<rtc::SSLCertChain> GetRemoteSSLCertChain(
- const std::string& transport_name) override;
- bool IceRestartPending(const std::string& content_name) const override;
- bool NeedsIceRestart(const std::string& content_name) const override;
- bool GetSslRole(const std::string& content_name, rtc::SSLRole* role) override;
-
- void NoteDataAddedEvent() { NoteUsageEvent(UsageEvent::DATA_ADDED); }
-
- PeerConnectionObserver* Observer() const;
- bool IsClosed() const {
- RTC_DCHECK_RUN_ON(signaling_thread());
- return signaling_state_ == PeerConnectionInterface::kClosed;
- }
-
- bool GetSctpSslRole(rtc::SSLRole* role);
-
- void OnSctpDataChannelClosed(DataChannel* channel);
-
- void ReturnHistogramVeryQuicklyForTesting() {
- RTC_DCHECK_RUN_ON(signaling_thread());
- return_histogram_very_quickly_ = true;
- }
- void RequestUsagePatternReportForTesting();
- absl::optional<std::string> sctp_mid() {
- RTC_DCHECK_RUN_ON(signaling_thread());
- return sctp_mid_s_;
- }
- protected:
- ~PeerConnection() override;
- private:
- class ImplicitCreateSessionDescriptionObserver;
- friend class ImplicitCreateSessionDescriptionObserver;
- class SetRemoteDescriptionObserverAdapter;
- friend class SetRemoteDescriptionObserverAdapter;
-
-
-
-
-
-
- class LocalIceCredentialsToReplace;
- struct RtpSenderInfo {
- RtpSenderInfo() : first_ssrc(0) {}
- RtpSenderInfo(const std::string& stream_id,
- const std::string sender_id,
- uint32_t ssrc)
- : stream_id(stream_id), sender_id(sender_id), first_ssrc(ssrc) {}
- bool operator==(const RtpSenderInfo& other) {
- return this->stream_id == other.stream_id &&
- this->sender_id == other.sender_id &&
- this->first_ssrc == other.first_ssrc;
- }
- std::string stream_id;
- std::string sender_id;
-
-
- uint32_t first_ssrc;
- };
-
- struct DatagramTransportConfig {
- explicit DatagramTransportConfig(const std::string& field_trial)
- : enabled("enabled", true), default_value("default_value", false) {
- ParseFieldTrial({&enabled, &default_value}, field_trial);
- }
-
-
-
-
-
- FieldTrialFlag enabled;
-
-
-
-
-
- FieldTrialFlag default_value;
- };
-
- struct DatagramTransportDataChannelConfig {
- explicit DatagramTransportDataChannelConfig(const std::string& field_trial)
- : enabled("enabled", true),
- default_value("default_value", false),
- receive_only("receive_only", false) {
- ParseFieldTrial({&enabled, &default_value, &receive_only}, field_trial);
- }
-
-
-
-
-
- FieldTrialFlag enabled;
-
-
-
-
-
- FieldTrialFlag default_value;
-
-
-
- FieldTrialFlag receive_only;
- };
-
-
- class TransceiverStableState {
- public:
- TransceiverStableState() {}
- void set_newly_created();
- void SetMSectionIfUnset(absl::optional<std::string> mid,
- absl::optional<size_t> mline_index);
- void SetRemoteStreamIdsIfUnset(const std::vector<std::string>& ids);
- absl::optional<std::string> mid() const { return mid_; }
- absl::optional<size_t> mline_index() const { return mline_index_; }
- absl::optional<std::vector<std::string>> remote_stream_ids() const {
- return remote_stream_ids_;
- }
- bool has_m_section() const { return has_m_section_; }
- bool newly_created() const { return newly_created_; }
- private:
- absl::optional<std::string> mid_;
- absl::optional<size_t> mline_index_;
- absl::optional<std::vector<std::string>> remote_stream_ids_;
-
-
-
- bool has_m_section_ = false;
-
-
-
- bool newly_created_ = false;
- };
-
- void OnMessage(rtc::Message* msg) override;
-
-
- cricket::VoiceMediaChannel* voice_media_channel() const
- RTC_RUN_ON(signaling_thread());
- cricket::VideoMediaChannel* video_media_channel() const
- RTC_RUN_ON(signaling_thread());
- std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>>
- GetSendersInternal() const RTC_RUN_ON(signaling_thread());
- std::vector<
- rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>>
- GetReceiversInternal() const RTC_RUN_ON(signaling_thread());
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- GetAudioTransceiver() const RTC_RUN_ON(signaling_thread());
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- GetVideoTransceiver() const RTC_RUN_ON(signaling_thread());
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- GetFirstAudioTransceiver() const RTC_RUN_ON(signaling_thread());
-
-
-
- void DoCreateOffer(
- const RTCOfferAnswerOptions& options,
- rtc::scoped_refptr<CreateSessionDescriptionObserver> observer);
- void DoCreateAnswer(
- const RTCOfferAnswerOptions& options,
- rtc::scoped_refptr<CreateSessionDescriptionObserver> observer);
- void DoSetLocalDescription(
- std::unique_ptr<SessionDescriptionInterface> desc,
- rtc::scoped_refptr<SetSessionDescriptionObserver> observer);
- void DoSetRemoteDescription(
- std::unique_ptr<SessionDescriptionInterface> desc,
- rtc::scoped_refptr<SetRemoteDescriptionObserverInterface> observer);
- void CreateAudioReceiver(MediaStreamInterface* stream,
- const RtpSenderInfo& remote_sender_info)
- RTC_RUN_ON(signaling_thread());
- void CreateVideoReceiver(MediaStreamInterface* stream,
- const RtpSenderInfo& remote_sender_info)
- RTC_RUN_ON(signaling_thread());
- rtc::scoped_refptr<RtpReceiverInterface> RemoveAndStopReceiver(
- const RtpSenderInfo& remote_sender_info) RTC_RUN_ON(signaling_thread());
-
-
- void AddAudioTrack(AudioTrackInterface* track, MediaStreamInterface* stream)
- RTC_RUN_ON(signaling_thread());
- void RemoveAudioTrack(AudioTrackInterface* track,
- MediaStreamInterface* stream)
- RTC_RUN_ON(signaling_thread());
- void AddVideoTrack(VideoTrackInterface* track, MediaStreamInterface* stream)
- RTC_RUN_ON(signaling_thread());
- void RemoveVideoTrack(VideoTrackInterface* track,
- MediaStreamInterface* stream)
- RTC_RUN_ON(signaling_thread());
-
- RTCErrorOr<rtc::scoped_refptr<RtpSenderInterface>> AddTrackUnifiedPlan(
- rtc::scoped_refptr<MediaStreamTrackInterface> track,
- const std::vector<std::string>& stream_ids)
- RTC_RUN_ON(signaling_thread());
-
- RTCErrorOr<rtc::scoped_refptr<RtpSenderInterface>> AddTrackPlanB(
- rtc::scoped_refptr<MediaStreamTrackInterface> track,
- const std::vector<std::string>& stream_ids)
- RTC_RUN_ON(signaling_thread());
-
-
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- FindFirstTransceiverForAddedTrack(
- rtc::scoped_refptr<MediaStreamTrackInterface> track)
- RTC_RUN_ON(signaling_thread());
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- FindTransceiverBySender(rtc::scoped_refptr<RtpSenderInterface> sender)
- RTC_RUN_ON(signaling_thread());
-
-
- RTCErrorOr<rtc::scoped_refptr<RtpTransceiverInterface>> AddTransceiver(
- cricket::MediaType media_type,
- rtc::scoped_refptr<MediaStreamTrackInterface> track,
- const RtpTransceiverInit& init,
- bool fire_callback = true) RTC_RUN_ON(signaling_thread());
- rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>
- CreateSender(cricket::MediaType media_type,
- const std::string& id,
- rtc::scoped_refptr<MediaStreamTrackInterface> track,
- const std::vector<std::string>& stream_ids,
- const std::vector<RtpEncodingParameters>& send_encodings);
- rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>
- CreateReceiver(cricket::MediaType media_type, const std::string& receiver_id);
-
-
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- CreateAndAddTransceiver(
- rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>> sender,
- rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>
- receiver) RTC_RUN_ON(signaling_thread());
- void SetIceConnectionState(IceConnectionState new_state)
- RTC_RUN_ON(signaling_thread());
- void SetStandardizedIceConnectionState(
- PeerConnectionInterface::IceConnectionState new_state)
- RTC_RUN_ON(signaling_thread());
- void SetConnectionState(
- PeerConnectionInterface::PeerConnectionState new_state)
- RTC_RUN_ON(signaling_thread());
-
- void OnIceGatheringChange(IceGatheringState new_state)
- RTC_RUN_ON(signaling_thread());
-
- void OnIceCandidate(std::unique_ptr<IceCandidateInterface> candidate)
- RTC_RUN_ON(signaling_thread());
-
- void OnIceCandidateError(const std::string& address,
- int port,
- const std::string& url,
- int error_code,
- const std::string& error_text)
- RTC_RUN_ON(signaling_thread());
-
- void OnIceCandidatesRemoved(const std::vector<cricket::Candidate>& candidates)
- RTC_RUN_ON(signaling_thread());
- void OnSelectedCandidatePairChanged(
- const cricket::CandidatePairChangeEvent& event)
- RTC_RUN_ON(signaling_thread());
-
- void ChangeSignalingState(SignalingState signaling_state)
- RTC_RUN_ON(signaling_thread());
-
- void OnAudioTrackAdded(AudioTrackInterface* track,
- MediaStreamInterface* stream)
- RTC_RUN_ON(signaling_thread());
- void OnAudioTrackRemoved(AudioTrackInterface* track,
- MediaStreamInterface* stream)
- RTC_RUN_ON(signaling_thread());
- void OnVideoTrackAdded(VideoTrackInterface* track,
- MediaStreamInterface* stream)
- RTC_RUN_ON(signaling_thread());
- void OnVideoTrackRemoved(VideoTrackInterface* track,
- MediaStreamInterface* stream)
- RTC_RUN_ON(signaling_thread());
- void PostSetSessionDescriptionSuccess(
- SetSessionDescriptionObserver* observer);
- void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver* observer,
- RTCError&& error);
- void PostCreateSessionDescriptionFailure(
- CreateSessionDescriptionObserver* observer,
- RTCError error);
-
-
- RTCError ApplyLocalDescription(
- std::unique_ptr<SessionDescriptionInterface> desc);
- RTCError ApplyRemoteDescription(
- std::unique_ptr<SessionDescriptionInterface> desc);
-
-
- RTCError UpdateTransceiversAndDataChannels(
- cricket::ContentSource source,
- const SessionDescriptionInterface& new_session,
- const SessionDescriptionInterface* old_local_description,
- const SessionDescriptionInterface* old_remote_description)
- RTC_RUN_ON(signaling_thread());
-
-
- RTCError UpdateTransceiverChannel(
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- transceiver,
- const cricket::ContentInfo& content,
- const cricket::ContentGroup* bundle_group) RTC_RUN_ON(signaling_thread());
-
-
- RTCError UpdateDataChannel(cricket::ContentSource source,
- const cricket::ContentInfo& content,
- const cricket::ContentGroup* bundle_group)
- RTC_RUN_ON(signaling_thread());
-
- RTCErrorOr<
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>>
- AssociateTransceiver(cricket::ContentSource source,
- SdpType type,
- size_t mline_index,
- const cricket::ContentInfo& content,
- const cricket::ContentInfo* old_local_content,
- const cricket::ContentInfo* old_remote_content)
- RTC_RUN_ON(signaling_thread());
-
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- GetAssociatedTransceiver(const std::string& mid) const
- RTC_RUN_ON(signaling_thread());
-
-
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- GetTransceiverByMLineIndex(size_t mline_index) const
- RTC_RUN_ON(signaling_thread());
-
-
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- FindAvailableTransceiverToReceive(cricket::MediaType media_type) const
- RTC_RUN_ON(signaling_thread());
-
-
-
-
- const cricket::ContentInfo* FindMediaSectionForTransceiver(
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- transceiver,
- const SessionDescriptionInterface* sdesc) const
- RTC_RUN_ON(signaling_thread());
-
-
- void SetAssociatedRemoteStreams(
- rtc::scoped_refptr<RtpReceiverInternal> receiver,
- const std::vector<std::string>& stream_ids,
- std::vector<rtc::scoped_refptr<MediaStreamInterface>>* added_streams,
- std::vector<rtc::scoped_refptr<MediaStreamInterface>>* removed_streams)
- RTC_RUN_ON(signaling_thread());
-
-
-
-
-
-
-
-
- void ProcessRemovalOfRemoteTrack(
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- transceiver,
- std::vector<rtc::scoped_refptr<RtpTransceiverInterface>>* remove_list,
- std::vector<rtc::scoped_refptr<MediaStreamInterface>>* removed_streams)
- RTC_RUN_ON(signaling_thread());
- void RemoveRemoteStreamsIfEmpty(
- const std::vector<rtc::scoped_refptr<MediaStreamInterface>>&
- remote_streams,
- std::vector<rtc::scoped_refptr<MediaStreamInterface>>* removed_streams)
- RTC_RUN_ON(signaling_thread());
- void OnNegotiationNeeded();
-
-
- void GetOptionsForOffer(const PeerConnectionInterface::RTCOfferAnswerOptions&
- offer_answer_options,
- cricket::MediaSessionOptions* session_options)
- RTC_RUN_ON(signaling_thread());
- void GetOptionsForPlanBOffer(
- const PeerConnectionInterface::RTCOfferAnswerOptions&
- offer_answer_options,
- cricket::MediaSessionOptions* session_options)
- RTC_RUN_ON(signaling_thread());
- void GetOptionsForUnifiedPlanOffer(
- const PeerConnectionInterface::RTCOfferAnswerOptions&
- offer_answer_options,
- cricket::MediaSessionOptions* session_options)
- RTC_RUN_ON(signaling_thread());
- RTCError HandleLegacyOfferOptions(const RTCOfferAnswerOptions& options)
- RTC_RUN_ON(signaling_thread());
- void RemoveRecvDirectionFromReceivingTransceiversOfType(
- cricket::MediaType media_type) RTC_RUN_ON(signaling_thread());
- void AddUpToOneReceivingTransceiverOfType(cricket::MediaType media_type);
- std::vector<
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>>
- GetReceivingTransceiversOfType(cricket::MediaType media_type)
- RTC_RUN_ON(signaling_thread());
-
-
- void GetOptionsForAnswer(const RTCOfferAnswerOptions& offer_answer_options,
- cricket::MediaSessionOptions* session_options)
- RTC_RUN_ON(signaling_thread());
- void GetOptionsForPlanBAnswer(
- const PeerConnectionInterface::RTCOfferAnswerOptions&
- offer_answer_options,
- cricket::MediaSessionOptions* session_options)
- RTC_RUN_ON(signaling_thread());
- void GetOptionsForUnifiedPlanAnswer(
- const PeerConnectionInterface::RTCOfferAnswerOptions&
- offer_answer_options,
- cricket::MediaSessionOptions* session_options)
- RTC_RUN_ON(signaling_thread());
-
-
- void GenerateMediaDescriptionOptions(
- const SessionDescriptionInterface* session_desc,
- RtpTransceiverDirection audio_direction,
- RtpTransceiverDirection video_direction,
- absl::optional<size_t>* audio_index,
- absl::optional<size_t>* video_index,
- absl::optional<size_t>* data_index,
- cricket::MediaSessionOptions* session_options)
- RTC_RUN_ON(signaling_thread());
-
-
- cricket::MediaDescriptionOptions GetMediaDescriptionOptionsForActiveData(
- const std::string& mid) const RTC_RUN_ON(signaling_thread());
-
-
- cricket::MediaDescriptionOptions GetMediaDescriptionOptionsForRejectedData(
- const std::string& mid) const RTC_RUN_ON(signaling_thread());
-
-
-
- absl::optional<std::string> GetDataMid() const RTC_RUN_ON(signaling_thread());
-
-
- void RemoveSenders(cricket::MediaType media_type)
- RTC_RUN_ON(signaling_thread());
-
-
-
-
-
-
- void UpdateRemoteSendersList(
- const std::vector<cricket::StreamParams>& streams,
- bool default_track_needed,
- cricket::MediaType media_type,
- StreamCollection* new_streams) RTC_RUN_ON(signaling_thread());
-
-
-
- void OnRemoteSenderAdded(const RtpSenderInfo& sender_info,
- cricket::MediaType media_type)
- RTC_RUN_ON(signaling_thread());
-
-
-
- void OnRemoteSenderRemoved(const RtpSenderInfo& sender_info,
- cricket::MediaType media_type)
- RTC_RUN_ON(signaling_thread());
-
-
-
- void UpdateEndedRemoteMediaStreams() RTC_RUN_ON(signaling_thread());
-
-
-
-
- void UpdateLocalSenders(const std::vector<cricket::StreamParams>& streams,
- cricket::MediaType media_type)
- RTC_RUN_ON(signaling_thread());
-
-
-
-
-
- void OnLocalSenderAdded(const RtpSenderInfo& sender_info,
- cricket::MediaType media_type)
- RTC_RUN_ON(signaling_thread());
-
-
-
-
-
- void OnLocalSenderRemoved(const RtpSenderInfo& sender_info,
- cricket::MediaType media_type)
- RTC_RUN_ON(signaling_thread());
-
-
-
-
-
-
- bool IsUnifiedPlan() const RTC_RUN_ON(signaling_thread()) {
- return configuration_.sdp_semantics == SdpSemantics::kUnifiedPlan;
- }
-
-
-
-
- void FillInMissingRemoteMids(cricket::SessionDescription* remote_description)
- RTC_RUN_ON(signaling_thread());
-
- bool HasRtpSender(cricket::MediaType type) const
- RTC_RUN_ON(signaling_thread());
-
- rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>
- FindSenderForTrack(MediaStreamTrackInterface* track) const
- RTC_RUN_ON(signaling_thread());
-
- rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>
- FindSenderById(const std::string& sender_id) const
- RTC_RUN_ON(signaling_thread());
-
- rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>
- FindReceiverById(const std::string& receiver_id) const
- RTC_RUN_ON(signaling_thread());
- std::vector<RtpSenderInfo>* GetRemoteSenderInfos(
- cricket::MediaType media_type);
- std::vector<RtpSenderInfo>* GetLocalSenderInfos(
- cricket::MediaType media_type);
- const RtpSenderInfo* FindSenderInfo(const std::vector<RtpSenderInfo>& infos,
- const std::string& stream_id,
- const std::string sender_id) const;
-
-
- DataChannel* FindDataChannelBySid(int sid) const
- RTC_RUN_ON(signaling_thread());
-
- struct InitializePortAllocatorResult {
- bool enable_ipv6;
- };
- InitializePortAllocatorResult InitializePortAllocator_n(
- const cricket::ServerAddresses& stun_servers,
- const std::vector<cricket::RelayServerConfig>& turn_servers,
- const RTCConfiguration& configuration);
-
-
- bool ReconfigurePortAllocator_n(
- const cricket::ServerAddresses& stun_servers,
- const std::vector<cricket::RelayServerConfig>& turn_servers,
- IceTransportsType type,
- int candidate_pool_size,
- PortPrunePolicy turn_port_prune_policy,
- webrtc::TurnCustomizer* turn_customizer,
- absl::optional<int> stun_candidate_keepalive_interval,
- bool have_local_description);
-
-
- bool StartRtcEventLog_w(std::unique_ptr<RtcEventLogOutput> output,
- int64_t output_period_ms);
-
-
- void StopRtcEventLog_w();
-
-
-
-
- RTCError ValidateConfiguration(const RTCConfiguration& config) const;
- cricket::ChannelManager* channel_manager() const;
- enum class SessionError {
- kNone,
- kContent,
- kTransport,
- };
-
- SessionError session_error() const RTC_RUN_ON(signaling_thread()) {
- return session_error_;
- }
- const std::string& session_error_desc() const { return session_error_desc_; }
- cricket::ChannelInterface* GetChannel(const std::string& content_name);
- cricket::IceConfig ParseIceConfig(
- const PeerConnectionInterface::RTCConfiguration& config) const;
- cricket::DataChannelType data_channel_type() const;
-
-
- void OnCertificateReady(
- const rtc::scoped_refptr<rtc::RTCCertificate>& certificate);
- void OnDtlsSrtpSetupFailure(cricket::BaseChannel*, bool rtcp);
-
-
- SessionDescriptionInterface* mutable_local_description()
- RTC_RUN_ON(signaling_thread()) {
- return pending_local_description_ ? pending_local_description_.get()
- : current_local_description_.get();
- }
- SessionDescriptionInterface* mutable_remote_description()
- RTC_RUN_ON(signaling_thread()) {
- return pending_remote_description_ ? pending_remote_description_.get()
- : current_remote_description_.get();
- }
-
- void SetSessionError(SessionError error, const std::string& error_desc);
- RTCError UpdateSessionState(SdpType type,
- cricket::ContentSource source,
- const cricket::SessionDescription* description);
-
-
- RTCError PushdownMediaDescription(SdpType type, cricket::ContentSource source)
- RTC_RUN_ON(signaling_thread());
- RTCError PushdownTransportDescription(cricket::ContentSource source,
- SdpType type);
-
-
- static bool GetTransportDescription(
- const cricket::SessionDescription* description,
- const std::string& content_name,
- cricket::TransportDescription* info);
-
-
-
- void EnableSending() RTC_RUN_ON(signaling_thread());
-
- void DestroyAllChannels() RTC_RUN_ON(signaling_thread());
-
-
-
- bool GetLocalCandidateMediaIndex(const std::string& content_name,
- int* sdp_mline_index)
- RTC_RUN_ON(signaling_thread());
-
- bool UseCandidatesInSessionDescription(
- const SessionDescriptionInterface* remote_desc)
- RTC_RUN_ON(signaling_thread());
-
- bool UseCandidate(const IceCandidateInterface* candidate)
- RTC_RUN_ON(signaling_thread());
- RTCErrorOr<const cricket::ContentInfo*> FindContentInfo(
- const SessionDescriptionInterface* description,
- const IceCandidateInterface* candidate) RTC_RUN_ON(signaling_thread());
-
-
- void RemoveUnusedChannels(const cricket::SessionDescription* desc)
- RTC_RUN_ON(signaling_thread());
-
-
-
- RTCError CreateChannels(const cricket::SessionDescription& desc)
- RTC_RUN_ON(signaling_thread());
-
-
-
-
-
- RTCErrorOr<const cricket::ContentGroup*> GetEarlyBundleGroup(
- const cricket::SessionDescription& desc) const
- RTC_RUN_ON(signaling_thread());
-
- cricket::VoiceChannel* CreateVoiceChannel(const std::string& mid)
- RTC_RUN_ON(signaling_thread());
- cricket::VideoChannel* CreateVideoChannel(const std::string& mid)
- RTC_RUN_ON(signaling_thread());
- bool CreateDataChannel(const std::string& mid) RTC_RUN_ON(signaling_thread());
- bool SetupDataChannelTransport_n(const std::string& mid)
- RTC_RUN_ON(network_thread());
- void TeardownDataChannelTransport_n() RTC_RUN_ON(network_thread());
- bool ValidateBundleSettings(const cricket::SessionDescription* desc);
- bool HasRtcpMuxEnabled(const cricket::ContentInfo* content);
-
- RTCError ValidateSessionDescription(const SessionDescriptionInterface* sdesc,
- cricket::ContentSource source)
- RTC_RUN_ON(signaling_thread());
-
-
- bool ExpectSetLocalDescription(SdpType type);
-
-
- bool ExpectSetRemoteDescription(SdpType type);
-
- bool ValidateDtlsSetupAttribute(const cricket::SessionDescription* desc,
- SdpType type);
-
-
-
-
- bool ReadyToUseRemoteCandidate(const IceCandidateInterface* candidate,
- const SessionDescriptionInterface* remote_desc,
- bool* valid) RTC_RUN_ON(signaling_thread());
-
-
- bool SrtpRequired() const RTC_RUN_ON(signaling_thread());
-
- void OnTransportControllerConnectionState(cricket::IceConnectionState state)
- RTC_RUN_ON(signaling_thread());
- void OnTransportControllerGatheringState(cricket::IceGatheringState state)
- RTC_RUN_ON(signaling_thread());
- void OnTransportControllerCandidatesGathered(
- const std::string& transport_name,
- const std::vector<cricket::Candidate>& candidates)
- RTC_RUN_ON(signaling_thread());
- void OnTransportControllerCandidateError(
- const cricket::IceCandidateErrorEvent& event)
- RTC_RUN_ON(signaling_thread());
- void OnTransportControllerCandidatesRemoved(
- const std::vector<cricket::Candidate>& candidates)
- RTC_RUN_ON(signaling_thread());
- void OnTransportControllerCandidateChanged(
- const cricket::CandidatePairChangeEvent& event)
- RTC_RUN_ON(signaling_thread());
- void OnTransportControllerDtlsHandshakeError(rtc::SSLHandshakeError error);
- const char* SessionErrorToString(SessionError error) const;
- std::string GetSessionErrorMsg() RTC_RUN_ON(signaling_thread());
-
- void ReportSdpFormatReceived(const SessionDescriptionInterface& remote_offer);
-
-
- void ReportNegotiatedSdpSemantics(const SessionDescriptionInterface& answer);
-
-
- void ReportTransportStats() RTC_RUN_ON(signaling_thread());
-
- void ReportBestConnectionState(const cricket::TransportStats& stats);
- void ReportNegotiatedCiphers(const cricket::TransportStats& stats,
- const std::set<cricket::MediaType>& media_types)
- RTC_RUN_ON(signaling_thread());
- void ReportIceCandidateCollected(const cricket::Candidate& candidate)
- RTC_RUN_ON(signaling_thread());
- void ReportRemoteIceCandidateAdded(const cricket::Candidate& candidate)
- RTC_RUN_ON(signaling_thread());
- void NoteUsageEvent(UsageEvent event);
- void ReportUsagePattern() const RTC_RUN_ON(signaling_thread());
- void OnSentPacket_w(const rtc::SentPacket& sent_packet);
- const std::string GetTransportName(const std::string& content_name)
- RTC_RUN_ON(signaling_thread());
-
-
-
-
-
- void DestroyTransceiverChannel(
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>
- transceiver);
-
-
- void DestroyDataChannelTransport() RTC_RUN_ON(signaling_thread());
-
-
- void DestroyChannelInterface(cricket::ChannelInterface* channel);
-
-
-
-
-
-
- bool OnTransportChanged(
- const std::string& mid,
- RtpTransportInternal* rtp_transport,
- rtc::scoped_refptr<DtlsTransport> dtls_transport,
- DataChannelTransportInterface* data_channel_transport) override;
-
- void OnSetStreams() override;
-
-
-
- CryptoOptions GetCryptoOptions() RTC_RUN_ON(signaling_thread());
-
- RtpTransportInternal* GetRtpTransport(const std::string& mid)
- RTC_RUN_ON(signaling_thread()) {
- auto rtp_transport = transport_controller_->GetRtpTransport(mid);
- RTC_DCHECK(rtp_transport);
- return rtp_transport;
- }
- void UpdateNegotiationNeeded();
- bool CheckIfNegotiationIsNeeded();
-
- RTCError Rollback(SdpType sdp_type);
-
-
-
-
-
-
- const rtc::scoped_refptr<PeerConnectionFactory> factory_;
- PeerConnectionObserver* observer_ RTC_GUARDED_BY(signaling_thread()) =
- nullptr;
-
- std::unique_ptr<RtcEventLog> event_log_ RTC_GUARDED_BY(worker_thread());
-
-
- RtcEventLog* const event_log_ptr_ RTC_PT_GUARDED_BY(worker_thread());
-
-
-
-
-
- rtc::scoped_refptr<rtc::OperationsChain> operations_chain_
- RTC_GUARDED_BY(signaling_thread());
- SignalingState signaling_state_ RTC_GUARDED_BY(signaling_thread()) = kStable;
- IceConnectionState ice_connection_state_ RTC_GUARDED_BY(signaling_thread()) =
- kIceConnectionNew;
- PeerConnectionInterface::IceConnectionState standardized_ice_connection_state_
- RTC_GUARDED_BY(signaling_thread()) = kIceConnectionNew;
- PeerConnectionInterface::PeerConnectionState connection_state_
- RTC_GUARDED_BY(signaling_thread()) = PeerConnectionState::kNew;
- IceGatheringState ice_gathering_state_ RTC_GUARDED_BY(signaling_thread()) =
- kIceGatheringNew;
- PeerConnectionInterface::RTCConfiguration configuration_
- RTC_GUARDED_BY(signaling_thread());
-
- const DatagramTransportConfig datagram_transport_config_;
-
- const DatagramTransportDataChannelConfig
- datagram_transport_data_channel_config_;
-
- bool use_datagram_transport_ RTC_GUARDED_BY(signaling_thread()) = false;
-
-
- bool use_datagram_transport_for_data_channels_
- RTC_GUARDED_BY(signaling_thread()) = false;
-
- bool use_datagram_transport_for_data_channels_receive_only_
- RTC_GUARDED_BY(signaling_thread()) = false;
-
-
- std::unique_ptr<AsyncResolverFactory> async_resolver_factory_
- RTC_GUARDED_BY(signaling_thread());
- std::unique_ptr<cricket::PortAllocator>
- port_allocator_;
-
- std::unique_ptr<rtc::PacketSocketFactory> packet_socket_factory_;
- std::unique_ptr<webrtc::IceTransportFactory>
- ice_transport_factory_;
-
-
-
-
- std::unique_ptr<rtc::SSLCertificateVerifier>
- tls_cert_verifier_;
-
-
-
- const std::string rtcp_cname_;
-
- const rtc::scoped_refptr<StreamCollection> local_streams_
- RTC_GUARDED_BY(signaling_thread());
-
- const rtc::scoped_refptr<StreamCollection> remote_streams_
- RTC_GUARDED_BY(signaling_thread());
- std::vector<std::unique_ptr<MediaStreamObserver>> stream_observers_
- RTC_GUARDED_BY(signaling_thread());
-
- std::vector<RtpSenderInfo> remote_audio_sender_infos_
- RTC_GUARDED_BY(signaling_thread());
- std::vector<RtpSenderInfo> remote_video_sender_infos_
- RTC_GUARDED_BY(signaling_thread());
- std::vector<RtpSenderInfo> local_audio_sender_infos_
- RTC_GUARDED_BY(signaling_thread());
- std::vector<RtpSenderInfo> local_video_sender_infos_
- RTC_GUARDED_BY(signaling_thread());
- bool remote_peer_supports_msid_ RTC_GUARDED_BY(signaling_thread()) = false;
-
-
- std::unique_ptr<Call> call_ RTC_GUARDED_BY(worker_thread());
- rtc::AsyncInvoker rtcp_invoker_ RTC_GUARDED_BY(network_thread());
-
-
- Call* const call_ptr_;
- std::unique_ptr<StatsCollector> stats_
- RTC_GUARDED_BY(signaling_thread());
- rtc::scoped_refptr<RTCStatsCollector> stats_collector_
- RTC_GUARDED_BY(signaling_thread());
-
-
- std::map<rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>,
- TransceiverStableState>
- transceiver_stable_states_by_transceivers_;
-
- bool have_pending_rtp_data_channel_ RTC_GUARDED_BY(signaling_thread()) =
- false;
-
- std::map<rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>,
- std::vector<std::string>>
- remote_stream_ids_by_transceivers_;
- std::vector<
- rtc::scoped_refptr<RtpTransceiverProxyWithInternal<RtpTransceiver>>>
- transceivers_;
-
-
-
-
-
- rtc::scoped_refptr<MediaStreamInterface> missing_msid_default_stream_
- RTC_GUARDED_BY(signaling_thread());
-
-
- rtc::UniqueStringGenerator mid_generator_ RTC_GUARDED_BY(signaling_thread());
- SessionError session_error_ RTC_GUARDED_BY(signaling_thread()) =
- SessionError::kNone;
- std::string session_error_desc_ RTC_GUARDED_BY(signaling_thread());
- std::string session_id_ RTC_GUARDED_BY(signaling_thread());
- std::unique_ptr<JsepTransportController>
- transport_controller_;
-
- std::unique_ptr<cricket::SctpTransportInternalFactory>
- sctp_factory_;
-
-
-
-
-
-
-
-
- absl::optional<std::string> sctp_mid_s_ RTC_GUARDED_BY(signaling_thread());
- absl::optional<std::string> sctp_mid_n_ RTC_GUARDED_BY(network_thread());
-
- absl::optional<bool> is_caller_ RTC_GUARDED_BY(signaling_thread());
- std::unique_ptr<SessionDescriptionInterface> current_local_description_
- RTC_GUARDED_BY(signaling_thread());
- std::unique_ptr<SessionDescriptionInterface> pending_local_description_
- RTC_GUARDED_BY(signaling_thread());
- std::unique_ptr<SessionDescriptionInterface> current_remote_description_
- RTC_GUARDED_BY(signaling_thread());
- std::unique_ptr<SessionDescriptionInterface> pending_remote_description_
- RTC_GUARDED_BY(signaling_thread());
- bool dtls_enabled_ RTC_GUARDED_BY(signaling_thread()) = false;
-
- std::set<std::string> pending_ice_restarts_
- RTC_GUARDED_BY(signaling_thread());
- std::unique_ptr<WebRtcSessionDescriptionFactory> webrtc_session_desc_factory_
- RTC_GUARDED_BY(signaling_thread());
-
- cricket::AudioOptions audio_options_ RTC_GUARDED_BY(signaling_thread());
- cricket::VideoOptions video_options_ RTC_GUARDED_BY(signaling_thread());
- int usage_event_accumulator_ RTC_GUARDED_BY(signaling_thread()) = 0;
- bool return_histogram_very_quickly_ RTC_GUARDED_BY(signaling_thread()) =
- false;
-
-
-
-
- rtc::UniqueRandomIdGenerator ssrc_generator_
- RTC_GUARDED_BY(signaling_thread());
-
-
-
-
-
- std::unique_ptr<webrtc::VideoBitrateAllocatorFactory>
- video_bitrate_allocator_factory_;
- std::unique_ptr<LocalIceCredentialsToReplace>
- local_ice_credentials_to_replace_ RTC_GUARDED_BY(signaling_thread());
- bool is_negotiation_needed_ RTC_GUARDED_BY(signaling_thread()) = false;
- DataChannelController data_channel_controller_;
- rtc::WeakPtrFactory<PeerConnection> weak_ptr_factory_
- RTC_GUARDED_BY(signaling_thread());
- };
- }
- #endif
|