 Chromium Code Reviews
 Chromium Code Reviews Issue 1304393004:
  Change VideoCaptureDeliverFrameCB's signature  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1304393004:
  Change VideoCaptureDeliverFrameCB's signature  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| 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 22 matching lines...) Expand all Loading... | |
| 33 // implementation should not present the frame before this point-in-time. This | 33 // implementation should not present the frame before this point-in-time. This | 
| 34 // value is NOT a high-resolution timestamp, and so it should not be used as a | 34 // value is NOT a high-resolution timestamp, and so it should not be used as a | 
| 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<void( | 
| 44 void(const scoped_refptr<media::VideoFrame>& video_frame, | 44 const scoped_refptr<media::VideoFrame>& video_frame, | 
| 45 const base::TimeTicks& estimated_capture_time)> | 45 base::TimeTicks estimated_capture_time)> VideoCaptureDeliverFrameCB; | 
| 
mcasas
2015/08/25 21:24:00
nit: perhaps clearer like before?
(just to say som
 | |
| 46 VideoCaptureDeliverFrameCB; | |
| 47 | 46 | 
| 48 typedef base::Callback<void(const media::VideoCaptureFormats&)> | 47 typedef base::Callback<void(const media::VideoCaptureFormats&)> | 
| 49 VideoCaptureDeviceFormatsCB; | 48 VideoCaptureDeviceFormatsCB; | 
| 50 | 49 | 
| 51 typedef base::Callback<void(bool)> RunningCallback; | 50 typedef base::Callback<void(bool)> RunningCallback; | 
| 52 | 51 | 
| 53 // Collects the formats that can currently be used. | 52 // Collects the formats that can currently be used. | 
| 54 // |max_requested_height|, |max_requested_width|, and | 53 // |max_requested_height|, |max_requested_width|, and | 
| 55 // |max_requested_frame_rate| is used by Tab and Screen capture to decide what | 54 // |max_requested_frame_rate| is used by Tab and Screen capture to decide what | 
| 56 // resolution/framerate to generate. |callback| is triggered when the formats | 55 // resolution/framerate to generate. |callback| is triggered when the formats | 
| (...skipping 24 matching lines...) Expand all Loading... | |
| 81 // Stops capturing frames and clears all callbacks including the | 80 // Stops capturing frames and clears all callbacks including the | 
| 82 // SupportedFormatsCallback callback. Note that queued frame callbacks | 81 // SupportedFormatsCallback callback. Note that queued frame callbacks | 
| 83 // may still occur after this call, so the caller must take care to | 82 // may still occur after this call, so the caller must take care to | 
| 84 // use refcounted or weak references in |new_frame_callback|. | 83 // use refcounted or weak references in |new_frame_callback|. | 
| 85 virtual void StopCapture() = 0; | 84 virtual void StopCapture() = 0; | 
| 86 }; | 85 }; | 
| 87 | 86 | 
| 88 } // namespace media | 87 } // namespace media | 
| 89 | 88 | 
| 90 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ | 89 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURER_SOURCE_H_ | 
| OLD | NEW |