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