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_THREAD_SAFE_CAPTURE_ORACLE_H_ | 5 #ifndef MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_ |
6 #define MEDIA_CAPTURE_THREAD_SAFE_CAPTURE_ORACLE_H_ | 6 #define MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "media/base/media_export.h" | 12 #include "media/base/media_export.h" |
13 #include "media/base/video_frame.h" | 13 #include "media/base/video_frame.h" |
14 #include "media/capture/content/video_capture_oracle.h" | 14 #include "media/capture/content/video_capture_oracle.h" |
15 #include "media/capture/video/video_capture_device.h" | 15 #include "media/capture/video/video_capture_device.h" |
16 | 16 |
(...skipping 28 matching lines...) Expand all Loading... |
45 bool ObserveEventAndDecideCapture(VideoCaptureOracle::Event event, | 45 bool ObserveEventAndDecideCapture(VideoCaptureOracle::Event event, |
46 const gfx::Rect& damage_rect, | 46 const gfx::Rect& damage_rect, |
47 base::TimeTicks event_time, | 47 base::TimeTicks event_time, |
48 scoped_refptr<VideoFrame>* storage, | 48 scoped_refptr<VideoFrame>* storage, |
49 CaptureFrameCallback* callback); | 49 CaptureFrameCallback* callback); |
50 | 50 |
51 base::TimeDelta min_capture_period() const { | 51 base::TimeDelta min_capture_period() const { |
52 return oracle_.min_capture_period(); | 52 return oracle_.min_capture_period(); |
53 } | 53 } |
54 | 54 |
| 55 bool IsAnimationActive() const { return oracle_.IsAnimationActive(); } |
| 56 |
55 gfx::Size max_frame_size() const { | 57 gfx::Size max_frame_size() const { |
56 return params_.requested_format.frame_size; | 58 return params_.requested_format.frame_size; |
57 } | 59 } |
58 | 60 |
59 // Returns the current capture resolution. | 61 // Returns the current capture resolution. |
60 gfx::Size GetCaptureSize() const; | 62 gfx::Size GetCaptureSize() const; |
61 | 63 |
62 // Updates capture resolution based on the supplied source size and the | 64 // Updates capture resolution based on the supplied source size and the |
63 // maximum frame size. | 65 // maximum frame size. |
64 void UpdateCaptureSize(const gfx::Size& source_size); | 66 void UpdateCaptureSize(const gfx::Size& source_size); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 98 |
97 // Makes the decision to capture a frame. | 99 // Makes the decision to capture a frame. |
98 VideoCaptureOracle oracle_; | 100 VideoCaptureOracle oracle_; |
99 | 101 |
100 // The video capture parameters used to construct the oracle proxy. | 102 // The video capture parameters used to construct the oracle proxy. |
101 const VideoCaptureParams params_; | 103 const VideoCaptureParams params_; |
102 }; | 104 }; |
103 | 105 |
104 } // namespace media | 106 } // namespace media |
105 | 107 |
106 #endif // MEDIA_CAPTURE_THREAD_SAFE_CAPTURE_ORACLE_H_ | 108 #endif // MEDIA_CAPTURE_CONTENT_THREAD_SAFE_CAPTURE_ORACLE_H_ |
OLD | NEW |