| 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/screen_recorder.h" | 5 #include "remoting/host/screen_recorder.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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 void ScreenRecorder::RemoveAllConnections() { | 95 void ScreenRecorder::RemoveAllConnections() { |
| 96 network_loop_->PostTask( | 96 network_loop_->PostTask( |
| 97 FROM_HERE, | 97 FROM_HERE, |
| 98 NewTracedMethod(this, &ScreenRecorder::DoRemoveAllClients)); | 98 NewTracedMethod(this, &ScreenRecorder::DoRemoveAllClients)); |
| 99 } | 99 } |
| 100 | 100 |
| 101 // Private accessors ----------------------------------------------------------- | 101 // Private accessors ----------------------------------------------------------- |
| 102 | 102 |
| 103 Capturer* ScreenRecorder::capturer() { | 103 Capturer* ScreenRecorder::capturer() { |
| 104 DCHECK_EQ(capture_loop_, MessageLoop::current()); | 104 DCHECK_EQ(capture_loop_, MessageLoop::current()); |
| 105 DCHECK(capturer_); | 105 DCHECK(capturer_.get()); |
| 106 return capturer_; | 106 return capturer_.get(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 Encoder* ScreenRecorder::encoder() { | 109 Encoder* ScreenRecorder::encoder() { |
| 110 DCHECK_EQ(encode_loop_, MessageLoop::current()); | 110 DCHECK_EQ(encode_loop_, MessageLoop::current()); |
| 111 DCHECK(encoder_.get()); | 111 DCHECK(encoder_.get()); |
| 112 return encoder_.get(); | 112 return encoder_.get(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 // Capturer thread ------------------------------------------------------------- | 115 // Capturer thread ------------------------------------------------------------- |
| 116 | 116 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 363 |
| 364 void ScreenRecorder::EncodedDataAvailableCallback(VideoPacket* packet) { | 364 void ScreenRecorder::EncodedDataAvailableCallback(VideoPacket* packet) { |
| 365 DCHECK_EQ(encode_loop_, MessageLoop::current()); | 365 DCHECK_EQ(encode_loop_, MessageLoop::current()); |
| 366 | 366 |
| 367 network_loop_->PostTask( | 367 network_loop_->PostTask( |
| 368 FROM_HERE, | 368 FROM_HERE, |
| 369 NewTracedMethod(this, &ScreenRecorder::DoSendVideoPacket, packet)); | 369 NewTracedMethod(this, &ScreenRecorder::DoSendVideoPacket, packet)); |
| 370 } | 370 } |
| 371 | 371 |
| 372 } // namespace remoting | 372 } // namespace remoting |
| OLD | NEW |