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

Side by Side Diff: remoting/client/rectangle_update_decoder.cc

Issue 26921005: Add VP9 decode support to the remoting client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update libvpx/webm comment. Created 7 years, 2 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 | « no previous file | remoting/codec/video_decoder_vpx.h » ('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/client/rectangle_update_decoder.h" 5 #include "remoting/client/rectangle_update_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 config)); 95 config));
96 return; 96 return;
97 } 97 }
98 98
99 // Initialize decoder based on the selected codec. 99 // Initialize decoder based on the selected codec.
100 ChannelConfig::Codec codec = config.video_config().codec; 100 ChannelConfig::Codec codec = config.video_config().codec;
101 if (codec == ChannelConfig::CODEC_VERBATIM) { 101 if (codec == ChannelConfig::CODEC_VERBATIM) {
102 decoder_.reset(new VideoDecoderVerbatim()); 102 decoder_.reset(new VideoDecoderVerbatim());
103 } else if (codec == ChannelConfig::CODEC_VP8) { 103 } else if (codec == ChannelConfig::CODEC_VP8) {
104 decoder_ = VideoDecoderVpx::CreateForVP8(); 104 decoder_ = VideoDecoderVpx::CreateForVP8();
105 } else if (codec == ChannelConfig::CODEC_VP9) {
106 decoder_ = VideoDecoderVpx::CreateForVP9();
105 } else { 107 } else {
106 NOTREACHED() << "Invalid Encoding found: " << codec; 108 NOTREACHED() << "Invalid Encoding found: " << codec;
107 } 109 }
108 110
109 if (consumer_->GetPixelFormat() == FrameConsumer::FORMAT_RGBA) { 111 if (consumer_->GetPixelFormat() == FrameConsumer::FORMAT_RGBA) {
110 scoped_ptr<VideoDecoder> wrapper( 112 scoped_ptr<VideoDecoder> wrapper(
111 new RgbToBgrVideoDecoderFilter(decoder_.Pass())); 113 new RgbToBgrVideoDecoderFilter(decoder_.Pass()));
112 decoder_ = wrapper.Pass(); 114 decoder_ = wrapper.Pass();
113 } 115 }
114 } 116 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 340
339 done.Run(); 341 done.Run();
340 } 342 }
341 343
342 ChromotingStats* RectangleUpdateDecoder::GetStats() { 344 ChromotingStats* RectangleUpdateDecoder::GetStats() {
343 DCHECK(main_task_runner_->BelongsToCurrentThread()); 345 DCHECK(main_task_runner_->BelongsToCurrentThread());
344 return &stats_; 346 return &stats_;
345 } 347 }
346 348
347 } // namespace remoting 349 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/codec/video_decoder_vpx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698