OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_VIDEO_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ | 5 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ |
6 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ | 6 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 // presentation time; but, instead, it should be used for buffering playback | 35 // presentation time; but, instead, it should be used for buffering playback |
36 // and for A/V synchronization purposes. NOTE: It is possible for this value | 36 // and for A/V synchronization purposes. NOTE: It is possible for this value |
37 // to be null if the current implementation lacks this timing information. | 37 // to be null if the current implementation lacks this timing information. |
38 // | 38 // |
39 // |video_frame->timestamp()| gives the presentation timestamp of the video | 39 // |video_frame->timestamp()| gives the presentation timestamp of the video |
40 // frame relative to the first frame generated by the corresponding source. | 40 // frame relative to the first frame generated by the corresponding source. |
41 // Because a source can start generating frames before a subscriber is added, | 41 // Because a source can start generating frames before a subscriber is added, |
42 // the first video frame delivered may not have timestamp equal to 0. | 42 // the first video frame delivered may not have timestamp equal to 0. |
43 typedef base::Callback< | 43 typedef base::Callback< |
44 void(const scoped_refptr<media::VideoFrame>& video_frame, | 44 void(const scoped_refptr<media::VideoFrame>& video_frame, |
45 const media::VideoCaptureFormat& format, | |
46 const base::TimeTicks& estimated_capture_time)> | 45 const base::TimeTicks& estimated_capture_time)> |
47 VideoCaptureDeliverFrameCB; | 46 VideoCaptureDeliverFrameCB; |
48 | 47 |
49 typedef base::Callback<void(const media::VideoCaptureFormats&)> | 48 typedef base::Callback<void(const media::VideoCaptureFormats&)> |
50 VideoCaptureDeviceFormatsCB; | 49 VideoCaptureDeviceFormatsCB; |
51 | 50 |
52 typedef base::Callback<void(bool)> RunningCallback; | 51 typedef base::Callback<void(bool)> RunningCallback; |
53 | 52 |
54 // Collects the formats that can currently be used. | 53 // Collects the formats that can currently be used. |
55 // |max_requested_height|, |max_requested_width|, and | 54 // |max_requested_height|, |max_requested_width|, and |
(...skipping 26 matching lines...) Expand all Loading... |
82 // Stops capturing frames and clears all callbacks including the | 81 // Stops capturing frames and clears all callbacks including the |
83 // SupportedFormatsCallback callback. Note that queued frame callbacks | 82 // SupportedFormatsCallback callback. Note that queued frame callbacks |
84 // may still occur after this call, so the caller must take care to | 83 // may still occur after this call, so the caller must take care to |
85 // use refcounted or weak references in |new_frame_callback|. | 84 // use refcounted or weak references in |new_frame_callback|. |
86 virtual void StopCapture() = 0; | 85 virtual void StopCapture() = 0; |
87 }; | 86 }; |
88 | 87 |
89 } // namespace media | 88 } // namespace media |
90 | 89 |
91 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ | 90 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ |
OLD | NEW |