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