OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/public/renderer/media_stream_api.h" | 5 #include "content/public/renderer/media_stream_api.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "content/renderer/media/media_stream.h" | |
11 #include "content/renderer/media/media_stream_audio_source.h" | 12 #include "content/renderer/media/media_stream_audio_source.h" |
12 #include "content/renderer/media/media_stream_video_capturer_source.h" | 13 #include "content/renderer/media/media_stream_video_capturer_source.h" |
13 #include "content/renderer/media/media_stream_video_track.h" | 14 #include "content/renderer/media/media_stream_video_track.h" |
14 #include "content/renderer/render_thread_impl.h" | 15 #include "content/renderer/render_thread_impl.h" |
15 #include "third_party/WebKit/public/platform/WebMediaStream.h" | 16 #include "third_party/WebKit/public/platform/WebMediaStream.h" |
16 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" | 17 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" |
17 #include "third_party/WebKit/public/platform/WebURL.h" | 18 #include "third_party/WebKit/public/platform/WebURL.h" |
18 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" | 19 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" |
19 #include "url/gurl.h" | 20 #include "url/gurl.h" |
20 | 21 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 | 123 |
123 blink::WebMediaStreamTrack web_media_audio_track; | 124 blink::WebMediaStreamTrack web_media_audio_track; |
124 web_media_audio_track.initialize(webkit_source); | 125 web_media_audio_track.initialize(webkit_source); |
125 RenderThreadImpl::current()->GetPeerConnectionDependencyFactory()-> | 126 RenderThreadImpl::current()->GetPeerConnectionDependencyFactory()-> |
126 CreateLocalAudioTrack(web_media_audio_track); | 127 CreateLocalAudioTrack(web_media_audio_track); |
127 | 128 |
128 web_stream->addTrack(web_media_audio_track); | 129 web_stream->addTrack(web_media_audio_track); |
129 return true; | 130 return true; |
130 } | 131 } |
131 | 132 |
133 CONTENT_EXPORT void AddMediaStreamTowebMediaStream( | |
perkj_chrome
2016/01/07 09:18:00
? This seems wrong. In production , this happens w
mcasas
2016/01/08 00:14:12
Yes, this is just for content_shell and is only in
| |
134 blink::WebMediaStream* web_stream) { | |
135 web_stream->setExtraData(new content::MediaStream()); | |
136 } | |
137 | |
132 } // namespace content | 138 } // namespace content |
OLD | NEW |