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

Unified Diff: trunk/src/content/renderer/pepper/pepper_platform_video_capture.cc

Issue 135683002: Revert 244074 "Eliminate video capture thread in renderer" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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: trunk/src/content/renderer/pepper/pepper_platform_video_capture.cc
===================================================================
--- trunk/src/content/renderer/pepper/pepper_platform_video_capture.cc (revision 244357)
+++ trunk/src/content/renderer/pepper/pepper_platform_video_capture.cc (working copy)
@@ -28,6 +28,7 @@
handler_proxy_(new media::VideoCaptureHandlerProxy(
this, base::MessageLoopProxy::current())),
handler_(handler),
+ video_capture_(NULL),
unbalanced_start_(false),
pending_open_device_(false),
pending_open_device_id_(-1) {
@@ -82,7 +83,12 @@
handler_ = NULL;
StopCapture(NULL);
- video_capture_.reset();
+ if (video_capture_) {
+ VideoCaptureImplManager* manager =
+ RenderThreadImpl::current()->video_capture_impl_manager();
+ manager->RemoveDevice(session_id_, handler_proxy_.get());
+ video_capture_ = NULL;
+ }
if (render_view_.get()) {
if (!label_.empty()) {
@@ -141,7 +147,7 @@
void PepperPlatformVideoCapture::Initialize() {
VideoCaptureImplManager* manager =
RenderThreadImpl::current()->video_capture_impl_manager();
- video_capture_ = manager->UseDevice(session_id_);
+ video_capture_ = manager->AddDevice(session_id_, handler_proxy_.get());
}
void PepperPlatformVideoCapture::OnDeviceOpened(int request_id,
« no previous file with comments | « trunk/src/content/renderer/pepper/pepper_platform_video_capture.h ('k') | trunk/src/content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698