| 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 "webkit/support/test_media_stream_client.h" | 5 #include "webkit/support/test_media_stream_client.h" |
| 6 | 6 |
| 7 #include "googleurl/src/gurl.h" | 7 #include "googleurl/src/gurl.h" |
| 8 #include "media/base/pipeline.h" | 8 #include "media/base/pipeline.h" |
| 9 #include "media/filters/video_frame_generator.h" | 9 #include "media/filters/video_frame_generator.h" |
| 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamCompo
nent.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStream.h" |
| 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamDescr
iptor.h" | 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStreamTrack
.h" |
| 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h" | 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaStreamRegistr
y.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaStreamRegistr
y.h" |
| 14 #include "webkit/media/media_stream_audio_renderer.h" | 14 #include "webkit/media/media_stream_audio_renderer.h" |
| 15 #include "webkit/media/simple_video_frame_provider.h" | 15 #include "webkit/media/simple_video_frame_provider.h" |
| 16 | 16 |
| 17 using namespace WebKit; | 17 using namespace WebKit; |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 static const int kVideoCaptureWidth = 352; | 21 static const int kVideoCaptureWidth = 352; |
| 22 static const int kVideoCaptureHeight = 288; | 22 static const int kVideoCaptureHeight = 288; |
| 23 static const int kVideoCaptureFrameDurationMs = 33; | 23 static const int kVideoCaptureFrameDurationMs = 33; |
| 24 | 24 |
| 25 bool IsMockMediaStreamWithVideo(const WebURL& url) { | 25 bool IsMockMediaStreamWithVideo(const WebURL& url) { |
| 26 WebMediaStreamDescriptor descriptor( | 26 WebMediaStream descriptor( |
| 27 WebMediaStreamRegistry::lookupMediaStreamDescriptor(url)); | 27 WebMediaStreamRegistry::lookupMediaStreamDescriptor(url)); |
| 28 if (descriptor.isNull()) | 28 if (descriptor.isNull()) |
| 29 return false; | 29 return false; |
| 30 WebVector<WebMediaStreamComponent> videoSources; | 30 WebVector<WebMediaStreamTrack> videoSources; |
| 31 descriptor.videoSources(videoSources); | 31 descriptor.videoSources(videoSources); |
| 32 return videoSources.size() > 0; | 32 return videoSources.size() > 0; |
| 33 } | 33 } |
| 34 | 34 |
| 35 } // namespace | 35 } // namespace |
| 36 | 36 |
| 37 namespace webkit_support { | 37 namespace webkit_support { |
| 38 | 38 |
| 39 TestMediaStreamClient::TestMediaStreamClient() {} | 39 TestMediaStreamClient::TestMediaStreamClient() {} |
| 40 | 40 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 gfx::Size(kVideoCaptureWidth, kVideoCaptureHeight), | 73 gfx::Size(kVideoCaptureWidth, kVideoCaptureHeight), |
| 74 base::TimeDelta::FromMilliseconds(kVideoCaptureFrameDurationMs)); | 74 base::TimeDelta::FromMilliseconds(kVideoCaptureFrameDurationMs)); |
| 75 } | 75 } |
| 76 | 76 |
| 77 scoped_refptr<webkit_media::MediaStreamAudioRenderer> | 77 scoped_refptr<webkit_media::MediaStreamAudioRenderer> |
| 78 TestMediaStreamClient::GetAudioRenderer(const GURL& url) { | 78 TestMediaStreamClient::GetAudioRenderer(const GURL& url) { |
| 79 return NULL; | 79 return NULL; |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace webkit_support | 82 } // namespace webkit_support |
| OLD | NEW |