Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: media/base/video_capturer_source.h

Issue 1829193003: Request frame for new sinks from MediaStreamVideoTrack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: miu@ nit. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/media/mock_media_stream_video_source.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BASE_VIDEO_CAPTURER_SOURCE_H_
6 #define MEDIA_BASE_VIDEO_CAPTURER_SOURCE_H_ 6 #define MEDIA_BASE_VIDEO_CAPTURER_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // argument) if called with the wrong task runner. 69 // argument) if called with the wrong task runner.
70 // If capturing fails to start or stopped due to an external event then 70 // If capturing fails to start or stopped due to an external event then
71 // |running_callback| will be called with a parameter of false. 71 // |running_callback| will be called with a parameter of false.
72 // |running_callback| will always be called on the same thread as the 72 // |running_callback| will always be called on the same thread as the
73 // StartCapture. 73 // StartCapture.
74 virtual void StartCapture( 74 virtual void StartCapture(
75 const media::VideoCaptureParams& params, 75 const media::VideoCaptureParams& params,
76 const VideoCaptureDeliverFrameCB& new_frame_callback, 76 const VideoCaptureDeliverFrameCB& new_frame_callback,
77 const RunningCallback& running_callback) = 0; 77 const RunningCallback& running_callback) = 0;
78 78
79 // Asks source to send a refresh frame. In cases where source does not provide
80 // a continuous rate of new frames (e.g. canvas capture, screen capture where
81 // the screen's content has not changed in a while), consumers may request a
82 // "refresh frame" to be delivered. For instance, this would be needed when
83 // a new sink is added to a MediaStreamTrack.
84 // The default implementation is a no-op and implementations are not required
85 // to honor this request. If they decide to and capturing is started
86 // successfully, then |new_frame_callback| should be called with a frame.
87 virtual void RequestRefreshFrame() {}
88
79 // Stops capturing frames and clears all callbacks including the 89 // Stops capturing frames and clears all callbacks including the
80 // SupportedFormatsCallback callback. Note that queued frame callbacks 90 // SupportedFormatsCallback callback. Note that queued frame callbacks
81 // may still occur after this call, so the caller must take care to 91 // may still occur after this call, so the caller must take care to
82 // use refcounted or weak references in |new_frame_callback|. 92 // use refcounted or weak references in |new_frame_callback|.
83 virtual void StopCapture() = 0; 93 virtual void StopCapture() = 0;
84 }; 94 };
85 95
86 } // namespace media 96 } // namespace media
87 97
88 #endif // MEDIA_BASE_VIDEO_CAPTURER_SOURCE_H_ 98 #endif // MEDIA_BASE_VIDEO_CAPTURER_SOURCE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/mock_media_stream_video_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698