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_BASE_VIDEO_CAPTURER_SOURCE_H_ | 5 #ifndef MEDIA_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ |
6 #define MEDIA_BASE_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/base/media_export.h" | 14 #include "media/capture/capture_export.h" |
15 #include "media/base/video_capture_types.h" | 15 #include "media/capture/video_capture_types.h" |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 | 18 |
19 class VideoFrame; | 19 class VideoFrame; |
20 | 20 |
21 // VideoCapturerSource is an interface representing the source for captured | 21 // VideoCapturerSource is an interface representing the source for captured |
22 // video. An implementation will periodically call the frame callback with new | 22 // video. An implementation will periodically call the frame callback with new |
23 // video frames. | 23 // video frames. |
24 class MEDIA_EXPORT VideoCapturerSource { | 24 class CAPTURE_EXPORT VideoCapturerSource { |
25 public: | 25 public: |
26 virtual ~VideoCapturerSource(); | 26 virtual ~VideoCapturerSource(); |
27 | 27 |
28 // This callback is used to deliver video frames. | 28 // This callback is used to deliver video frames. |
29 // | 29 // |
30 // |estimated_capture_time| - The capture time of the delivered video | 30 // |estimated_capture_time| - The capture time of the delivered video |
31 // frame. This field represents the local time at which either: 1) the frame | 31 // frame. This field represents the local time at which either: 1) the frame |
32 // was generated, if it was done so locally; or 2) the targeted play-out time | 32 // was generated, if it was done so locally; or 2) the targeted play-out time |
33 // of the frame, if it was generated from a remote source. Either way, an | 33 // of the frame, if it was generated from a remote source. Either way, an |
34 // implementation should not present the frame before this point-in-time. This | 34 // implementation should not present the frame before this point-in-time. This |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 // Stops capturing frames and clears all callbacks including the | 112 // Stops capturing frames and clears all callbacks including the |
113 // SupportedFormatsCallback callback. Note that queued frame callbacks | 113 // SupportedFormatsCallback callback. Note that queued frame callbacks |
114 // may still occur after this call, so the caller must take care to | 114 // may still occur after this call, so the caller must take care to |
115 // use refcounted or weak references in |new_frame_callback|. | 115 // use refcounted or weak references in |new_frame_callback|. |
116 virtual void StopCapture() = 0; | 116 virtual void StopCapture() = 0; |
117 }; | 117 }; |
118 | 118 |
119 } // namespace media | 119 } // namespace media |
120 | 120 |
121 #endif // MEDIA_BASE_VIDEO_CAPTURER_SOURCE_H_ | 121 #endif // MEDIA_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ |
OLD | NEW |