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

Side by Side Diff: content/renderer/media/media_stream_center.cc

Issue 201583003: Implement a source for remote video tracks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/media/media_stream_dependency_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/media_stream_center.h" 5 #include "content/renderer/media/media_stream_center.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 void CreateNativeVideoMediaStreamTrack( 47 void CreateNativeVideoMediaStreamTrack(
48 const blink::WebMediaStreamTrack& track, 48 const blink::WebMediaStreamTrack& track,
49 MediaStreamDependencyFactory* factory) { 49 MediaStreamDependencyFactory* factory) {
50 DCHECK(track.extraData() == NULL); 50 DCHECK(track.extraData() == NULL);
51 blink::WebMediaStreamSource source = track.source(); 51 blink::WebMediaStreamSource source = track.source();
52 DCHECK_EQ(source.type(), blink::WebMediaStreamSource::TypeVideo); 52 DCHECK_EQ(source.type(), blink::WebMediaStreamSource::TypeVideo);
53 MediaStreamVideoSource* native_source = 53 MediaStreamVideoSource* native_source =
54 MediaStreamVideoSource::GetVideoSource(source); 54 MediaStreamVideoSource::GetVideoSource(source);
55 if (!native_source) { 55 DCHECK(native_source);
56 // TODO(perkj): Implement support for sources from
57 // remote MediaStreams.
58 NOTIMPLEMENTED();
59 return;
60 }
61 blink::WebMediaStreamTrack writable_track(track); 56 blink::WebMediaStreamTrack writable_track(track);
62 writable_track.setExtraData( 57 writable_track.setExtraData(
63 new MediaStreamVideoTrack(native_source, source.constraints(), 58 new MediaStreamVideoTrack(native_source, source.constraints(),
64 MediaStreamVideoSource::ConstraintsCallback(), 59 MediaStreamVideoSource::ConstraintsCallback(),
65 track.isEnabled(), factory)); 60 track.isEnabled(), factory));
66 } 61 }
67 62
68 void CreateNativeMediaStreamTrack(const blink::WebMediaStreamTrack& track, 63 void CreateNativeMediaStreamTrack(const blink::WebMediaStreamTrack& track,
69 MediaStreamDependencyFactory* factory) { 64 MediaStreamDependencyFactory* factory) {
70 DCHECK(!track.isNull() && !track.extraData()); 65 DCHECK(!track.isNull() && !track.extraData());
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 device.type == MEDIA_DEVICE_AUDIO_CAPTURE 266 device.type == MEDIA_DEVICE_AUDIO_CAPTURE
272 ? blink::WebSourceInfo::SourceKindAudio 267 ? blink::WebSourceInfo::SourceKindAudio
273 : blink::WebSourceInfo::SourceKindVideo, 268 : blink::WebSourceInfo::SourceKindVideo,
274 blink::WebString::fromUTF8(device.name), 269 blink::WebString::fromUTF8(device.name),
275 video_facing); 270 video_facing);
276 } 271 }
277 request_it->second.requestSucceeded(sourceInfos); 272 request_it->second.requestSucceeded(sourceInfos);
278 } 273 }
279 274
280 } // namespace content 275 } // namespace content
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/media/media_stream_dependency_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698