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

Unified Diff: content/browser/renderer_host/media/video_capture_manager.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: Account for frameRate constraints when setting refresh rate in MediaStreamVideoWebRtcSink. 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/video_capture_manager.cc
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index 4016235c8f8bc5d0fe09c6d4ddb9674612449837..6f728b28101d993266656270a50da7186744a93e 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -668,6 +668,24 @@ void VideoCaptureManager::ResumeCaptureForClient(
controller->ResumeClient(client_id, client_handler);
}
+void VideoCaptureManager::RequestRefreshFrameForClient(
+ VideoCaptureController* controller) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+
+ if (DeviceEntry* entry = GetDeviceEntryForController(controller)) {
+ if (media::VideoCaptureDevice* device = entry->video_capture_device()) {
+ device_task_runner_->PostTask(
+ FROM_HERE,
+ base::Bind(&media::VideoCaptureDevice::RequestRefreshFrame,
xjz 2016/04/05 00:04:43 VideoCaptureDevice::RequestRefreshFrame() currentl
miu 2016/04/05 20:25:01 Yep! :) I'll ask you to review that one shortly.
+ // Unretained is safe to use here because |device| would be
+ // null if it was scheduled for shutdown and destruction,
+ // and because this task is guaranteed to run before the
+ // task that destroys the |device|.
+ base::Unretained(device)));
+ }
+ }
+}
+
bool VideoCaptureManager::GetDeviceSupportedFormats(
media::VideoCaptureSessionId capture_session_id,
media::VideoCaptureFormats* supported_formats) {

Powered by Google App Engine
This is Rietveld 408576698