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

Side by Side Diff: remoting/host/client_session.cc

Issue 261753013: Implement VP9/I444 encode support in the Chromoting host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CreateVP9Codec bug and unit-test build. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « remoting/codec/video_encoder_vpx.cc ('k') | remoting/remoting_test.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/client_session.h" 5 #include "remoting/host/client_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "remoting/base/capabilities.h" 10 #include "remoting/base/capabilities.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 // TODO(sergeyu): Move this to SessionManager? 444 // TODO(sergeyu): Move this to SessionManager?
445 // static 445 // static
446 scoped_ptr<VideoEncoder> ClientSession::CreateVideoEncoder( 446 scoped_ptr<VideoEncoder> ClientSession::CreateVideoEncoder(
447 const protocol::SessionConfig& config) { 447 const protocol::SessionConfig& config) {
448 const protocol::ChannelConfig& video_config = config.video_config(); 448 const protocol::ChannelConfig& video_config = config.video_config();
449 449
450 if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) { 450 if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) {
451 return remoting::VideoEncoderVpx::CreateForVP8().PassAs<VideoEncoder>(); 451 return remoting::VideoEncoderVpx::CreateForVP8().PassAs<VideoEncoder>();
452 } else if (video_config.codec == protocol::ChannelConfig::CODEC_VP9) { 452 } else if (video_config.codec == protocol::ChannelConfig::CODEC_VP9) {
453 return remoting::VideoEncoderVpx::CreateForVP9().PassAs<VideoEncoder>(); 453 return remoting::VideoEncoderVpx::CreateForVP9I420().PassAs<VideoEncoder>();
454 } 454 }
455 455
456 NOTREACHED(); 456 NOTREACHED();
457 return scoped_ptr<VideoEncoder>(); 457 return scoped_ptr<VideoEncoder>();
458 } 458 }
459 459
460 // static 460 // static
461 scoped_ptr<AudioEncoder> ClientSession::CreateAudioEncoder( 461 scoped_ptr<AudioEncoder> ClientSession::CreateAudioEncoder(
462 const protocol::SessionConfig& config) { 462 const protocol::SessionConfig& config) {
463 const protocol::ChannelConfig& audio_config = config.audio_config(); 463 const protocol::ChannelConfig& audio_config = config.audio_config();
464 464
465 if (audio_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) { 465 if (audio_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) {
466 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim()); 466 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim());
467 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { 467 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) {
468 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); 468 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus());
469 } 469 }
470 470
471 NOTREACHED(); 471 NOTREACHED();
472 return scoped_ptr<AudioEncoder>(); 472 return scoped_ptr<AudioEncoder>();
473 } 473 }
474 474
475 } // namespace remoting 475 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/codec/video_encoder_vpx.cc ('k') | remoting/remoting_test.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698