webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Conductor Class Reference

#include <conductor.h>

Inheritance diagram for Conductor:
MainWndCallback PeerConnectionClientObserver webrtc::CreateSessionDescriptionObserver webrtc::PeerConnectionObserver MainWndCallback PeerConnectionClientObserver webrtc::CreateSessionDescriptionObserver webrtc::PeerConnectionObserver

Public Types

enum  CallbackID {
  MEDIA_CHANNELS_INITIALIZED = 1, PEER_CONNECTION_CLOSED, SEND_MESSAGE_TO_PEER, NEW_STREAM_ADDED,
  STREAM_REMOVED, MEDIA_CHANNELS_INITIALIZED = 1, PEER_CONNECTION_CLOSED, SEND_MESSAGE_TO_PEER,
  NEW_STREAM_ADDED, STREAM_REMOVED
}
 
enum  CallbackID {
  MEDIA_CHANNELS_INITIALIZED = 1, PEER_CONNECTION_CLOSED, SEND_MESSAGE_TO_PEER, NEW_STREAM_ADDED,
  STREAM_REMOVED, MEDIA_CHANNELS_INITIALIZED = 1, PEER_CONNECTION_CLOSED, SEND_MESSAGE_TO_PEER,
  NEW_STREAM_ADDED, STREAM_REMOVED
}
 
- Public Types inherited from webrtc::PeerConnectionObserver
enum  StateType { kSignalingState, kIceState, kSignalingState, kIceState }
 
enum  StateType { kSignalingState, kIceState, kSignalingState, kIceState }
 

Public Member Functions

 Conductor (PeerConnectionClient *client, MainWindow *main_wnd)
 
bool connection_active () const
 
virtual void Close ()
 
 Conductor (PeerConnectionClient *client, MainWindow *main_wnd)
 
bool connection_active () const
 
virtual void Close ()
 
- Public Member Functions inherited from webrtc::PeerConnectionObserver
virtual void OnAddStream (MediaStreamInterface *)
 
virtual void OnRemoveStream (MediaStreamInterface *)
 
virtual void OnDataChannel (DataChannelInterface *)
 
virtual void OnIceCandidatesRemoved (const std::vector< cricket::Candidate > &)
 
virtual void OnAddTrack (rtc::scoped_refptr< RtpReceiverInterface >, const std::vector< rtc::scoped_refptr< MediaStreamInterface >> &)
 
virtual void OnAddStream (MediaStreamInterface *)
 
virtual void OnRemoveStream (MediaStreamInterface *)
 
virtual void OnDataChannel (DataChannelInterface *)
 
virtual void OnIceCandidatesRemoved (const std::vector< cricket::Candidate > &)
 
virtual void OnAddTrack (rtc::scoped_refptr< RtpReceiverInterface >, const std::vector< rtc::scoped_refptr< MediaStreamInterface >> &)
 
- Public Member Functions inherited from rtc::RefCountInterface
virtual int AddRef () const =0
 
virtual int Release () const =0
 
virtual int AddRef () const =0
 
virtual int Release () const =0
 

Protected Member Functions

 ~Conductor ()
 
bool InitializePeerConnection ()
 
bool ReinitializePeerConnectionForLoopback ()
 
bool CreatePeerConnection (bool dtls)
 
void DeletePeerConnection ()
 
void EnsureStreamingUI ()
 
void AddStreams ()
 
std::unique_ptr< cricket::VideoCapturerOpenVideoCaptureDevice ()
 
void OnSignalingChange (webrtc::PeerConnectionInterface::SignalingState new_state) override
 
void OnAddStream (rtc::scoped_refptr< webrtc::MediaStreamInterface > stream) override
 
void OnRemoveStream (rtc::scoped_refptr< webrtc::MediaStreamInterface > stream) override
 
void OnDataChannel (rtc::scoped_refptr< webrtc::DataChannelInterface > channel) override
 
void OnRenegotiationNeeded () override
 
void OnIceConnectionChange (webrtc::PeerConnectionInterface::IceConnectionState new_state) override
 
void OnIceGatheringChange (webrtc::PeerConnectionInterface::IceGatheringState new_state) override
 
void OnIceCandidate (const webrtc::IceCandidateInterface *candidate) override
 
void OnIceConnectionReceivingChange (bool receiving) override
 
void OnSignedIn () override
 
void OnDisconnected () override
 
void OnPeerConnected (int id, const std::string &name) override
 
void OnPeerDisconnected (int id) override
 
void OnMessageFromPeer (int peer_id, const std::string &message) override
 
void OnMessageSent (int err) override
 
void OnServerConnectionFailure () override
 
void StartLogin (const std::string &server, int port) override
 
void DisconnectFromServer () override
 
void ConnectToPeer (int peer_id) override
 
void DisconnectFromCurrentPeer () override
 
void UIThreadCallback (int msg_id, void *data) override
 
void OnSuccess (webrtc::SessionDescriptionInterface *desc) override
 
void OnFailure (const std::string &error) override
 
void SendMessage (const std::string &json_object)
 
 ~Conductor ()
 
bool InitializePeerConnection ()
 
bool ReinitializePeerConnectionForLoopback ()
 
bool CreatePeerConnection (bool dtls)
 
void DeletePeerConnection ()
 
void EnsureStreamingUI ()
 
void AddStreams ()
 
std::unique_ptr< cricket::VideoCapturerOpenVideoCaptureDevice ()
 
void OnSignalingChange (webrtc::PeerConnectionInterface::SignalingState new_state) override
 
void OnAddStream (rtc::scoped_refptr< webrtc::MediaStreamInterface > stream) override
 
void OnRemoveStream (rtc::scoped_refptr< webrtc::MediaStreamInterface > stream) override
 
void OnDataChannel (rtc::scoped_refptr< webrtc::DataChannelInterface > channel) override
 
void OnRenegotiationNeeded () override
 
void OnIceConnectionChange (webrtc::PeerConnectionInterface::IceConnectionState new_state) override
 
void OnIceGatheringChange (webrtc::PeerConnectionInterface::IceGatheringState new_state) override
 
void OnIceCandidate (const webrtc::IceCandidateInterface *candidate) override
 
void OnIceConnectionReceivingChange (bool receiving) override
 
void OnSignedIn () override
 
void OnDisconnected () override
 
void OnPeerConnected (int id, const std::string &name) override
 
void OnPeerDisconnected (int id) override
 
void OnMessageFromPeer (int peer_id, const std::string &message) override
 
void OnMessageSent (int err) override
 
void OnServerConnectionFailure () override
 
void StartLogin (const std::string &server, int port) override
 
void DisconnectFromServer () override
 
void ConnectToPeer (int peer_id) override
 
void DisconnectFromCurrentPeer () override
 
void UIThreadCallback (int msg_id, void *data) override
 
void OnSuccess (webrtc::SessionDescriptionInterface *desc) override
 
void OnFailure (const std::string &error) override
 
void SendMessage (const std::string &json_object)
 
- Protected Member Functions inherited from webrtc::PeerConnectionObserver
 ~PeerConnectionObserver ()
 
 ~PeerConnectionObserver ()
 
- Protected Member Functions inherited from webrtc::CreateSessionDescriptionObserver
 ~CreateSessionDescriptionObserver ()
 
 ~CreateSessionDescriptionObserver ()
 
- Protected Member Functions inherited from rtc::RefCountInterface
virtual ~RefCountInterface ()
 
virtual ~RefCountInterface ()
 
- Protected Member Functions inherited from PeerConnectionClientObserver
virtual ~PeerConnectionClientObserver ()
 
virtual ~PeerConnectionClientObserver ()
 
- Protected Member Functions inherited from MainWndCallback
virtual ~MainWndCallback ()
 
virtual ~MainWndCallback ()
 

Protected Attributes

int peer_id_
 
bool loopback_
 
rtc::scoped_refptr< webrtc::PeerConnectionInterfacepeer_connection_
 
rtc::scoped_refptr< webrtc::PeerConnectionFactoryInterfacepeer_connection_factory_
 
PeerConnectionClientclient_
 
MainWindowmain_wnd_
 
std::deque< std::string * > pending_messages_
 
std::map< std::string, rtc::scoped_refptr< webrtc::MediaStreamInterface > > active_streams_
 
std::string server_
 

Member Enumeration Documentation

◆ CallbackID [1/2]

Enumerator
MEDIA_CHANNELS_INITIALIZED 
PEER_CONNECTION_CLOSED 
SEND_MESSAGE_TO_PEER 
NEW_STREAM_ADDED 
STREAM_REMOVED 
MEDIA_CHANNELS_INITIALIZED 
PEER_CONNECTION_CLOSED 
SEND_MESSAGE_TO_PEER 
NEW_STREAM_ADDED 
STREAM_REMOVED 

◆ CallbackID [2/2]

Enumerator
MEDIA_CHANNELS_INITIALIZED 
PEER_CONNECTION_CLOSED 
SEND_MESSAGE_TO_PEER 
NEW_STREAM_ADDED 
STREAM_REMOVED 
MEDIA_CHANNELS_INITIALIZED 
PEER_CONNECTION_CLOSED 
SEND_MESSAGE_TO_PEER 
NEW_STREAM_ADDED 
STREAM_REMOVED 

Constructor & Destructor Documentation

◆ Conductor() [1/2]

Conductor::Conductor ( PeerConnectionClient client,
MainWindow main_wnd 
)

◆ ~Conductor() [1/2]

Conductor::~Conductor ( )
protected

◆ Conductor() [2/2]

Conductor::Conductor ( PeerConnectionClient client,
MainWindow main_wnd 
)

◆ ~Conductor() [2/2]

Conductor::~Conductor ( )
protected

Member Function Documentation

◆ AddStreams() [1/2]

void Conductor::AddStreams ( )
protected

◆ AddStreams() [2/2]

void Conductor::AddStreams ( )
protected

◆ Close() [1/2]

virtual void Conductor::Close ( )
virtual

Implements MainWndCallback.

◆ Close() [2/2]

void Conductor::Close ( )
virtual

Implements MainWndCallback.

◆ connection_active() [1/2]

bool Conductor::connection_active ( ) const

◆ connection_active() [2/2]

bool Conductor::connection_active ( ) const

◆ ConnectToPeer() [1/2]

void Conductor::ConnectToPeer ( int  peer_id)
overrideprotectedvirtual

Implements MainWndCallback.

◆ ConnectToPeer() [2/2]

void Conductor::ConnectToPeer ( int  peer_id)
overrideprotectedvirtual

Implements MainWndCallback.

◆ CreatePeerConnection() [1/2]

bool Conductor::CreatePeerConnection ( bool  dtls)
protected

◆ CreatePeerConnection() [2/2]

bool Conductor::CreatePeerConnection ( bool  dtls)
protected

◆ DeletePeerConnection() [1/2]

void Conductor::DeletePeerConnection ( )
protected

◆ DeletePeerConnection() [2/2]

void Conductor::DeletePeerConnection ( )
protected

◆ DisconnectFromCurrentPeer() [1/2]

void Conductor::DisconnectFromCurrentPeer ( )
overrideprotectedvirtual

Implements MainWndCallback.

◆ DisconnectFromCurrentPeer() [2/2]

void Conductor::DisconnectFromCurrentPeer ( )
overrideprotectedvirtual

Implements MainWndCallback.

◆ DisconnectFromServer() [1/2]

void Conductor::DisconnectFromServer ( )
overrideprotectedvirtual

Implements MainWndCallback.

◆ DisconnectFromServer() [2/2]

void Conductor::DisconnectFromServer ( )
overrideprotectedvirtual

Implements MainWndCallback.

◆ EnsureStreamingUI() [1/2]

void Conductor::EnsureStreamingUI ( )
protected

◆ EnsureStreamingUI() [2/2]

void Conductor::EnsureStreamingUI ( )
protected

◆ InitializePeerConnection() [1/2]

bool Conductor::InitializePeerConnection ( )
protected

◆ InitializePeerConnection() [2/2]

bool Conductor::InitializePeerConnection ( )
protected

◆ OnAddStream() [1/2]

void Conductor::OnAddStream ( rtc::scoped_refptr< webrtc::MediaStreamInterface stream)
overrideprotectedvirtual

Reimplemented from webrtc::PeerConnectionObserver.

◆ OnAddStream() [2/2]

void Conductor::OnAddStream ( rtc::scoped_refptr< webrtc::MediaStreamInterface stream)
overrideprotectedvirtual

Reimplemented from webrtc::PeerConnectionObserver.

◆ OnDataChannel() [1/2]

void Conductor::OnDataChannel ( rtc::scoped_refptr< webrtc::DataChannelInterface channel)
inlineoverrideprotectedvirtual

Reimplemented from webrtc::PeerConnectionObserver.

◆ OnDataChannel() [2/2]

void Conductor::OnDataChannel ( rtc::scoped_refptr< webrtc::DataChannelInterface channel)
inlineoverrideprotectedvirtual

Reimplemented from webrtc::PeerConnectionObserver.

◆ OnDisconnected() [1/2]

void Conductor::OnDisconnected ( )
overrideprotectedvirtual

◆ OnDisconnected() [2/2]

void Conductor::OnDisconnected ( )
overrideprotectedvirtual

◆ OnFailure() [1/2]

void Conductor::OnFailure ( const std::string error)
overrideprotectedvirtual

◆ OnFailure() [2/2]

void Conductor::OnFailure ( const std::string error)
overrideprotectedvirtual

◆ OnIceCandidate() [1/2]

void Conductor::OnIceCandidate ( const webrtc::IceCandidateInterface candidate)
overrideprotectedvirtual

◆ OnIceCandidate() [2/2]

void Conductor::OnIceCandidate ( const webrtc::IceCandidateInterface candidate)
overrideprotectedvirtual

◆ OnIceConnectionChange() [1/2]

void Conductor::OnIceConnectionChange ( webrtc::PeerConnectionInterface::IceConnectionState  new_state)
inlineoverrideprotectedvirtual

◆ OnIceConnectionChange() [2/2]

void Conductor::OnIceConnectionChange ( webrtc::PeerConnectionInterface::IceConnectionState  new_state)
inlineoverrideprotectedvirtual

◆ OnIceConnectionReceivingChange() [1/2]

void Conductor::OnIceConnectionReceivingChange ( bool  receiving)
inlineoverrideprotectedvirtual

Reimplemented from webrtc::PeerConnectionObserver.

◆ OnIceConnectionReceivingChange() [2/2]

void Conductor::OnIceConnectionReceivingChange ( bool  receiving)
inlineoverrideprotectedvirtual

Reimplemented from webrtc::PeerConnectionObserver.

◆ OnIceGatheringChange() [1/2]

void Conductor::OnIceGatheringChange ( webrtc::PeerConnectionInterface::IceGatheringState  new_state)
inlineoverrideprotectedvirtual

◆ OnIceGatheringChange() [2/2]

void Conductor::OnIceGatheringChange ( webrtc::PeerConnectionInterface::IceGatheringState  new_state)
inlineoverrideprotectedvirtual

◆ OnMessageFromPeer() [1/2]

void Conductor::OnMessageFromPeer ( int  peer_id,
const std::string message 
)
overrideprotectedvirtual

◆ OnMessageFromPeer() [2/2]

void Conductor::OnMessageFromPeer ( int  peer_id,
const std::string message 
)
overrideprotectedvirtual

◆ OnMessageSent() [1/2]

void Conductor::OnMessageSent ( int  err)
overrideprotectedvirtual

◆ OnMessageSent() [2/2]

void Conductor::OnMessageSent ( int  err)
overrideprotectedvirtual

◆ OnPeerConnected() [1/2]

void Conductor::OnPeerConnected ( int  id,
const std::string name 
)
overrideprotectedvirtual

◆ OnPeerConnected() [2/2]

void Conductor::OnPeerConnected ( int  id,
const std::string name 
)
overrideprotectedvirtual

◆ OnPeerDisconnected() [1/2]

void Conductor::OnPeerDisconnected ( int  id)
overrideprotectedvirtual

◆ OnPeerDisconnected() [2/2]

void Conductor::OnPeerDisconnected ( int  id)
overrideprotectedvirtual

◆ OnRemoveStream() [1/2]

void Conductor::OnRemoveStream ( rtc::scoped_refptr< webrtc::MediaStreamInterface stream)
overrideprotectedvirtual

Reimplemented from webrtc::PeerConnectionObserver.

◆ OnRemoveStream() [2/2]

void Conductor::OnRemoveStream ( rtc::scoped_refptr< webrtc::MediaStreamInterface stream)
overrideprotectedvirtual

Reimplemented from webrtc::PeerConnectionObserver.

◆ OnRenegotiationNeeded() [1/2]

void Conductor::OnRenegotiationNeeded ( )
inlineoverrideprotectedvirtual

◆ OnRenegotiationNeeded() [2/2]

void Conductor::OnRenegotiationNeeded ( )
inlineoverrideprotectedvirtual

◆ OnServerConnectionFailure() [1/2]

void Conductor::OnServerConnectionFailure ( )
overrideprotectedvirtual

◆ OnServerConnectionFailure() [2/2]

void Conductor::OnServerConnectionFailure ( )
overrideprotectedvirtual

◆ OnSignalingChange() [1/2]

void Conductor::OnSignalingChange ( webrtc::PeerConnectionInterface::SignalingState  new_state)
inlineoverrideprotectedvirtual

◆ OnSignalingChange() [2/2]

void Conductor::OnSignalingChange ( webrtc::PeerConnectionInterface::SignalingState  new_state)
inlineoverrideprotectedvirtual

◆ OnSignedIn() [1/2]

void Conductor::OnSignedIn ( )
overrideprotectedvirtual

◆ OnSignedIn() [2/2]

void Conductor::OnSignedIn ( )
overrideprotectedvirtual

◆ OnSuccess() [1/2]

void Conductor::OnSuccess ( webrtc::SessionDescriptionInterface desc)
overrideprotectedvirtual

◆ OnSuccess() [2/2]

void Conductor::OnSuccess ( webrtc::SessionDescriptionInterface desc)
overrideprotectedvirtual

◆ OpenVideoCaptureDevice() [1/2]

std::unique_ptr< cricket::VideoCapturer > Conductor::OpenVideoCaptureDevice ( )
protected

◆ OpenVideoCaptureDevice() [2/2]

std::unique_ptr<cricket::VideoCapturer> Conductor::OpenVideoCaptureDevice ( )
protected

◆ ReinitializePeerConnectionForLoopback() [1/2]

bool Conductor::ReinitializePeerConnectionForLoopback ( )
protected

◆ ReinitializePeerConnectionForLoopback() [2/2]

bool Conductor::ReinitializePeerConnectionForLoopback ( )
protected

◆ SendMessage() [1/2]

void Conductor::SendMessage ( const std::string json_object)
protected

◆ SendMessage() [2/2]

void Conductor::SendMessage ( const std::string json_object)
protected

◆ StartLogin() [1/2]

void Conductor::StartLogin ( const std::string server,
int  port 
)
overrideprotectedvirtual

Implements MainWndCallback.

◆ StartLogin() [2/2]

void Conductor::StartLogin ( const std::string server,
int  port 
)
overrideprotectedvirtual

Implements MainWndCallback.

◆ UIThreadCallback() [1/2]

void Conductor::UIThreadCallback ( int  msg_id,
void data 
)
overrideprotectedvirtual

Implements MainWndCallback.

◆ UIThreadCallback() [2/2]

void Conductor::UIThreadCallback ( int  msg_id,
void data 
)
overrideprotectedvirtual

Implements MainWndCallback.

Member Data Documentation

◆ active_streams_

std::map< std::string, rtc::scoped_refptr< webrtc::MediaStreamInterface > > Conductor::active_streams_
protected

◆ client_

PeerConnectionClient * Conductor::client_
protected

◆ loopback_

bool Conductor::loopback_
protected

◆ main_wnd_

MainWindow * Conductor::main_wnd_
protected

◆ peer_connection_

rtc::scoped_refptr< webrtc::PeerConnectionInterface > Conductor::peer_connection_
protected

◆ peer_connection_factory_

rtc::scoped_refptr< webrtc::PeerConnectionFactoryInterface > Conductor::peer_connection_factory_
protected

◆ peer_id_

int Conductor::peer_id_
protected

◆ pending_messages_

std::deque< std::string * > Conductor::pending_messages_
protected

◆ server_

std::string Conductor::server_
protected

The documentation for this class was generated from the following files: