| 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/base/encoder_vp8.h" | 5 #include "remoting/base/encoder_vp8.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
| 9 #include "media/base/yuv_convert.h" | 9 #include "media/base/yuv_convert.h" |
| 10 #include "remoting/base/capture_data.h" | 10 #include "remoting/base/capture_data.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 } | 286 } |
| 287 | 287 |
| 288 // Construct the VideoPacket message. | 288 // Construct the VideoPacket message. |
| 289 packet->mutable_format()->set_encoding(VideoPacketFormat::ENCODING_VP8); | 289 packet->mutable_format()->set_encoding(VideoPacketFormat::ENCODING_VP8); |
| 290 packet->set_flags(VideoPacket::FIRST_PACKET | VideoPacket::LAST_PACKET | | 290 packet->set_flags(VideoPacket::FIRST_PACKET | VideoPacket::LAST_PACKET | |
| 291 VideoPacket::LAST_PARTITION); | 291 VideoPacket::LAST_PARTITION); |
| 292 packet->mutable_format()->set_screen_width(capture_data->size().width()); | 292 packet->mutable_format()->set_screen_width(capture_data->size().width()); |
| 293 packet->mutable_format()->set_screen_height(capture_data->size().height()); | 293 packet->mutable_format()->set_screen_height(capture_data->size().height()); |
| 294 packet->set_capture_time_ms(capture_data->capture_time_ms()); | 294 packet->set_capture_time_ms(capture_data->capture_time_ms()); |
| 295 packet->set_client_sequence_number(capture_data->client_sequence_number()); | 295 packet->set_client_sequence_number(capture_data->client_sequence_number()); |
| 296 packet->set_dpi(capture_data->dpi()); |
| 296 for (SkRegion::Iterator r(updated_region); !r.done(); r.next()) { | 297 for (SkRegion::Iterator r(updated_region); !r.done(); r.next()) { |
| 297 Rect* rect = packet->add_dirty_rects(); | 298 Rect* rect = packet->add_dirty_rects(); |
| 298 rect->set_x(r.rect().x()); | 299 rect->set_x(r.rect().x()); |
| 299 rect->set_y(r.rect().y()); | 300 rect->set_y(r.rect().y()); |
| 300 rect->set_width(r.rect().width()); | 301 rect->set_width(r.rect().width()); |
| 301 rect->set_height(r.rect().height()); | 302 rect->set_height(r.rect().height()); |
| 302 } | 303 } |
| 303 | 304 |
| 304 data_available_callback.Run(packet.Pass()); | 305 data_available_callback.Run(packet.Pass()); |
| 305 } | 306 } |
| 306 | 307 |
| 307 } // namespace remoting | 308 } // namespace remoting |
| OLD | NEW |