OLD | NEW |
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_impl.h" | 5 #include "content/renderer/media/media_stream_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 DCHECK_EQ(devices.size(), webkit_tracks->size()); | 478 DCHECK_EQ(devices.size(), webkit_tracks->size()); |
479 | 479 |
480 for (size_t i = 0; i < devices.size(); ++i) { | 480 for (size_t i = 0; i < devices.size(); ++i) { |
481 blink::WebMediaStreamSource webkit_source; | 481 blink::WebMediaStreamSource webkit_source; |
482 InitializeSourceObject(devices[i], | 482 InitializeSourceObject(devices[i], |
483 blink::WebMediaStreamSource::TypeVideo, | 483 blink::WebMediaStreamSource::TypeVideo, |
484 constraints, | 484 constraints, |
485 request->frame, | 485 request->frame, |
486 &webkit_source); | 486 &webkit_source); |
487 (*webkit_tracks)[i].initialize(webkit_source); | 487 (*webkit_tracks)[i].initialize(webkit_source); |
488 (*webkit_tracks)[i].setExtraData(new MediaStreamVideoTrack( | 488 (*webkit_tracks)[i].setExtraData( |
489 dependency_factory_)); | 489 new MediaStreamVideoTrack( |
| 490 MediaStreamVideoSource::GetVideoSource(webkit_source), |
| 491 dependency_factory_)); |
490 request->StartTrack((*webkit_tracks)[i], constraints); | 492 request->StartTrack((*webkit_tracks)[i], constraints); |
491 } | 493 } |
492 } | 494 } |
493 | 495 |
494 void MediaStreamImpl::CreateAudioTracks( | 496 void MediaStreamImpl::CreateAudioTracks( |
495 const StreamDeviceInfoArray& devices, | 497 const StreamDeviceInfoArray& devices, |
496 const blink::WebMediaConstraints& constraints, | 498 const blink::WebMediaConstraints& constraints, |
497 blink::WebVector<blink::WebMediaStreamTrack>* webkit_tracks, | 499 blink::WebVector<blink::WebMediaStreamTrack>* webkit_tracks, |
498 UserMediaRequestInfo* request) { | 500 UserMediaRequestInfo* request) { |
499 DCHECK_EQ(devices.size(), webkit_tracks->size()); | 501 DCHECK_EQ(devices.size(), webkit_tracks->size()); |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 sources_.begin(); | 902 sources_.begin(); |
901 it != sources_.end(); ++it) { | 903 it != sources_.end(); ++it) { |
902 if (source.id() == it->id()) { | 904 if (source.id() == it->id()) { |
903 sources_.erase(it); | 905 sources_.erase(it); |
904 return; | 906 return; |
905 } | 907 } |
906 } | 908 } |
907 } | 909 } |
908 | 910 |
909 } // namespace content | 911 } // namespace content |
OLD | NEW |