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

Unified Diff: content/renderer/render_view_impl.cc

Issue 14175015: Allow VideoCaptureImpl to suspend/resume frame delivery to its client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: code review Created 7 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/renderer/media/video_capture_impl_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
===================================================================
--- content/renderer/render_view_impl.cc (revision 193973)
+++ content/renderer/render_view_impl.cc (working copy)
@@ -94,6 +94,7 @@
#include "content/renderer/media/renderer_audio_output_device.h"
#include "content/renderer/media/renderer_gpu_video_decoder_factories.h"
#include "content/renderer/media/rtc_peer_connection_handler.h"
+#include "content/renderer/media/video_capture_impl_manager.h"
#include "content/renderer/mhtml_generator.h"
#include "content/renderer/notification_provider.h"
#include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
@@ -5859,7 +5860,12 @@
// only be freed once the tab is destroyed or if the user navigates away
// via WebMediaPlayerAndroid::Destroy
media_player_manager_->ReleaseMediaResources();
+
+#if defined(ENABLE_WEBRTC)
+ RenderThreadImpl::current()->video_capture_impl_manager()->
+ SuspendDevices(true);
#endif
+#endif
if (webview()) {
webview()->settings()->setMinimumTimerInterval(
@@ -5883,6 +5889,11 @@
void RenderViewImpl::OnWasShown(bool needs_repainting) {
RenderWidget::OnWasShown(needs_repainting);
+#if defined(OS_ANDROID) && defined(ENABLE_WEBRTC)
+ RenderThreadImpl::current()->video_capture_impl_manager()->
+ SuspendDevices(false);
+#endif
+
if (webview()) {
webview()->settings()->setMinimumTimerInterval(
webkit_glue::kForegroundTabTimerInterval);
« no previous file with comments | « content/renderer/media/video_capture_impl_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698