Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: remoting/host/session_manager.cc

Issue 2853029: Fix CapturerFake for Chromoting (Closed)
Patch Set: added comments Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/host/capturer_fake.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « remoting/host/capturer_fake.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698