OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/base/encoder_row_based.h" | 5 #include "remoting/base/encoder_row_based.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "gfx/rect.h" | |
9 #include "remoting/base/capture_data.h" | 8 #include "remoting/base/capture_data.h" |
10 #include "remoting/base/compressor_verbatim.h" | 9 #include "remoting/base/compressor_verbatim.h" |
11 #include "remoting/base/compressor_zlib.h" | 10 #include "remoting/base/compressor_zlib.h" |
12 #include "remoting/base/util.h" | 11 #include "remoting/base/util.h" |
13 #include "remoting/proto/video.pb.h" | 12 #include "remoting/proto/video.pb.h" |
| 13 #include "ui/gfx/rect.h" |
14 | 14 |
15 namespace remoting { | 15 namespace remoting { |
16 | 16 |
17 static const int kPacketSize = 1024 * 1024; | 17 static const int kPacketSize = 1024 * 1024; |
18 | 18 |
19 EncoderRowBased* EncoderRowBased::CreateZlibEncoder() { | 19 EncoderRowBased* EncoderRowBased::CreateZlibEncoder() { |
20 return new EncoderRowBased(new CompressorZlib(), | 20 return new EncoderRowBased(new CompressorZlib(), |
21 VideoPacketFormat::ENCODING_ZLIB); | 21 VideoPacketFormat::ENCODING_ZLIB); |
22 } | 22 } |
23 | 23 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 uint8* EncoderRowBased::GetOutputBuffer(VideoPacket* packet, size_t size) { | 152 uint8* EncoderRowBased::GetOutputBuffer(VideoPacket* packet, size_t size) { |
153 packet->mutable_data()->resize(size); | 153 packet->mutable_data()->resize(size); |
154 // TODO(ajwong): Is there a better way to do this at all??? | 154 // TODO(ajwong): Is there a better way to do this at all??? |
155 return const_cast<uint8*>(reinterpret_cast<const uint8*>( | 155 return const_cast<uint8*>(reinterpret_cast<const uint8*>( |
156 packet->mutable_data()->data())); | 156 packet->mutable_data()->data())); |
157 } | 157 } |
158 | 158 |
159 | 159 |
160 } // namespace remoting | 160 } // namespace remoting |
OLD | NEW |