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