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

Side by Side Diff: media/capture/content/thread_safe_capture_oracle.h

Issue 2613793007: Revert of [Mojo Video Capture] Simplify media::VideoCaptureDevice::Client:Buffer to a struct (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void ReportError(const tracked_objects::Location& from_here, 91 void ReportError(const tracked_objects::Location& from_here,
92 const std::string& reason); 92 const std::string& reason);
93 93
94 void OnConsumerReportingUtilization(int frame_number, double utilization); 94 void OnConsumerReportingUtilization(int frame_number, double utilization);
95 95
96 private: 96 private:
97 friend class base::RefCountedThreadSafe<ThreadSafeCaptureOracle>; 97 friend class base::RefCountedThreadSafe<ThreadSafeCaptureOracle>;
98 virtual ~ThreadSafeCaptureOracle(); 98 virtual ~ThreadSafeCaptureOracle();
99 99
100 // Callback invoked on completion of all captures. 100 // Callback invoked on completion of all captures.
101 void DidCaptureFrame(int frame_number, 101 void DidCaptureFrame(
102 VideoCaptureDevice::Client::Buffer buffer, 102 int frame_number,
103 base::TimeTicks capture_begin_time, 103 std::unique_ptr<VideoCaptureDevice::Client::Buffer> buffer,
104 base::TimeDelta estimated_frame_duration, 104 base::TimeTicks capture_begin_time,
105 scoped_refptr<VideoFrame> frame, 105 base::TimeDelta estimated_frame_duration,
106 base::TimeTicks reference_time, 106 scoped_refptr<VideoFrame> frame,
107 bool success); 107 base::TimeTicks reference_time,
108 bool success);
108 109
109 // Callback invoked once all consumers have finished with a delivered video 110 // Callback invoked once all consumers have finished with a delivered video
110 // frame. Consumer feedback signals are scanned from the frame's |metadata|. 111 // frame. Consumer feedback signals are scanned from the frame's |metadata|.
111 void DidConsumeFrame(int frame_number, 112 void DidConsumeFrame(int frame_number,
112 const media::VideoFrameMetadata* metadata); 113 const media::VideoFrameMetadata* metadata);
113 114
114 // Protects everything below it. 115 // Protects everything below it.
115 mutable base::Lock lock_; 116 mutable base::Lock lock_;
116 117
117 // Recipient of our capture activity. 118 // Recipient of our capture activity.
118 std::unique_ptr<VideoCaptureDevice::Client> client_; 119 std::unique_ptr<VideoCaptureDevice::Client> client_;
119 120
120 // Makes the decision to capture a frame. 121 // Makes the decision to capture a frame.
121 VideoCaptureOracle oracle_; 122 VideoCaptureOracle oracle_;
122 123
123 // The video capture parameters used to construct the oracle proxy. 124 // The video capture parameters used to construct the oracle proxy.
124 const VideoCaptureParams params_; 125 const VideoCaptureParams params_;
125 }; 126 };
126 127
127 } // namespace media 128 } // namespace media
128 129
129 #endif // MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_ 130 #endif // MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698