| 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 |
| 28 static bool isTypeSupported( |
| 29 const std::string& type, |
| 30 const std::vector<std::string>& codecs); |
| 31 |
| 23 // WebKit::WebMediaSourceClient implementation. | 32 // WebKit::WebMediaSourceClient implementation. |
| 24 virtual AddStatus addSourceBuffer( | 33 virtual AddStatus addSourceBuffer( |
| 25 const WebKit::WebString& type, | 34 const WebKit::WebString& type, |
| 26 const WebKit::WebVector<WebKit::WebString>& codecs, | 35 const WebKit::WebVector<WebKit::WebString>& codecs, |
| 27 WebKit::WebSourceBuffer** source_buffer) OVERRIDE; | 36 WebKit::WebSourceBuffer** source_buffer) OVERRIDE; |
| 28 virtual double duration() OVERRIDE; | 37 virtual double duration() OVERRIDE; |
| 29 virtual void setDuration(double duration) OVERRIDE; | 38 virtual void setDuration(double duration) OVERRIDE; |
| 30 virtual void endOfStream(EndOfStreamStatus status) OVERRIDE; | 39 virtual void endOfStream(EndOfStreamStatus status) OVERRIDE; |
| 31 | 40 |
| 32 private: | 41 private: |
| 33 scoped_refptr<media::ChunkDemuxer> demuxer_; | 42 scoped_refptr<media::ChunkDemuxer> demuxer_; |
| 43 media::LogCB log_cb_; |
| 34 | 44 |
| 35 DISALLOW_COPY_AND_ASSIGN(WebMediaSourceClientImpl); | 45 DISALLOW_COPY_AND_ASSIGN(WebMediaSourceClientImpl); |
| 36 }; | 46 }; |
| 37 | 47 |
| 38 } // namespace webkit_media | 48 } // namespace webkit_media |
| 39 | 49 |
| 40 #endif // WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ | 50 #endif // WEBKIT_MEDIA_WEBMEDIASOURCECLIENT_IMPL_H_ |
| OLD | NEW |