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_H_ | 5 #ifndef MEDIA_BASE_DEMUXER_H_ |
6 #define MEDIA_BASE_DEMUXER_H_ | 6 #define MEDIA_BASE_DEMUXER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "media/base/data_source.h" | 10 #include "media/base/data_source.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // | 57 // |
58 // TODO(acolwell): Change to generic DisableStream(DemuxerStream::Type). | 58 // TODO(acolwell): Change to generic DisableStream(DemuxerStream::Type). |
59 virtual void OnAudioRendererDisabled(); | 59 virtual void OnAudioRendererDisabled(); |
60 | 60 |
61 // Returns the given stream type, or NULL if that type is not present. | 61 // Returns the given stream type, or NULL if that type is not present. |
62 virtual scoped_refptr<DemuxerStream> GetStream(DemuxerStream::Type type) = 0; | 62 virtual scoped_refptr<DemuxerStream> GetStream(DemuxerStream::Type type) = 0; |
63 | 63 |
64 // Returns the starting time for the media file. | 64 // Returns the starting time for the media file. |
65 virtual base::TimeDelta GetStartTime() const = 0; | 65 virtual base::TimeDelta GetStartTime() const = 0; |
66 | 66 |
67 // Returns the content bitrate. May be obtained from container or | |
68 // approximated. Returns 0 if it is unknown. | |
69 virtual int GetBitrate() = 0; | |
70 | |
71 protected: | 67 protected: |
72 friend class base::RefCountedThreadSafe<Demuxer>; | 68 friend class base::RefCountedThreadSafe<Demuxer>; |
73 virtual ~Demuxer(); | 69 virtual ~Demuxer(); |
74 | 70 |
75 private: | 71 private: |
76 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 72 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
77 }; | 73 }; |
78 | 74 |
79 } // namespace media | 75 } // namespace media |
80 | 76 |
81 #endif // MEDIA_BASE_DEMUXER_H_ | 77 #endif // MEDIA_BASE_DEMUXER_H_ |
OLD | NEW |