| 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_dependency_factory.h" | 5 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 | 721 |
| 722 void MediaStreamDependencyFactory::AddNativeTrackToBlinkTrack( | 722 void MediaStreamDependencyFactory::AddNativeTrackToBlinkTrack( |
| 723 webrtc::MediaStreamTrackInterface* native_track, | 723 webrtc::MediaStreamTrackInterface* native_track, |
| 724 const blink::WebMediaStreamTrack& webkit_track, | 724 const blink::WebMediaStreamTrack& webkit_track, |
| 725 bool is_local_track) { | 725 bool is_local_track) { |
| 726 DCHECK(!webkit_track.isNull() && !webkit_track.extraData()); | 726 DCHECK(!webkit_track.isNull() && !webkit_track.extraData()); |
| 727 blink::WebMediaStreamTrack track = webkit_track; | 727 blink::WebMediaStreamTrack track = webkit_track; |
| 728 | 728 |
| 729 if (track.source().type() == blink::WebMediaStreamSource::TypeVideo) { | 729 if (track.source().type() == blink::WebMediaStreamSource::TypeVideo) { |
| 730 DVLOG(1) << "AddNativeTrackToBlinkTrack() video"; | 730 DVLOG(1) << "AddNativeTrackToBlinkTrack() video"; |
| 731 track.setExtraData(new MediaStreamVideoTrack( | 731 track.setExtraData(new WebRtcMediaStreamVideoTrack( |
| 732 static_cast<webrtc::VideoTrackInterface*>(native_track))); | 732 static_cast<webrtc::VideoTrackInterface*>(native_track))); |
| 733 } else { | 733 } else { |
| 734 DVLOG(1) << "AddNativeTrackToBlinkTrack() audio"; | 734 DVLOG(1) << "AddNativeTrackToBlinkTrack() audio"; |
| 735 track.setExtraData( | 735 track.setExtraData( |
| 736 new MediaStreamTrack( | 736 new MediaStreamTrack( |
| 737 static_cast<webrtc::AudioTrackInterface*>(native_track), | 737 static_cast<webrtc::AudioTrackInterface*>(native_track), |
| 738 is_local_track)); | 738 is_local_track)); |
| 739 } | 739 } |
| 740 } | 740 } |
| 741 | 741 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 } | 779 } |
| 780 | 780 |
| 781 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 781 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
| 782 if (audio_device_) | 782 if (audio_device_) |
| 783 return; | 783 return; |
| 784 | 784 |
| 785 audio_device_ = new WebRtcAudioDeviceImpl(); | 785 audio_device_ = new WebRtcAudioDeviceImpl(); |
| 786 } | 786 } |
| 787 | 787 |
| 788 } // namespace content | 788 } // namespace content |
| OLD | NEW |