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

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

Issue 129923002: Implements MediaStreamVideoSource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: per's comments and fix the build 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: 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();

Powered by Google App Engine
This is Rietveld 408576698