OLD | NEW |
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/codec/video_encoder_verbatim.h" | 5 #include "remoting/codec/video_encoder_verbatim.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "remoting/base/capture_data.h" | |
9 #include "remoting/base/util.h" | 8 #include "remoting/base/util.h" |
| 9 #include "remoting/capturer/capture_data.h" |
10 #include "remoting/proto/video.pb.h" | 10 #include "remoting/proto/video.pb.h" |
11 | 11 |
12 namespace remoting { | 12 namespace remoting { |
13 | 13 |
14 static const int kPacketSize = 1024 * 1024; | 14 static const int kPacketSize = 1024 * 1024; |
15 | 15 |
16 VideoEncoderVerbatim::VideoEncoderVerbatim() | 16 VideoEncoderVerbatim::VideoEncoderVerbatim() |
17 : screen_size_(SkISize::Make(0,0)), | 17 : screen_size_(SkISize::Make(0,0)), |
18 max_packet_size_(kPacketSize) { | 18 max_packet_size_(kPacketSize) { |
19 } | 19 } |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 } | 132 } |
133 | 133 |
134 uint8* VideoEncoderVerbatim::GetOutputBuffer(VideoPacket* packet, size_t size) { | 134 uint8* VideoEncoderVerbatim::GetOutputBuffer(VideoPacket* packet, size_t size) { |
135 packet->mutable_data()->resize(size); | 135 packet->mutable_data()->resize(size); |
136 // TODO(ajwong): Is there a better way to do this at all??? | 136 // TODO(ajwong): Is there a better way to do this at all??? |
137 return const_cast<uint8*>(reinterpret_cast<const uint8*>( | 137 return const_cast<uint8*>(reinterpret_cast<const uint8*>( |
138 packet->mutable_data()->data())); | 138 packet->mutable_data()->data())); |
139 } | 139 } |
140 | 140 |
141 } // namespace remoting | 141 } // namespace remoting |
OLD | NEW |