OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_VIDEO_CAPTURER_SOURCE_H_ | 5 #ifndef MEDIA_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ |
6 #define MEDIA_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ | 6 #define MEDIA_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "media/capture/capture_export.h" | 14 #include "media/capture/capture_export.h" |
| 15 #include "media/capture/mojo/video_capture_types.mojom-shared.h" |
15 #include "media/capture/video_capture_types.h" | 16 #include "media/capture/video_capture_types.h" |
16 | 17 |
17 namespace media { | 18 namespace media { |
18 | 19 |
19 class VideoFrame; | 20 class VideoFrame; |
20 | 21 |
21 // VideoCapturerSource is an interface representing the source for captured | 22 // VideoCapturerSource is an interface representing the source for captured |
22 // video. An implementation will periodically call the frame callback with new | 23 // video. An implementation will periodically call the frame callback with new |
23 // video frames. | 24 // video frames. |
24 class CAPTURE_EXPORT VideoCapturerSource { | 25 class CAPTURE_EXPORT VideoCapturerSource { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // | 108 // |
108 // Note: This should only be called after StartCapture() and before | 109 // Note: This should only be called after StartCapture() and before |
109 // StopCapture(). Otherwise, its behavior is undefined. | 110 // StopCapture(). Otherwise, its behavior is undefined. |
110 virtual void Resume() {} | 111 virtual void Resume() {} |
111 | 112 |
112 // Stops capturing frames and clears all callbacks including the | 113 // Stops capturing frames and clears all callbacks including the |
113 // SupportedFormatsCallback callback. Note that queued frame callbacks | 114 // SupportedFormatsCallback callback. Note that queued frame callbacks |
114 // may still occur after this call, so the caller must take care to | 115 // may still occur after this call, so the caller must take care to |
115 // use refcounted or weak references in |new_frame_callback|. | 116 // use refcounted or weak references in |new_frame_callback|. |
116 virtual void StopCapture() = 0; | 117 virtual void StopCapture() = 0; |
| 118 |
| 119 virtual mojom::VideoFacingMode GetVideoFacing() const; |
117 }; | 120 }; |
118 | 121 |
119 } // namespace media | 122 } // namespace media |
120 | 123 |
121 #endif // MEDIA_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ | 124 #endif // MEDIA_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ |
OLD | NEW |