summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authoremircan <emircan@chromium.org>2016-03-25 17:46:01 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-26 00:46:57 +0000
commitdbe511aa9eea169722b239f82174850df2185eff (patch)
tree85d298c3e58fd0f1dd90d097cddfb574fd9db292 /media
parentebdb684a77d95889be31d09df5973297ca4decce (diff)
downloadchromium_src-dbe511aa9eea169722b239f82174850df2185eff.zip
chromium_src-dbe511aa9eea169722b239f82174850df2185eff.tar.gz
chromium_src-dbe511aa9eea169722b239f82174850df2185eff.tar.bz2
Request frame for new sinks from MediaStreamVideoTrack
This CL adds a series of RequstFrame() calls propagated from MediaStreamVideoTrack when a new sink is added. MediaStreamVideoTrack -> MediaStreamVideoCapturerSource which is a MediaStreamVideoSource -> media::VideoCapturerSource This addresses the issues when a new sink is added but doesn't receive a frame because it wasn't added on time. BUG=597876, 587789, 486274 Review URL: https://codereview.chromium.org/1829193003 Cr-Commit-Position: refs/heads/master@{#383421}
Diffstat (limited to 'media')
-rw-r--r--media/base/video_capturer_source.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/base/video_capturer_source.h b/media/base/video_capturer_source.h
index a99faf8..ddec90c 100644
--- a/media/base/video_capturer_source.h
+++ b/media/base/video_capturer_source.h
@@ -76,6 +76,16 @@ class MEDIA_EXPORT VideoCapturerSource {
const VideoCaptureDeliverFrameCB& new_frame_callback,
const RunningCallback& running_callback) = 0;
+ // Asks source to send a refresh frame. In cases where source does not provide
+ // a continuous rate of new frames (e.g. canvas capture, screen capture where
+ // the screen's content has not changed in a while), consumers may request a
+ // "refresh frame" to be delivered. For instance, this would be needed when
+ // a new sink is added to a MediaStreamTrack.
+ // The default implementation is a no-op and implementations are not required
+ // to honor this request. If they decide to and capturing is started
+ // successfully, then |new_frame_callback| should be called with a frame.
+ virtual void RequestRefreshFrame() {}
+
// Stops capturing frames and clears all callbacks including the
// SupportedFormatsCallback callback. Note that queued frame callbacks
// may still occur after this call, so the caller must take care to