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

Side by Side Diff: media/capture/screen_capture_device_core.h

Issue 1199593005: Automatic resolution throttling for screen capture pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resolution_chooser_ITEM13
Patch Set: Move all end_t assignments out of for-loop init. Created 5 years, 5 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_SCREEN_CAPTURE_DEVICE_CORE_H_ 5 #ifndef MEDIA_CAPTURE_SCREEN_CAPTURE_DEVICE_CORE_H_
6 #define MEDIA_CAPTURE_SCREEN_CAPTURE_DEVICE_CORE_H_ 6 #define MEDIA_CAPTURE_SCREEN_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"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/threading/thread_checker.h" 12 #include "base/threading/thread_checker.h"
13 #include "media/base/media_export.h" 13 #include "media/base/media_export.h"
14 #include "media/capture/thread_safe_capture_oracle.h" 14 #include "media/capture/thread_safe_capture_oracle.h"
15 #include "media/video/capture/video_capture_device.h" 15 #include "media/video/capture/video_capture_device.h"
16 16
17 namespace media { 17 namespace media {
18 18
19 struct VideoCaptureParams; 19 struct VideoCaptureParams;
20 20
21 class ThreadSafeCaptureOracle; 21 class ThreadSafeCaptureOracle;
22 22
23 // Keeps track of the video capture source frames and executes copying. 23 // Keeps track of the video capture source frames and executes copying.
24 class VideoCaptureMachine { 24 class MEDIA_EXPORT VideoCaptureMachine {
25 public: 25 public:
26 VideoCaptureMachine() {} 26 VideoCaptureMachine();
27 virtual ~VideoCaptureMachine() {} 27 virtual ~VideoCaptureMachine();
28 28
29 // Starts capturing. 29 // Starts capturing.
30 // |callback| is invoked with true if succeeded. Otherwise, with false. 30 // |callback| is invoked with true if succeeded. Otherwise, with false.
31 virtual void Start(const scoped_refptr<ThreadSafeCaptureOracle>& oracle_proxy, 31 virtual void Start(const scoped_refptr<ThreadSafeCaptureOracle>& oracle_proxy,
32 const VideoCaptureParams& params, 32 const VideoCaptureParams& params,
33 const base::Callback<void(bool)> callback) = 0; 33 const base::Callback<void(bool)> callback) = 0;
34 34
35 // Stops capturing. 35 // Stops capturing.
36 // |callback| is invoked after the capturing has stopped. 36 // |callback| is invoked after the capturing has stopped.
37 virtual void Stop(const base::Closure& callback) = 0; 37 virtual void Stop(const base::Closure& callback) = 0;
38 38
39 // Returns true if the video capture is configured to monitor end-to-end
40 // system utilization, and alter frame sizes and/or frame rates to mitigate
41 // overloading or under-utilization.
42 virtual bool IsAutoThrottlingEnabled() const;
43
39 private: 44 private:
40 DISALLOW_COPY_AND_ASSIGN(VideoCaptureMachine); 45 DISALLOW_COPY_AND_ASSIGN(VideoCaptureMachine);
41 }; 46 };
42 47
43 // The "meat" of a content video capturer. 48 // The "meat" of a content video capturer.
44 // 49 //
45 // Separating this from the "shell classes" WebContentsVideoCaptureDevice and 50 // Separating this from the "shell classes" WebContentsVideoCaptureDevice and
46 // DesktopCaptureDeviceAura allows safe destruction without needing to block any 51 // DesktopCaptureDeviceAura allows safe destruction without needing to block any
47 // threads, as well as code sharing. 52 // threads, as well as code sharing.
48 // 53 //
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // component of the system with direct access to |client_|. 100 // component of the system with direct access to |client_|.
96 scoped_refptr<ThreadSafeCaptureOracle> oracle_proxy_; 101 scoped_refptr<ThreadSafeCaptureOracle> oracle_proxy_;
97 102
98 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureDeviceCore); 103 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureDeviceCore);
99 }; 104 };
100 105
101 106
102 } // namespace media 107 } // namespace media
103 108
104 #endif // MEDIA_CAPTURE_SCREEN_CAPTURE_DEVICE_CORE_H_ 109 #endif // MEDIA_CAPTURE_SCREEN_CAPTURE_DEVICE_CORE_H_
OLDNEW
« no previous file with comments | « content/browser/media/capture/web_contents_video_capture_device.cc ('k') | media/capture/screen_capture_device_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698