| 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 MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_ | 5 #ifndef MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_ |
| 6 #define MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_ | 6 #define MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 friend class base::RefCountedThreadSafe<ThreadSafeCaptureOracle>; | 94 friend class base::RefCountedThreadSafe<ThreadSafeCaptureOracle>; |
| 95 virtual ~ThreadSafeCaptureOracle(); | 95 virtual ~ThreadSafeCaptureOracle(); |
| 96 | 96 |
| 97 // Callback invoked on completion of all captures. | 97 // Callback invoked on completion of all captures. |
| 98 void DidCaptureFrame( | 98 void DidCaptureFrame( |
| 99 int frame_number, | 99 int frame_number, |
| 100 std::unique_ptr<VideoCaptureDevice::Client::Buffer> buffer, | 100 std::unique_ptr<VideoCaptureDevice::Client::Buffer> buffer, |
| 101 base::TimeTicks capture_begin_time, | 101 base::TimeTicks capture_begin_time, |
| 102 base::TimeDelta estimated_frame_duration, | 102 base::TimeDelta estimated_frame_duration, |
| 103 const scoped_refptr<VideoFrame>& frame, | 103 const scoped_refptr<VideoFrame>& frame, |
| 104 base::TimeTicks timestamp, | 104 base::TimeTicks reference_time, |
| 105 bool success); | 105 bool success); |
| 106 | 106 |
| 107 // Callback invoked once all consumers have finished with a delivered video | 107 // Callback invoked once all consumers have finished with a delivered video |
| 108 // frame. Consumer feedback signals are scanned from the frame's |metadata|. | 108 // frame. Consumer feedback signals are scanned from the frame's |metadata|. |
| 109 void DidConsumeFrame(int frame_number, | 109 void DidConsumeFrame(int frame_number, |
| 110 const media::VideoFrameMetadata* metadata); | 110 const media::VideoFrameMetadata* metadata); |
| 111 | 111 |
| 112 // Protects everything below it. | 112 // Protects everything below it. |
| 113 mutable base::Lock lock_; | 113 mutable base::Lock lock_; |
| 114 | 114 |
| 115 // Recipient of our capture activity. | 115 // Recipient of our capture activity. |
| 116 std::unique_ptr<VideoCaptureDevice::Client> client_; | 116 std::unique_ptr<VideoCaptureDevice::Client> client_; |
| 117 | 117 |
| 118 // Makes the decision to capture a frame. | 118 // Makes the decision to capture a frame. |
| 119 VideoCaptureOracle oracle_; | 119 VideoCaptureOracle oracle_; |
| 120 | 120 |
| 121 // The video capture parameters used to construct the oracle proxy. | 121 // The video capture parameters used to construct the oracle proxy. |
| 122 const VideoCaptureParams params_; | 122 const VideoCaptureParams params_; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 } // namespace media | 125 } // namespace media |
| 126 | 126 |
| 127 #endif // MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_ | 127 #endif // MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_ |
| OLD | NEW |