Chromium Code Reviews| Index: content/renderer/media/media_stream_dependency_factory.cc |
| diff --git a/content/renderer/media/media_stream_dependency_factory.cc b/content/renderer/media/media_stream_dependency_factory.cc |
| index 4f4d6f11e90e2e68cbeb00fe4ba909db021f5a71..9550ee28c7cee09d86ab64e394dd048bc108ee90 100644 |
| --- a/content/renderer/media/media_stream_dependency_factory.cc |
| +++ b/content/renderer/media/media_stream_dependency_factory.cc |
| @@ -611,6 +611,16 @@ bool MediaStreamDependencyFactory::RemoveNativeMediaStreamTrack( |
| return false; |
| } |
| +scoped_refptr<webrtc::VideoSourceInterface> |
| + MediaStreamDependencyFactory::CreateVideoSource( |
| + cricket::VideoCapturer* capturer, |
| + const webrtc::MediaConstraintsInterface* constraints) { |
| + // The video source takes ownership of |capturer|. |
|
no longer working on chromium
2014/01/15 15:57:22
nit, can you move this comment to the interface in
Ronghua Wu (Left Chromium)
2014/01/15 18:38:58
Done.
|
| + scoped_refptr<webrtc::VideoSourceInterface> source = |
|
perkj_chrome
2014/01/15 16:24:54
I just realized that you probably have to call Ens
Ronghua Wu (Left Chromium)
2014/01/15 18:38:58
I think it's the callers's responsibility to do th
|
| + pc_factory_->CreateVideoSource(capturer, constraints).get(); |
| + return source; |
| +} |
| + |
| bool MediaStreamDependencyFactory::CreatePeerConnectionFactory() { |
| DCHECK(!pc_factory_.get()); |
| DCHECK(!audio_device_.get()); |
| @@ -731,7 +741,7 @@ MediaStreamDependencyFactory::CreateLocalVideoSource( |
| // The video source takes ownership of |capturer|. |
| scoped_refptr<webrtc::VideoSourceInterface> source = |
| - pc_factory_->CreateVideoSource(capturer, constraints).get(); |
| + CreateVideoSource(capturer, constraints); |
| return source; |
| } |
| @@ -774,7 +784,7 @@ MediaStreamDependencyFactory::CreateLocalVideoTrack( |
| // Create video source from the |capturer|. |
| scoped_refptr<webrtc::VideoSourceInterface> source = |
| - pc_factory_->CreateVideoSource(capturer, NULL).get(); |
| + CreateVideoSource(capturer, NULL); |
| // Create native track from the source. |
| return pc_factory_->CreateVideoTrack(id, source.get()).get(); |