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/message_loop_factory.h" | 8 #include "media/base/message_loop_factory.h" |
9 #include "media/base/pipeline.h" | 9 #include "media/base/pipeline.h" |
10 #include "media/filters/video_frame_generator.h" | 10 #include "media/filters/video_frame_generator.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 scoped_refptr<media::VideoDecoder> TestMediaStreamClient::GetVideoDecoder( | 39 scoped_refptr<media::VideoDecoder> TestMediaStreamClient::GetVideoDecoder( |
40 const GURL& url, media::MessageLoopFactory* message_loop_factory) { | 40 const GURL& url, media::MessageLoopFactory* message_loop_factory) { |
41 // This class is installed in a chain of possible VideoDecoder creators | 41 // This class is installed in a chain of possible VideoDecoder creators |
42 // which are called in order until one returns an object. | 42 // which are called in order until one returns an object. |
43 // Make sure we are dealing with a Mock MediaStream. If not, bail out. | 43 // Make sure we are dealing with a Mock MediaStream. If not, bail out. |
44 if (!IsMockMediaStreamWithVideo(url)) | 44 if (!IsMockMediaStreamWithVideo(url)) |
45 return NULL; | 45 return NULL; |
46 | 46 |
47 return new media::VideoFrameGenerator( | 47 return new media::VideoFrameGenerator( |
48 message_loop_factory->GetMessageLoopProxy("CaptureVideoDecoder").get(), | 48 message_loop_factory->GetMessageLoop( |
| 49 media::MessageLoopFactory::kVideoDecoder), |
49 gfx::Size(kVideoCaptureWidth, kVideoCaptureHeight), | 50 gfx::Size(kVideoCaptureWidth, kVideoCaptureHeight), |
50 base::TimeDelta::FromMilliseconds(kVideoCaptureFrameDurationMs)); | 51 base::TimeDelta::FromMilliseconds(kVideoCaptureFrameDurationMs)); |
51 } | 52 } |
52 | 53 |
53 } // namespace webkit_support | 54 } // namespace webkit_support |
OLD | NEW |