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
amComponent.h" | 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamCompo
nent.h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amDescriptor.h" | 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamDescr
iptor.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amSource.h" | 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamSourc
e.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 // TODO(hta): Unify implementations of these functions from MediaStreamCenter | 18 // TODO(hta): Unify implementations of these functions from MediaStreamCenter |
19 static webrtc::LocalMediaStreamInterface* GetLocalNativeMediaStream( | 19 static webrtc::LocalMediaStreamInterface* GetLocalNativeMediaStream( |
20 const WebKit::WebMediaStreamDescriptor& stream) { | 20 const WebKit::WebMediaStreamDescriptor& stream) { |
21 MediaStreamExtraData* extra_data = | 21 MediaStreamExtraData* extra_data = |
22 static_cast<MediaStreamExtraData*>(stream.extraData()); | 22 static_cast<MediaStreamExtraData*>(stream.extraData()); |
23 if (extra_data) | 23 if (extra_data) |
24 return extra_data->local_stream(); | 24 return extra_data->local_stream(); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 } | 118 } |
119 if (component.source().type() == WebKit::WebMediaStreamSource::TypeVideo) { | 119 if (component.source().type() == WebKit::WebMediaStreamSource::TypeVideo) { |
120 return GetLocalTrack<webrtc::VideoTracks>( | 120 return GetLocalTrack<webrtc::VideoTracks>( |
121 source_id, native_stream->video_tracks()); | 121 source_id, native_stream->video_tracks()); |
122 } | 122 } |
123 NOTIMPLEMENTED(); // We have an unknown type of media stream track. | 123 NOTIMPLEMENTED(); // We have an unknown type of media stream track. |
124 return NULL; | 124 return NULL; |
125 } | 125 } |
126 | 126 |
127 } // namespace content | 127 } // namespace content |
OLD | NEW |