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

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

Issue 2518143004: [Mojo Video Capture] Replace RESOURCE_UTILIZATION with interface ReceiverLoadObserver (Closed)
Patch Set: Fix for android-only code Created 4 years 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // maximum frame size. 84 // maximum frame size.
85 void UpdateCaptureSize(const gfx::Size& source_size); 85 void UpdateCaptureSize(const gfx::Size& source_size);
86 86
87 // Stop new captures from happening (but doesn't forget the client). 87 // Stop new captures from happening (but doesn't forget the client).
88 void Stop(); 88 void Stop();
89 89
90 // Signal an error to the client. 90 // Signal an error to the client.
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);
95
94 private: 96 private:
95 friend class base::RefCountedThreadSafe<ThreadSafeCaptureOracle>; 97 friend class base::RefCountedThreadSafe<ThreadSafeCaptureOracle>;
96 virtual ~ThreadSafeCaptureOracle(); 98 virtual ~ThreadSafeCaptureOracle();
97 99
98 // Callback invoked on completion of all captures. 100 // Callback invoked on completion of all captures.
99 void DidCaptureFrame( 101 void DidCaptureFrame(
100 int frame_number, 102 int frame_number,
101 std::unique_ptr<VideoCaptureDevice::Client::Buffer> buffer, 103 std::unique_ptr<VideoCaptureDevice::Client::Buffer> buffer,
102 base::TimeTicks capture_begin_time, 104 base::TimeTicks capture_begin_time,
103 base::TimeDelta estimated_frame_duration, 105 base::TimeDelta estimated_frame_duration,
(...skipping 15 matching lines...) Expand all
119 // Makes the decision to capture a frame. 121 // Makes the decision to capture a frame.
120 VideoCaptureOracle oracle_; 122 VideoCaptureOracle oracle_;
121 123
122 // The video capture parameters used to construct the oracle proxy. 124 // The video capture parameters used to construct the oracle proxy.
123 const VideoCaptureParams params_; 125 const VideoCaptureParams params_;
124 }; 126 };
125 127
126 } // namespace media 128 } // namespace media
127 129
128 #endif // MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_ 130 #endif // MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_
OLDNEW
« no previous file with comments | « media/capture/content/screen_capture_device_core.cc ('k') | media/capture/content/thread_safe_capture_oracle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698