| 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/peer_connection_handler_base.h" | 5 #include "content/renderer/media/peer_connection_handler_base.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "content/renderer/media/media_stream_dependency_factory.h" | 9 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 10 #include "content/renderer/media/media_stream_extra_data.h" | 10 #include "content/renderer/media/media_stream_extra_data.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amDescriptor.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amDescriptor.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amSource.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amSource.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 14 | 14 |
| 15 static webrtc::LocalMediaStreamInterface* GetLocalNativeMediaStream( | 15 static webrtc::LocalMediaStreamInterface* GetLocalNativeMediaStream( |
| 16 const WebKit::WebMediaStreamDescriptor& stream) { | 16 const WebKit::WebMediaStreamDescriptor& stream) { |
| 17 MediaStreamExtraData* extra_data = | 17 content::MediaStreamExtraData* extra_data = |
| 18 static_cast<MediaStreamExtraData*>(stream.extraData()); | 18 static_cast<content::MediaStreamExtraData*>(stream.extraData()); |
| 19 if (extra_data) | 19 if (extra_data) |
| 20 return extra_data->local_stream(); | 20 return extra_data->local_stream(); |
| 21 return NULL; | 21 return NULL; |
| 22 } | 22 } |
| 23 | 23 |
| 24 PeerConnectionHandlerBase::PeerConnectionHandlerBase( | 24 PeerConnectionHandlerBase::PeerConnectionHandlerBase( |
| 25 MediaStreamDependencyFactory* dependency_factory) | 25 MediaStreamDependencyFactory* dependency_factory) |
| 26 : dependency_factory_(dependency_factory), | 26 : dependency_factory_(dependency_factory), |
| 27 message_loop_proxy_(base::MessageLoopProxy::current()) { | 27 message_loop_proxy_(base::MessageLoopProxy::current()) { |
| 28 } | 28 } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 webrtc::VideoTrackInterface* video_track = video_tracks->at(i); | 84 webrtc::VideoTrackInterface* video_track = video_tracks->at(i); |
| 85 DCHECK(video_track); | 85 DCHECK(video_track); |
| 86 video_source_vector[i].initialize( | 86 video_source_vector[i].initialize( |
| 87 UTF8ToUTF16(video_track->label()), | 87 UTF8ToUTF16(video_track->label()), |
| 88 WebKit::WebMediaStreamSource::TypeVideo, | 88 WebKit::WebMediaStreamSource::TypeVideo, |
| 89 UTF8ToUTF16(video_track->label())); | 89 UTF8ToUTF16(video_track->label())); |
| 90 } | 90 } |
| 91 WebKit::WebMediaStreamDescriptor descriptor; | 91 WebKit::WebMediaStreamDescriptor descriptor; |
| 92 descriptor.initialize(UTF8ToUTF16(stream->label()), | 92 descriptor.initialize(UTF8ToUTF16(stream->label()), |
| 93 audio_source_vector, video_source_vector); | 93 audio_source_vector, video_source_vector); |
| 94 descriptor.setExtraData(new MediaStreamExtraData(stream)); | 94 descriptor.setExtraData(new content::MediaStreamExtraData(stream)); |
| 95 return descriptor; | 95 return descriptor; |
| 96 } | 96 } |
| OLD | NEW |