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_WEBSOURCEBUFFER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBSOURCEBUFFER_IMPL_H_ |
6 #define WEBKIT_RENDERER_MEDIA_WEBSOURCEBUFFER_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBSOURCEBUFFER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "third_party/WebKit/public/web/WebSourceBuffer.h" | 12 #include "third_party/WebKit/public/web/WebSourceBuffer.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 WebSourceBufferImpl : public WebKit::WebSourceBuffer { | 20 class WebSourceBufferImpl : public WebKit::WebSourceBuffer { |
21 public: | 21 public: |
22 WebSourceBufferImpl(const std::string& id, media::ChunkDemuxer* demuxer); | 22 WebSourceBufferImpl(const std::string& id, media::ChunkDemuxer* demuxer); |
23 virtual ~WebSourceBufferImpl(); | 23 virtual ~WebSourceBufferImpl(); |
24 | 24 |
25 // WebKit::WebSourceBuffer implementation. | 25 // WebKit::WebSourceBuffer implementation. |
26 virtual WebKit::WebTimeRanges buffered() OVERRIDE; | 26 virtual WebKit::WebTimeRanges buffered() OVERRIDE; |
27 virtual void append(const unsigned char* data, unsigned length) OVERRIDE; | 27 virtual void append(const unsigned char* data, unsigned length) OVERRIDE; |
28 virtual void abort() OVERRIDE; | 28 virtual void abort() OVERRIDE; |
29 virtual bool setTimestampOffset(double offset) OVERRIDE; | 29 virtual bool setTimestampOffset(double offset) OVERRIDE; |
30 virtual void removedFromMediaSource() OVERRIDE; | 30 virtual void removedFromMediaSource() OVERRIDE; |
31 | 31 |
32 private: | 32 private: |
33 std::string id_; | 33 std::string id_; |
34 media::ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl. | 34 media::ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl. |
35 | 35 |
36 DISALLOW_COPY_AND_ASSIGN(WebSourceBufferImpl); | 36 DISALLOW_COPY_AND_ASSIGN(WebSourceBufferImpl); |
37 }; | 37 }; |
38 | 38 |
39 } // namespace webkit_media | 39 } // namespace content |
40 | 40 |
41 #endif // WEBKIT_RENDERER_MEDIA_WEBSOURCEBUFFER_IMPL_H_ | 41 #endif // CONTENT_RENDERER_MEDIA_WEBSOURCEBUFFER_IMPL_H_ |
OLD | NEW |