OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 MEDIA_BASE_DEMUXER_STREAM_H_ | 5 #ifndef MEDIA_BASE_DEMUXER_STREAM_H_ |
6 #define MEDIA_BASE_DEMUXER_STREAM_H_ | 6 #define MEDIA_BASE_DEMUXER_STREAM_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
11 #include "media/base/ranges.h" | |
12 | 11 |
13 namespace media { | 12 namespace media { |
14 | 13 |
15 class AudioDecoderConfig; | 14 class AudioDecoderConfig; |
16 class DecoderBuffer; | 15 class DecoderBuffer; |
17 class VideoDecoderConfig; | 16 class VideoDecoderConfig; |
18 | 17 |
19 class MEDIA_EXPORT DemuxerStream | 18 class MEDIA_EXPORT DemuxerStream |
20 : public base::RefCountedThreadSafe<DemuxerStream> { | 19 : public base::RefCountedThreadSafe<DemuxerStream> { |
21 public: | 20 public: |
(...skipping 13 matching lines...) Expand all Loading... |
35 virtual void Read(const ReadCB& read_cb) = 0; | 34 virtual void Read(const ReadCB& read_cb) = 0; |
36 | 35 |
37 // Returns the audio decoder configuration. It is an error to call this method | 36 // Returns the audio decoder configuration. It is an error to call this method |
38 // if type() != AUDIO. | 37 // if type() != AUDIO. |
39 virtual const AudioDecoderConfig& audio_decoder_config() = 0; | 38 virtual const AudioDecoderConfig& audio_decoder_config() = 0; |
40 | 39 |
41 // Returns the video decoder configuration. It is an error to call this method | 40 // Returns the video decoder configuration. It is an error to call this method |
42 // if type() != VIDEO. | 41 // if type() != VIDEO. |
43 virtual const VideoDecoderConfig& video_decoder_config() = 0; | 42 virtual const VideoDecoderConfig& video_decoder_config() = 0; |
44 | 43 |
45 // Returns time ranges known to have been seen by this stream. | |
46 virtual Ranges<base::TimeDelta> GetBufferedRanges() = 0; | |
47 | |
48 // Returns the type of stream. | 44 // Returns the type of stream. |
49 virtual Type type() = 0; | 45 virtual Type type() = 0; |
50 | 46 |
51 virtual void EnableBitstreamConverter() = 0; | 47 virtual void EnableBitstreamConverter() = 0; |
52 | 48 |
53 protected: | 49 protected: |
54 friend class base::RefCountedThreadSafe<DemuxerStream>; | 50 friend class base::RefCountedThreadSafe<DemuxerStream>; |
55 virtual ~DemuxerStream(); | 51 virtual ~DemuxerStream(); |
56 }; | 52 }; |
57 | 53 |
58 } // namespace media | 54 } // namespace media |
59 | 55 |
60 #endif // MEDIA_BASE_DEMUXER_STREAM_H_ | 56 #endif // MEDIA_BASE_DEMUXER_STREAM_H_ |
OLD | NEW |