| 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/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 "media/base/callback.h" | 8 #include "media/base/callback.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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 break; | 261 break; |
| 262 } | 262 } |
| 263 } | 263 } |
| 264 | 264 |
| 265 message->mutable_format()->set_encoding(VideoPacketFormat::ENCODING_VP8); | 265 message->mutable_format()->set_encoding(VideoPacketFormat::ENCODING_VP8); |
| 266 message->set_flags(VideoPacket::FIRST_PACKET | VideoPacket::LAST_PACKET | | 266 message->set_flags(VideoPacket::FIRST_PACKET | VideoPacket::LAST_PACKET | |
| 267 VideoPacket::LAST_PARTITION); | 267 VideoPacket::LAST_PARTITION); |
| 268 message->mutable_format()->set_screen_width(capture_data->size().width()); | 268 message->mutable_format()->set_screen_width(capture_data->size().width()); |
| 269 message->mutable_format()->set_screen_height(capture_data->size().height()); | 269 message->mutable_format()->set_screen_height(capture_data->size().height()); |
| 270 message->set_capture_time_ms(capture_data->capture_time_ms()); | 270 message->set_capture_time_ms(capture_data->capture_time_ms()); |
| 271 message->set_client_sequence_number(capture_data->client_sequence_number()); |
| 271 for (size_t i = 0; i < updated_rects.size(); ++i) { | 272 for (size_t i = 0; i < updated_rects.size(); ++i) { |
| 272 Rect* rect = message->add_dirty_rects(); | 273 Rect* rect = message->add_dirty_rects(); |
| 273 rect->set_x(updated_rects[i].x()); | 274 rect->set_x(updated_rects[i].x()); |
| 274 rect->set_y(updated_rects[i].y()); | 275 rect->set_y(updated_rects[i].y()); |
| 275 rect->set_width(updated_rects[i].width()); | 276 rect->set_width(updated_rects[i].width()); |
| 276 rect->set_height(updated_rects[i].height()); | 277 rect->set_height(updated_rects[i].height()); |
| 277 } | 278 } |
| 278 | 279 |
| 279 data_available_callback->Run(message); | 280 data_available_callback->Run(message); |
| 280 delete data_available_callback; | 281 delete data_available_callback; |
| 281 } | 282 } |
| 282 | 283 |
| 283 } // namespace remoting | 284 } // namespace remoting |
| OLD | NEW |