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

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

Issue 2339193002: Wip - cl for implemening VideoTrackSource::ApplyConstraints(constraints, VideoTrack) and adopt safe…
Patch Set: Created 4 years, 3 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/media_stream_audio_source.h ('k') | content/renderer/media/media_stream_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_center.cc
diff --git a/content/renderer/media/media_stream_center.cc b/content/renderer/media/media_stream_center.cc
index 2f5e1a406358bc3b31bfdac4dacfe8b5dc44e1d3..274876e82a321858cb2002aafdc4c3d6cc330f3f 100644
--- a/content/renderer/media/media_stream_center.cc
+++ b/content/renderer/media/media_stream_center.cc
@@ -70,19 +70,8 @@ void CreateNativeVideoMediaStreamTrack(
DCHECK_EQ(source.getType(), blink::WebMediaStreamSource::TypeVideo);
MediaStreamVideoSource* native_source =
MediaStreamVideoSource::GetVideoSource(source);
+ native_source->ConnectToTrack(track);
DCHECK(native_source);
- blink::WebMediaStreamTrack writable_track(track);
- // TODO(perkj): The constraints to use here should be passed from blink when
- // a new track is created. For cloning, it should be the constraints of the
- // cloned track and not the originating source.
- // Also - source.constraints() returns an uninitialized constraint if the
- // source is coming from a remote video track. See http://crbug/287805.
- blink::WebMediaConstraints constraints = source.constraints();
- if (constraints.isNull())
- constraints.initialize();
- writable_track.setTrackData(new MediaStreamVideoTrack(
- native_source, constraints, MediaStreamVideoSource::ConstraintsCallback(),
- track.isEnabled()));
}
} // namespace
« no previous file with comments | « content/renderer/media/media_stream_audio_source.h ('k') | content/renderer/media/media_stream_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698