OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // TestMediaStreamClient is an implementation of webkit_media::MediaStreamClient |
| 6 // and used with WebKit::WebUserMediaClientMock to provide corresponding video |
| 7 // decoder to media pipeline. |
| 8 |
| 9 #ifndef WEBKIT_SUPPORT_TEST_MEDIA_STREAM_CLIENT_H_ |
| 10 #define WEBKIT_SUPPORT_TEST_MEDIA_STREAM_CLIENT_H_ |
| 11 |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
| 13 #include "webkit/media/media_stream_client.h" |
| 14 |
| 15 namespace webkit_support { |
| 16 |
| 17 class MediaStreamUtil { |
| 18 public: |
| 19 virtual bool IsMockStream(const WebKit::WebURL& url) = 0; |
| 20 }; |
| 21 |
| 22 class TestMediaStreamClient : public webkit_media::MediaStreamClient { |
| 23 public: |
| 24 explicit TestMediaStreamClient(MediaStreamUtil* media_stream_util); |
| 25 virtual ~TestMediaStreamClient() {} |
| 26 |
| 27 // Implement webkit_media::MediaStreamClient. |
| 28 virtual scoped_refptr<media::VideoDecoder> GetVideoDecoder( |
| 29 const GURL& url, |
| 30 media::MessageLoopFactory* message_loop_factory) OVERRIDE; |
| 31 |
| 32 private: |
| 33 MediaStreamUtil* media_stream_util_; |
| 34 }; |
| 35 |
| 36 } // namespace webkit_support |
| 37 |
| 38 #endif // WEBKIT_SUPPORT_TEST_MEDIA_STREAM_CLIENT_H_ |
OLD | NEW |