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

Side by Side Diff: media/capture/content/screen_capture_device_core.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_SCREEN_CAPTURE_DEVICE_CORE_H_ 5 #ifndef MEDIA_CAPTURE_CONTENT_SCREEN_CAPTURE_DEVICE_CORE_H_
6 #define MEDIA_CAPTURE_CONTENT_SCREEN_CAPTURE_DEVICE_CORE_H_ 6 #define MEDIA_CAPTURE_CONTENT_SCREEN_CAPTURE_DEVICE_CORE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 ScreenCaptureDeviceCore(std::unique_ptr<VideoCaptureMachine> capture_machine); 82 ScreenCaptureDeviceCore(std::unique_ptr<VideoCaptureMachine> capture_machine);
83 virtual ~ScreenCaptureDeviceCore(); 83 virtual ~ScreenCaptureDeviceCore();
84 84
85 // Asynchronous requests to change ScreenCaptureDeviceCore state. 85 // Asynchronous requests to change ScreenCaptureDeviceCore state.
86 void AllocateAndStart(const VideoCaptureParams& params, 86 void AllocateAndStart(const VideoCaptureParams& params,
87 std::unique_ptr<VideoCaptureDevice::Client> client); 87 std::unique_ptr<VideoCaptureDevice::Client> client);
88 void RequestRefreshFrame(); 88 void RequestRefreshFrame();
89 void Suspend(); 89 void Suspend();
90 void Resume(); 90 void Resume();
91 void StopAndDeAllocate(); 91 void StopAndDeAllocate();
92 void OnConsumerReportingUtilization(int frame_feedback_id,
93 double utilization);
92 94
93 private: 95 private:
94 // Flag indicating current state. 96 // Flag indicating current state.
95 enum State { kIdle, kCapturing, kSuspended, kError, kLastCaptureState }; 97 enum State { kIdle, kCapturing, kSuspended, kError, kLastCaptureState };
96 98
97 void TransitionStateTo(State next_state); 99 void TransitionStateTo(State next_state);
98 100
99 // Called back in response to StartCaptureMachine(). |success| is true if 101 // Called back in response to StartCaptureMachine(). |success| is true if
100 // capture machine succeeded to start. 102 // capture machine succeeded to start.
101 void CaptureStarted(bool success); 103 void CaptureStarted(bool success);
(...skipping 17 matching lines...) Expand all
119 // capture pipeline. Besides the VideoCaptureDevice itself, it is the only 121 // capture pipeline. Besides the VideoCaptureDevice itself, it is the only
120 // component of the system with direct access to |client_|. 122 // component of the system with direct access to |client_|.
121 scoped_refptr<ThreadSafeCaptureOracle> oracle_proxy_; 123 scoped_refptr<ThreadSafeCaptureOracle> oracle_proxy_;
122 124
123 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureDeviceCore); 125 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureDeviceCore);
124 }; 126 };
125 127
126 } // namespace media 128 } // namespace media
127 129
128 #endif // MEDIA_CAPTURE_CONTENT_SCREEN_CAPTURE_DEVICE_CORE_H_ 130 #endif // MEDIA_CAPTURE_CONTENT_SCREEN_CAPTURE_DEVICE_CORE_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/video_capture_manager.cc ('k') | media/capture/content/screen_capture_device_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698