#include "remoting/protocol/ice_connection_to_client.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "net/base/io_buffer.h"
#include "remoting/codec/audio_encoder.h"
#include "remoting/codec/audio_encoder_opus.h"
#include "remoting/codec/video_encoder.h"
#include "remoting/protocol/audio_pump.h"
#include "remoting/protocol/audio_source.h"
#include "remoting/protocol/audio_writer.h"
#include "remoting/protocol/clipboard_stub.h"
#include "remoting/protocol/desktop_capturer.h"
#include "remoting/protocol/host_control_dispatcher.h"
#include "remoting/protocol/host_event_dispatcher.h"
#include "remoting/protocol/host_stub.h"
#include "remoting/protocol/host_video_dispatcher.h"
#include "remoting/protocol/input_stub.h"
#include "remoting/protocol/transport_context.h"
#include "remoting/protocol/video_frame_pump.h"
namespace remoting::protocol {
namespace {
std::unique_ptr<AudioEncoder> CreateAudioEncoder(
const protocol::SessionConfig& config) { … }
}
IceConnectionToClient::IceConnectionToClient(
std::unique_ptr<protocol::Session> session,
scoped_refptr<TransportContext> transport_context,
scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner)
: … { … }
IceConnectionToClient::~IceConnectionToClient() { … }
void IceConnectionToClient::SetEventHandler(
ConnectionToClient::EventHandler* event_handler) { … }
protocol::Session* IceConnectionToClient::session() { … }
void IceConnectionToClient::Disconnect(ErrorCode error) { … }
std::unique_ptr<VideoStream> IceConnectionToClient::StartVideoStream(
webrtc::ScreenId screen_id,
std::unique_ptr<DesktopCapturer> desktop_capturer) { … }
std::unique_ptr<AudioStream> IceConnectionToClient::StartAudioStream(
std::unique_ptr<AudioSource> audio_source) { … }
void IceConnectionToClient::ApplyNetworkSettings(
const NetworkSettings& settings) { … }
ClientStub* IceConnectionToClient::client_stub() { … }
void IceConnectionToClient::set_clipboard_stub(
protocol::ClipboardStub* clipboard_stub) { … }
void IceConnectionToClient::set_host_stub(protocol::HostStub* host_stub) { … }
void IceConnectionToClient::set_input_stub(protocol::InputStub* input_stub) { … }
PeerConnectionControls* IceConnectionToClient::peer_connection_controls() { … }
WebrtcEventLogData* IceConnectionToClient::rtc_event_log() { … }
void IceConnectionToClient::OnSessionStateChange(Session::State state) { … }
void IceConnectionToClient::OnIceTransportRouteChange(
const std::string& channel_name,
const TransportRoute& route) { … }
void IceConnectionToClient::OnIceTransportError(ErrorCode error) { … }
void IceConnectionToClient::OnChannelInitialized(
ChannelDispatcherBase* channel_dispatcher) { … }
void IceConnectionToClient::OnChannelClosed(
ChannelDispatcherBase* channel_dispatcher) { … }
void IceConnectionToClient::NotifyIfChannelsReady() { … }
void IceConnectionToClient::CloseChannels() { … }
}