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

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

Issue 11195029: Remove ZLib codec support from chromoting host and client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « remoting/base/decompressor_zlib_unittest.cc ('k') | remoting/codec/video_decoder_row_based.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/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "ppapi/cpp/image_data.h" 13 #include "ppapi/cpp/image_data.h"
14 #include "remoting/base/util.h" 14 #include "remoting/base/util.h"
15 #include "remoting/codec/video_decoder.h" 15 #include "remoting/codec/video_decoder.h"
16 #include "remoting/codec/video_decoder_row_based.h" 16 #include "remoting/codec/video_decoder_verbatim.h"
17 #include "remoting/codec/video_decoder_vp8.h" 17 #include "remoting/codec/video_decoder_vp8.h"
18 #include "remoting/client/frame_consumer.h" 18 #include "remoting/client/frame_consumer.h"
19 #include "remoting/protocol/session_config.h" 19 #include "remoting/protocol/session_config.h"
20 20
21 using base::Passed; 21 using base::Passed;
22 using remoting::protocol::ChannelConfig; 22 using remoting::protocol::ChannelConfig;
23 using remoting::protocol::SessionConfig; 23 using remoting::protocol::SessionConfig;
24 24
25 namespace remoting { 25 namespace remoting {
26 26
(...skipping 12 matching lines...) Expand all
39 latest_sequence_number_(0) { 39 latest_sequence_number_(0) {
40 } 40 }
41 41
42 RectangleUpdateDecoder::~RectangleUpdateDecoder() { 42 RectangleUpdateDecoder::~RectangleUpdateDecoder() {
43 } 43 }
44 44
45 void RectangleUpdateDecoder::Initialize(const SessionConfig& config) { 45 void RectangleUpdateDecoder::Initialize(const SessionConfig& config) {
46 // Initialize decoder based on the selected codec. 46 // Initialize decoder based on the selected codec.
47 ChannelConfig::Codec codec = config.video_config().codec; 47 ChannelConfig::Codec codec = config.video_config().codec;
48 if (codec == ChannelConfig::CODEC_VERBATIM) { 48 if (codec == ChannelConfig::CODEC_VERBATIM) {
49 decoder_.reset(VideoDecoderRowBased::CreateVerbatimDecoder()); 49 decoder_.reset(new VideoDecoderVerbatim());
50 } else if (codec == ChannelConfig::CODEC_ZIP) {
51 decoder_.reset(VideoDecoderRowBased::CreateZlibDecoder());
52 } else if (codec == ChannelConfig::CODEC_VP8) { 50 } else if (codec == ChannelConfig::CODEC_VP8) {
53 decoder_.reset(new VideoDecoderVp8()); 51 decoder_.reset(new VideoDecoderVp8());
54 } else { 52 } else {
55 NOTREACHED() << "Invalid Encoding found: " << codec; 53 NOTREACHED() << "Invalid Encoding found: " << codec;
56 } 54 }
57 } 55 }
58 56
59 void RectangleUpdateDecoder::DecodePacket(scoped_ptr<VideoPacket> packet, 57 void RectangleUpdateDecoder::DecodePacket(scoped_ptr<VideoPacket> packet,
60 const base::Closure& done) { 58 const base::Closure& done) {
61 DCHECK(decode_task_runner_->BelongsToCurrentThread()); 59 DCHECK(decode_task_runner_->BelongsToCurrentThread());
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 285
288 done.Run(); 286 done.Run();
289 } 287 }
290 288
291 ChromotingStats* RectangleUpdateDecoder::GetStats() { 289 ChromotingStats* RectangleUpdateDecoder::GetStats() {
292 DCHECK(main_task_runner_->BelongsToCurrentThread()); 290 DCHECK(main_task_runner_->BelongsToCurrentThread());
293 return &stats_; 291 return &stats_;
294 } 292 }
295 293
296 } // namespace remoting 294 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/decompressor_zlib_unittest.cc ('k') | remoting/codec/video_decoder_row_based.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698