| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/shell/renderer/layout_test/test_media_stream_renderer_factory.
h" | 5 #include "content/shell/renderer/layout_test/test_media_stream_renderer_factory.
h" |
| 6 | 6 |
| 7 #include "content/shell/renderer/layout_test/test_media_stream_video_renderer.h" | 7 #include "content/shell/renderer/layout_test/test_media_stream_video_renderer.h" |
| 8 #include "media/media_features.h" |
| 8 #include "third_party/WebKit/public/platform/WebMediaStream.h" | 9 #include "third_party/WebKit/public/platform/WebMediaStream.h" |
| 9 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" | 10 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" |
| 10 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" | 11 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" |
| 11 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 12 | 13 |
| 13 using namespace blink; | 14 using namespace blink; |
| 14 | 15 |
| 15 namespace { | 16 namespace { |
| 16 | 17 |
| 17 static const int kVideoCaptureWidth = 352; | 18 static const int kVideoCaptureWidth = 352; |
| 18 static const int kVideoCaptureHeight = 288; | 19 static const int kVideoCaptureHeight = 288; |
| 19 static const int kVideoCaptureFrameDurationMs = 33; | 20 static const int kVideoCaptureFrameDurationMs = 33; |
| 20 | 21 |
| 21 bool IsMockMediaStreamWithVideo(const WebMediaStream& web_stream) { | 22 bool IsMockMediaStreamWithVideo(const WebMediaStream& web_stream) { |
| 22 #if ENABLE_WEBRTC | 23 #if BUILDFLAG(ENABLE_WEBRTC) |
| 23 if (web_stream.isNull()) | 24 if (web_stream.isNull()) |
| 24 return false; | 25 return false; |
| 25 WebVector<WebMediaStreamTrack> video_tracks; | 26 WebVector<WebMediaStreamTrack> video_tracks; |
| 26 web_stream.videoTracks(video_tracks); | 27 web_stream.videoTracks(video_tracks); |
| 27 return video_tracks.size() > 0; | 28 return video_tracks.size() > 0; |
| 28 #else | 29 #else |
| 29 return false; | 30 return false; |
| 30 #endif | 31 #endif |
| 31 } | 32 } |
| 32 | 33 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 60 scoped_refptr<MediaStreamAudioRenderer> | 61 scoped_refptr<MediaStreamAudioRenderer> |
| 61 TestMediaStreamRendererFactory::GetAudioRenderer( | 62 TestMediaStreamRendererFactory::GetAudioRenderer( |
| 62 const blink::WebMediaStream& web_stream, | 63 const blink::WebMediaStream& web_stream, |
| 63 int render_frame_id, | 64 int render_frame_id, |
| 64 const std::string& device_id, | 65 const std::string& device_id, |
| 65 const url::Origin& security_origin) { | 66 const url::Origin& security_origin) { |
| 66 return NULL; | 67 return NULL; |
| 67 } | 68 } |
| 68 | 69 |
| 69 } // namespace content | 70 } // namespace content |
| OLD | NEW |