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/user_media_client_impl.h" | 5 #include "content/renderer/media/user_media_client_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/hash.h" | 9 #include "base/hash.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 weak_factory_.GetWeakPtr()), | 573 weak_factory_.GetWeakPtr()), |
574 dependency_factory_)); | 574 dependency_factory_)); |
575 webkit_source->setExtraData(audio_source); | 575 webkit_source->setExtraData(audio_source); |
576 } | 576 } |
577 local_sources_.push_back(*webkit_source); | 577 local_sources_.push_back(*webkit_source); |
578 } | 578 } |
579 | 579 |
580 MediaStreamVideoSource* UserMediaClientImpl::CreateVideoSource( | 580 MediaStreamVideoSource* UserMediaClientImpl::CreateVideoSource( |
581 const StreamDeviceInfo& device, | 581 const StreamDeviceInfo& device, |
582 const MediaStreamSource::SourceStoppedCallback& stop_callback) { | 582 const MediaStreamSource::SourceStoppedCallback& stop_callback) { |
583 return new content::MediaStreamVideoCapturerSource( | 583 content::MediaStreamVideoCapturerSource* ret = |
584 device, | 584 new content::MediaStreamVideoCapturerSource( |
585 stop_callback, | 585 stop_callback, |
586 scoped_ptr<VideoCapturerDelegate>(new VideoCapturerDelegate(device))); | 586 make_scoped_ptr(new VideoCapturerDelegate(device))); |
| 587 ret->SetDeviceInfo(device); |
| 588 return ret; |
587 } | 589 } |
588 | 590 |
589 void UserMediaClientImpl::CreateVideoTracks( | 591 void UserMediaClientImpl::CreateVideoTracks( |
590 const StreamDeviceInfoArray& devices, | 592 const StreamDeviceInfoArray& devices, |
591 const blink::WebMediaConstraints& constraints, | 593 const blink::WebMediaConstraints& constraints, |
592 blink::WebVector<blink::WebMediaStreamTrack>* webkit_tracks, | 594 blink::WebVector<blink::WebMediaStreamTrack>* webkit_tracks, |
593 UserMediaRequestInfo* request) { | 595 UserMediaRequestInfo* request) { |
594 DCHECK_EQ(devices.size(), webkit_tracks->size()); | 596 DCHECK_EQ(devices.size(), webkit_tracks->size()); |
595 | 597 |
596 for (size_t i = 0; i < devices.size(); ++i) { | 598 for (size_t i = 0; i < devices.size(); ++i) { |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 return; | 1056 return; |
1055 } | 1057 } |
1056 } | 1058 } |
1057 } | 1059 } |
1058 | 1060 |
1059 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { | 1061 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { |
1060 return !sources_waiting_for_callback_.empty(); | 1062 return !sources_waiting_for_callback_.empty(); |
1061 } | 1063 } |
1062 | 1064 |
1063 } // namespace content | 1065 } // namespace content |
OLD | NEW |