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/host/session_manager.h" | 5 #include "remoting/host/session_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 | 355 |
356 void SessionManager::ScheduleNextRateControl() { | 356 void SessionManager::ScheduleNextRateControl() { |
357 network_loop_->PostDelayedTask( | 357 network_loop_->PostDelayedTask( |
358 FROM_HERE, | 358 FROM_HERE, |
359 NewRunnableMethod(this, &SessionManager::DoRateControl), | 359 NewRunnableMethod(this, &SessionManager::DoRateControl), |
360 kRateControlInterval.InMilliseconds()); | 360 kRateControlInterval.InMilliseconds()); |
361 } | 361 } |
362 | 362 |
363 void SessionManager::CaptureDoneCallback( | 363 void SessionManager::CaptureDoneCallback( |
364 scoped_refptr<Capturer::CaptureData> capture_data) { | 364 scoped_refptr<Capturer::CaptureData> capture_data) { |
| 365 // TODO(hclam): There is a bug if the capturer doesn't produce any dirty rects
. |
365 DCHECK_EQ(capture_loop_, MessageLoop::current()); | 366 DCHECK_EQ(capture_loop_, MessageLoop::current()); |
366 encode_loop_->PostTask( | 367 encode_loop_->PostTask( |
367 FROM_HERE, | 368 FROM_HERE, |
368 NewRunnableMethod(this, &SessionManager::DoEncode, capture_data)); | 369 NewRunnableMethod(this, &SessionManager::DoEncode, capture_data)); |
369 } | 370 } |
370 | 371 |
371 void SessionManager::EncodeDataAvailableTask( | 372 void SessionManager::EncodeDataAvailableTask( |
372 const UpdateStreamPacketHeader *header, | 373 const UpdateStreamPacketHeader *header, |
373 const scoped_refptr<media::DataBuffer>& data, | 374 const scoped_refptr<media::DataBuffer>& data, |
374 Encoder::EncodingState state) { | 375 Encoder::EncodingState state) { |
(...skipping 21 matching lines...) Expand all Loading... |
396 DCHECK_EQ(capture_loop_, MessageLoop::current()); | 397 DCHECK_EQ(capture_loop_, MessageLoop::current()); |
397 return capturer_.get(); | 398 return capturer_.get(); |
398 } | 399 } |
399 | 400 |
400 Encoder* SessionManager::encoder() { | 401 Encoder* SessionManager::encoder() { |
401 DCHECK_EQ(encode_loop_, MessageLoop::current()); | 402 DCHECK_EQ(encode_loop_, MessageLoop::current()); |
402 return encoder_.get(); | 403 return encoder_.get(); |
403 } | 404 } |
404 | 405 |
405 } // namespace remoting | 406 } // namespace remoting |
OLD | NEW |