Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1285)

Unified Diff: remoting/protocol/ice_connection_to_client.cc

Issue 1923573006: Implement a dummy host to do capturing and analysis only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve review commnets Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/fake_connection_to_client.cc ('k') | remoting/protocol/session_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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),
« no previous file with comments | « remoting/protocol/fake_connection_to_client.cc ('k') | remoting/protocol/session_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698