OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ | 5 #ifndef WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ |
6 #define WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ | 6 #define WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "media/base/media_log.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaSourceClient.
h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaSourceClient.
h" |
10 | 11 |
11 namespace media { | 12 namespace media { |
12 class ChunkDemuxer; | 13 class ChunkDemuxer; |
13 } | 14 } |
14 | 15 |
15 namespace webkit_media { | 16 namespace webkit_media { |
16 | 17 |
17 class WebMediaSourceClientImpl : public WebKit::WebMediaSourceClient { | 18 class WebMediaSourceClientImpl : public WebKit::WebMediaSourceClient { |
18 public: | 19 public: |
19 explicit WebMediaSourceClientImpl( | 20 explicit WebMediaSourceClientImpl( |
20 const scoped_refptr<media::ChunkDemuxer>& demuxer); | 21 const scoped_refptr<media::ChunkDemuxer>& demuxer, |
| 22 media::LogCB log_cb); |
21 virtual ~WebMediaSourceClientImpl(); | 23 virtual ~WebMediaSourceClientImpl(); |
22 | 24 |
| 25 static bool isTypeSupported( |
| 26 const WebKit::WebString& type, |
| 27 const WebKit::WebVector<WebKit::WebString>& codecs); |
| 28 |
23 // WebKit::WebMediaSourceClient implementation. | 29 // WebKit::WebMediaSourceClient implementation. |
24 virtual AddStatus addSourceBuffer( | 30 virtual AddStatus addSourceBuffer( |
25 const WebKit::WebString& type, | 31 const WebKit::WebString& type, |
26 const WebKit::WebVector<WebKit::WebString>& codecs, | 32 const WebKit::WebVector<WebKit::WebString>& codecs, |
27 WebKit::WebSourceBuffer** source_buffer) OVERRIDE; | 33 WebKit::WebSourceBuffer** source_buffer) OVERRIDE; |
28 virtual double duration() OVERRIDE; | 34 virtual double duration() OVERRIDE; |
29 virtual void setDuration(double duration) OVERRIDE; | 35 virtual void setDuration(double duration) OVERRIDE; |
30 virtual void endOfStream(EndOfStreamStatus status) OVERRIDE; | 36 virtual void endOfStream(EndOfStreamStatus status) OVERRIDE; |
31 | 37 |
32 private: | 38 private: |
33 scoped_refptr<media::ChunkDemuxer> demuxer_; | 39 scoped_refptr<media::ChunkDemuxer> demuxer_; |
| 40 media::LogCB log_cb_; |
34 | 41 |
35 DISALLOW_COPY_AND_ASSIGN(WebMediaSourceClientImpl); | 42 DISALLOW_COPY_AND_ASSIGN(WebMediaSourceClientImpl); |
36 }; | 43 }; |
37 | 44 |
38 } // namespace webkit_media | 45 } // namespace webkit_media |
39 | 46 |
40 #endif // WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ | 47 #endif // WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ |
OLD | NEW |