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 CONTENT_RENDERER_MEDIA_WEBMEDIASOURCE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIASOURCE_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIASOURCE_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIASOURCE_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/platform/WebMediaSource.h" | 12 #include "third_party/WebKit/public/platform/WebMediaSource.h" |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 class ChunkDemuxer; | 15 class ChunkDemuxer; |
16 } | 16 } |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 class WebMediaSourceImpl : public blink::WebMediaSource { | 20 class WebMediaSourceImpl : public blink::WebMediaSource { |
21 public: | 21 public: |
22 WebMediaSourceImpl(media::ChunkDemuxer* demuxer, media::LogCB log_cb); | 22 WebMediaSourceImpl(media::ChunkDemuxer* demuxer, media::LogCB log_cb); |
23 virtual ~WebMediaSourceImpl(); | 23 virtual ~WebMediaSourceImpl(); |
24 | 24 |
25 // blink::WebMediaSource implementation. | 25 // blink::WebMediaSource implementation. |
26 virtual AddStatus addSourceBuffer( | 26 virtual AddStatus addSourceBuffer( |
27 const blink::WebString& type, | 27 const blink::WebString& type, |
28 const blink::WebVector<blink::WebString>& codecs, | 28 const blink::WebVector<blink::WebString>& codecs, |
29 blink::WebSourceBuffer** source_buffer) OVERRIDE; | 29 const bool use_legacy_frame_processor, |
30 virtual double duration() OVERRIDE; | 30 blink::WebSourceBuffer** source_buffer); |
31 virtual void setDuration(double duration) OVERRIDE; | 31 virtual double duration(); |
32 virtual void markEndOfStream(EndOfStreamStatus status) OVERRIDE; | 32 virtual void setDuration(double duration); |
33 virtual void unmarkEndOfStream() OVERRIDE; | 33 virtual void markEndOfStream(EndOfStreamStatus status); |
| 34 virtual void unmarkEndOfStream(); |
| 35 |
| 36 // TODO(wolenetz): Remove once Blink uses |use_legacy_frame_processor| |
| 37 // interface, above, to select the frame processor. See |
| 38 // http://crbug.com/249422. |
| 39 virtual AddStatus addSourceBuffer( |
| 40 const blink::WebString& type, |
| 41 const blink::WebVector<blink::WebString>& codecs, |
| 42 blink::WebSourceBuffer** source_buffer); |
34 | 43 |
35 private: | 44 private: |
36 media::ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl. | 45 media::ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl. |
37 media::LogCB log_cb_; | 46 media::LogCB log_cb_; |
38 | 47 |
39 DISALLOW_COPY_AND_ASSIGN(WebMediaSourceImpl); | 48 DISALLOW_COPY_AND_ASSIGN(WebMediaSourceImpl); |
40 }; | 49 }; |
41 | 50 |
42 } // namespace content | 51 } // namespace content |
43 | 52 |
44 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIASOURCE_IMPL_H_ | 53 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIASOURCE_IMPL_H_ |
OLD | NEW |