OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/renderer/media/web_media_element_source_utils.h" |
| 6 |
| 7 #include "third_party/WebKit/public/platform/WebMediaPlayerSource.h" |
| 8 #include "third_party/WebKit/public/platform/WebMediaStream.h" |
| 9 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 blink::WebMediaStream GetWebMediaStreamFromWebMediaPlayerSource( |
| 14 const blink::WebMediaPlayerSource& source) { |
| 15 if (source.isMediaStream()) |
| 16 return source.getAsMediaStream(); |
| 17 |
| 18 if (source.isURL()) { |
| 19 return blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor( |
| 20 source.getAsURL()); |
| 21 } |
| 22 |
| 23 return blink::WebMediaStream(); |
| 24 } |
| 25 |
| 26 } // namespace content |
OLD | NEW |