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