Chromium Code Reviews| 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..96cbdcfdc1e6ca4b3c8dc364ef066b93f1582bf0 100644 |
| --- a/content/renderer/media/rtc_video_capture_delegate.cc |
| +++ b/content/renderer/media/rtc_video_capture_delegate.cc |
| @@ -5,25 +5,26 @@ |
| #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() |
|
wjia(left Chromium)
2013/12/28 02:42:32
Using RenderThreadImpl::current() will complicate
Alpha Left Google
2014/01/02 23:35:16
I think this object is created on the render threa
wjia(left Chromium)
2014/01/06 19:17:23
That's not my understanding. There is no restricti
Ami GONE FROM CHROMIUM
2014/01/06 23:37:14
My opinion: using RTI this way (instead of injecti
perkj_chrome
2014/01/07 06:21:44
Good to know when RTI is ok to use and when not. I
|
| + ->UseDevice(session_id_); |
| } |
| RtcVideoCaptureDelegate::~RtcVideoCaptureDelegate() { |
|
Ami GONE FROM CHROMIUM
2014/01/06 23:37:14
This silently relies on class-member-destruction o
Alpha Left Google
2014/01/08 00:23:36
I'm calling StopCapture() here such that it explic
|
| DVLOG(3) << " RtcVideoCaptureDelegate::dtor"; |
| - vc_manager_->RemoveDevice(session_id_, this); |
| } |
| void RtcVideoCaptureDelegate::StartCapture( |