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

Unified Diff: content/public/renderer/media_stream_utils.cc

Issue 1849003002: Add video frame refresh to MediaStream and VideoCapture stacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nick's PS3 comments (moving non-observer impl out of MSVideoSink interface). Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/renderer/media_stream_utils.h ('k') | content/public/renderer/media_stream_video_sink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/renderer/media_stream_utils.cc
diff --git a/content/public/renderer/media_stream_utils.cc b/content/public/renderer/media_stream_utils.cc
index d48654198205e8d6245df9e7b643e2bfab633d01..5b91b182531ba31585bba93627838e2b6c07be9c 100644
--- a/content/public/renderer/media_stream_utils.cc
+++ b/content/public/renderer/media_stream_utils.cc
@@ -118,12 +118,22 @@ const media::VideoCaptureFormat* GetCurrentVideoTrackFormat(
if (video_track.isNull())
return nullptr;
- content::MediaStreamVideoSource* source =
- content::MediaStreamVideoSource::GetVideoSource(video_track.source());
+ MediaStreamVideoSource* const source =
+ MediaStreamVideoSource::GetVideoSource(video_track.source());
if (!source)
return nullptr;
return source->GetCurrentFormat();
}
+void RequestRefreshFrameFromVideoTrack(
+ const blink::WebMediaStreamTrack& video_track) {
+ if (video_track.isNull())
+ return;
+ MediaStreamVideoSource* const source =
+ MediaStreamVideoSource::GetVideoSource(video_track.source());
+ if (source)
+ source->RequestRefreshFrame();
+}
+
} // namespace content
« no previous file with comments | « content/public/renderer/media_stream_utils.h ('k') | content/public/renderer/media_stream_video_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698