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

Unified Diff: content/renderer/media/rtc_video_capture_delegate.cc

Issue 120893002: Eliminate video capture thread in renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload again 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
« no previous file with comments | « content/renderer/media/rtc_video_capture_delegate.h ('k') | content/renderer/media/rtc_video_capturer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_capture_delegate.cc
diff --git a/content/renderer/media/rtc_video_capture_delegate.cc b/content/renderer/media/rtc_video_capture_delegate.cc
index 4cc2b59193a7861d21e9b03c0cb63609e148e890..13d66abd28f5372111e08a2dac36b6400dc1628b 100644
--- a/content/renderer/media/rtc_video_capture_delegate.cc
+++ b/content/renderer/media/rtc_video_capture_delegate.cc
@@ -5,25 +5,27 @@
#include "content/renderer/media/rtc_video_capture_delegate.h"
#include "base/bind.h"
+#include "base/location.h"
+#include "content/renderer/media/video_capture_impl_manager.h"
+#include "content/renderer/render_thread_impl.h"
#include "media/base/video_frame.h"
namespace content {
RtcVideoCaptureDelegate::RtcVideoCaptureDelegate(
- const media::VideoCaptureSessionId id,
- VideoCaptureImplManager* vc_manager)
+ const media::VideoCaptureSessionId id)
: session_id_(id),
- vc_manager_(vc_manager),
- capture_engine_(NULL),
got_first_frame_(false),
error_occured_(false) {
DVLOG(3) << " RtcVideoCaptureDelegate::ctor";
- capture_engine_ = vc_manager_->AddDevice(session_id_, this);
+ capture_engine_ =
+ RenderThreadImpl::current()->video_capture_impl_manager()
+ ->UseDevice(session_id_);
}
RtcVideoCaptureDelegate::~RtcVideoCaptureDelegate() {
DVLOG(3) << " RtcVideoCaptureDelegate::dtor";
- vc_manager_->RemoveDevice(session_id_, this);
+ StopCapture();
}
void RtcVideoCaptureDelegate::StartCapture(
« no previous file with comments | « content/renderer/media/rtc_video_capture_delegate.h ('k') | content/renderer/media/rtc_video_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698