Index: remoting/protocol/ice_connection_to_client.cc |
diff --git a/remoting/protocol/ice_connection_to_client.cc b/remoting/protocol/ice_connection_to_client.cc |
index 45af7f5301ada8d277b9b69ebc57dd4717dfaa28..268eb9655736f2b480fbb6d9cdc6134e29463335 100644 |
--- a/remoting/protocol/ice_connection_to_client.cc |
+++ b/remoting/protocol/ice_connection_to_client.cc |
@@ -11,8 +11,6 @@ |
#include "base/memory/ptr_util.h" |
#include "net/base/io_buffer.h" |
#include "remoting/codec/video_encoder.h" |
-#include "remoting/codec/video_encoder_verbatim.h" |
-#include "remoting/codec/video_encoder_vpx.h" |
#include "remoting/protocol/audio_writer.h" |
#include "remoting/protocol/clipboard_stub.h" |
#include "remoting/protocol/host_control_dispatcher.h" |
@@ -26,26 +24,6 @@ |
namespace remoting { |
namespace protocol { |
-namespace { |
- |
-std::unique_ptr<VideoEncoder> CreateVideoEncoder( |
- const protocol::SessionConfig& config) { |
- const protocol::ChannelConfig& video_config = config.video_config(); |
- |
- if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) { |
- return VideoEncoderVpx::CreateForVP8(); |
- } else if (video_config.codec == protocol::ChannelConfig::CODEC_VP9) { |
- return VideoEncoderVpx::CreateForVP9(); |
- } else if (video_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) { |
- return base::WrapUnique(new VideoEncoderVerbatim()); |
- } |
- |
- NOTREACHED(); |
- return nullptr; |
-} |
- |
-} // namespace |
- |
IceConnectionToClient::IceConnectionToClient( |
std::unique_ptr<protocol::Session> session, |
scoped_refptr<TransportContext> transport_context, |
@@ -92,7 +70,7 @@ std::unique_ptr<VideoStream> IceConnectionToClient::StartVideoStream( |
DCHECK(thread_checker_.CalledOnValidThread()); |
std::unique_ptr<VideoEncoder> video_encoder = |
- CreateVideoEncoder(session_->config()); |
+ VideoEncoder::Create(session_->config()); |
std::unique_ptr<VideoFramePump> pump( |
new VideoFramePump(video_encode_task_runner_, std::move(desktop_capturer), |