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

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: 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 (c) 2016 The Chromium Authors. All rights reserved.
joedow 2016/04/28 22:53:54 no copyright on new files
Hzj_jie 2016/05/03 19:07:05 Done.
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
12 namespace remoting {
13
14 std::unique_ptr<VideoEncoder> VideoEncoder::Create(
15 const protocol::SessionConfig& config) {
16 const protocol::ChannelConfig& video_config = config.video_config();
17
18 if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) {
19 return VideoEncoderVpx::CreateForVP8();
20 } else if (video_config.codec == protocol::ChannelConfig::CODEC_VP9) {
21 return VideoEncoderVpx::CreateForVP9();
22 } else if (video_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) {
23 return base::WrapUnique(new VideoEncoderVerbatim());
24 }
25
26 NOTREACHED();
27 return nullptr;
28 }
29
30 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698