| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "remoting/base/decoder.h" | 9 #include "remoting/base/decoder.h" |
| 10 #include "remoting/base/decoder_row_based.h" | 10 #include "remoting/base/decoder_row_based.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 config->initial_resolution().height); | 57 config->initial_resolution().height); |
| 58 | 58 |
| 59 // Initialize decoder based on the selected codec. | 59 // Initialize decoder based on the selected codec. |
| 60 ChannelConfig::Codec codec = config->video_config().codec; | 60 ChannelConfig::Codec codec = config->video_config().codec; |
| 61 if (codec == ChannelConfig::CODEC_VERBATIM) { | 61 if (codec == ChannelConfig::CODEC_VERBATIM) { |
| 62 TraceContext::tracer()->PrintString("Creating Verbatim decoder."); | 62 TraceContext::tracer()->PrintString("Creating Verbatim decoder."); |
| 63 decoder_.reset(DecoderRowBased::CreateVerbatimDecoder()); | 63 decoder_.reset(DecoderRowBased::CreateVerbatimDecoder()); |
| 64 } else if (codec == ChannelConfig::CODEC_ZIP) { | 64 } else if (codec == ChannelConfig::CODEC_ZIP) { |
| 65 TraceContext::tracer()->PrintString("Creating Zlib decoder"); | 65 TraceContext::tracer()->PrintString("Creating Zlib decoder"); |
| 66 decoder_.reset(DecoderRowBased::CreateZlibDecoder()); | 66 decoder_.reset(DecoderRowBased::CreateZlibDecoder()); |
| 67 // TODO(sergeyu): Enable VP8 on ARM builds. | |
| 68 #if !defined(ARCH_CPU_ARM_FAMILY) | |
| 69 } else if (codec == ChannelConfig::CODEC_VP8) { | 67 } else if (codec == ChannelConfig::CODEC_VP8) { |
| 70 TraceContext::tracer()->PrintString("Creating VP8 decoder"); | 68 TraceContext::tracer()->PrintString("Creating VP8 decoder"); |
| 71 decoder_.reset(new DecoderVp8()); | 69 decoder_.reset(new DecoderVp8()); |
| 72 #endif | |
| 73 } else { | 70 } else { |
| 74 NOTREACHED() << "Invalid Encoding found: " << codec; | 71 NOTREACHED() << "Invalid Encoding found: " << codec; |
| 75 } | 72 } |
| 76 } | 73 } |
| 77 | 74 |
| 78 void RectangleUpdateDecoder::DecodePacket(const VideoPacket* packet, | 75 void RectangleUpdateDecoder::DecodePacket(const VideoPacket* packet, |
| 79 Task* done) { | 76 Task* done) { |
| 80 if (message_loop_ != MessageLoop::current()) { | 77 if (message_loop_ != MessageLoop::current()) { |
| 81 message_loop_->PostTask( | 78 message_loop_->PostTask( |
| 82 FROM_HERE, | 79 FROM_HERE, |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 FROM_HERE, | 288 FROM_HERE, |
| 292 NewTracedMethod(this, &RectangleUpdateDecoder::OnFrameConsumed)); | 289 NewTracedMethod(this, &RectangleUpdateDecoder::OnFrameConsumed)); |
| 293 return; | 290 return; |
| 294 } | 291 } |
| 295 | 292 |
| 296 frame_is_consuming_ = false; | 293 frame_is_consuming_ = false; |
| 297 DoRefresh(); | 294 DoRefresh(); |
| 298 } | 295 } |
| 299 | 296 |
| 300 } // namespace remoting | 297 } // namespace remoting |
| OLD | NEW |