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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // Starts stopping this demuxer, executing the callback upon completion. | 75 // Starts stopping this demuxer, executing the callback upon completion. |
76 // | 76 // |
77 // After the callback completes the demuxer may be destroyed. It is illegal to | 77 // After the callback completes the demuxer may be destroyed. It is illegal to |
78 // call any method (including Stop()) after a demuxer has stopped. | 78 // call any method (including Stop()) after a demuxer has stopped. |
79 virtual void Stop(const base::Closure& callback) = 0; | 79 virtual void Stop(const base::Closure& callback) = 0; |
80 | 80 |
81 // Returns the first stream of the given stream type (which is not allowed | 81 // Returns the first stream of the given stream type (which is not allowed |
82 // to be DemuxerStream::TEXT), or NULL if that type of stream is not present. | 82 // to be DemuxerStream::TEXT), or NULL if that type of stream is not present. |
83 virtual DemuxerStream* GetStream(DemuxerStream::Type type) = 0; | 83 virtual DemuxerStream* GetStream(DemuxerStream::Type type) = 0; |
84 | 84 |
85 // Returns the starting time for the media file. | |
86 virtual base::TimeDelta GetStartTime() const = 0; | |
87 | |
88 // Returns Time represented by presentation timestamp 0. | 85 // Returns Time represented by presentation timestamp 0. |
89 // If the timstamps are not associated with a Time, then | 86 // If the timstamps are not associated with a Time, then |
90 // a null Time is returned. | 87 // a null Time is returned. |
91 virtual base::Time GetTimelineOffset() const = 0; | 88 virtual base::Time GetTimelineOffset() const = 0; |
92 | 89 |
93 // Returns liveness of the stream, i.e. whether it is recorded or live. | 90 // Returns liveness of the stream, i.e. whether it is recorded or live. |
94 virtual Liveness GetLiveness() const = 0; | 91 virtual Liveness GetLiveness() const = 0; |
95 | 92 |
96 private: | 93 private: |
97 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 94 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
98 }; | 95 }; |
99 | 96 |
100 } // namespace media | 97 } // namespace media |
101 | 98 |
102 #endif // MEDIA_BASE_DEMUXER_H_ | 99 #endif // MEDIA_BASE_DEMUXER_H_ |
OLD | NEW |