| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_DEVICE_CORE_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_DEVICE_CORE_H_ |
| 6 #define CONTENT_BROWSER_MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_DEVICE_CORE_H_ | 6 #define CONTENT_BROWSER_MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_DEVICE_CORE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void ReportError(const std::string& reason); | 76 void ReportError(const std::string& reason); |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 friend class base::RefCountedThreadSafe<ThreadSafeCaptureOracle>; | 79 friend class base::RefCountedThreadSafe<ThreadSafeCaptureOracle>; |
| 80 virtual ~ThreadSafeCaptureOracle(); | 80 virtual ~ThreadSafeCaptureOracle(); |
| 81 | 81 |
| 82 // Callback invoked on completion of all captures. | 82 // Callback invoked on completion of all captures. |
| 83 void DidCaptureFrame( | 83 void DidCaptureFrame( |
| 84 int frame_number, | 84 int frame_number, |
| 85 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer, | 85 const scoped_refptr<media::VideoCaptureDevice::Client::Buffer>& buffer, |
| 86 base::TimeTicks capture_begin_time, |
| 86 const scoped_refptr<media::VideoFrame>& frame, | 87 const scoped_refptr<media::VideoFrame>& frame, |
| 87 base::TimeTicks timestamp, | 88 base::TimeTicks timestamp, |
| 88 bool success); | 89 bool success); |
| 89 | 90 |
| 90 // Protects everything below it. | 91 // Protects everything below it. |
| 91 mutable base::Lock lock_; | 92 mutable base::Lock lock_; |
| 92 | 93 |
| 93 // Recipient of our capture activity. | 94 // Recipient of our capture activity. |
| 94 scoped_ptr<media::VideoCaptureDevice::Client> client_; | 95 scoped_ptr<media::VideoCaptureDevice::Client> client_; |
| 95 | 96 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // component of the system with direct access to |client_|. | 182 // component of the system with direct access to |client_|. |
| 182 scoped_refptr<ThreadSafeCaptureOracle> oracle_proxy_; | 183 scoped_refptr<ThreadSafeCaptureOracle> oracle_proxy_; |
| 183 | 184 |
| 184 DISALLOW_COPY_AND_ASSIGN(ContentVideoCaptureDeviceCore); | 185 DISALLOW_COPY_AND_ASSIGN(ContentVideoCaptureDeviceCore); |
| 185 }; | 186 }; |
| 186 | 187 |
| 187 | 188 |
| 188 } // namespace content | 189 } // namespace content |
| 189 | 190 |
| 190 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_DEVICE_CORE_H_ | 191 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_DEVICE_CORE_H_ |
| OLD | NEW |