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

Side by Side Diff: remoting/codec/video_encoder.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 comments 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "remoting/codec/video_encoder.h"
6
7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h"
9 #include "remoting/codec/video_encoder_verbatim.h"
10 #include "remoting/codec/video_encoder_vpx.h"
11 #include "remoting/protocol/session_config.h"
12
13 namespace remoting {
14
15 std::unique_ptr<VideoEncoder> VideoEncoder::Create(
16 const protocol::SessionConfig& config) {
17 const protocol::ChannelConfig& video_config = config.video_config();
18
19 if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) {
20 return VideoEncoderVpx::CreateForVP8();
21 } else if (video_config.codec == protocol::ChannelConfig::CODEC_VP9) {
22 return VideoEncoderVpx::CreateForVP9();
23 } else if (video_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) {
24 return base::WrapUnique(new VideoEncoderVerbatim());
25 }
26
27 NOTREACHED() << "Unknown code type: " << video_config.codec;
joedow 2016/05/04 22:58:49 s/code/codec
Hzj_jie 2016/05/05 00:47:36 Done.
28 return nullptr;
29 }
30
31 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698