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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // lifetime of the demuxer. Don't delete it! | 65 // lifetime of the demuxer. Don't delete it! |
66 virtual void Initialize(DemuxerHost* host, | 66 virtual void Initialize(DemuxerHost* host, |
67 const PipelineStatusCB& status_cb, | 67 const PipelineStatusCB& status_cb, |
68 bool enable_text_tracks) = 0; | 68 bool enable_text_tracks) = 0; |
69 | 69 |
70 // Carry out any actions required to seek to the given time, executing the | 70 // Carry out any actions required to seek to the given time, executing the |
71 // callback upon completion. | 71 // callback upon completion. |
72 virtual void Seek(base::TimeDelta time, | 72 virtual void Seek(base::TimeDelta time, |
73 const PipelineStatusCB& status_cb) = 0; | 73 const PipelineStatusCB& status_cb) = 0; |
74 | 74 |
75 // Starts stopping this demuxer, executing the callback upon completion. | 75 // Stops this demuxer. |
76 // | 76 // |
77 // After the callback completes the demuxer may be destroyed. It is illegal to | 77 // After this call the demuxer may be destroyed. It is illegal to call any |
78 // call any method (including Stop()) after a demuxer has stopped. | 78 // method (including Stop()) after a demuxer has stopped. |
79 virtual void Stop(const base::Closure& callback) = 0; | 79 virtual void Stop() = 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 Time represented by presentation timestamp 0. | 85 // Returns Time represented by presentation timestamp 0. |
86 // If the timstamps are not associated with a Time, then | 86 // If the timstamps are not associated with a Time, then |
87 // a null Time is returned. | 87 // a null Time is returned. |
88 virtual base::Time GetTimelineOffset() const = 0; | 88 virtual base::Time GetTimelineOffset() const = 0; |
89 | 89 |
90 // 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. |
91 virtual Liveness GetLiveness() const = 0; | 91 virtual Liveness GetLiveness() const = 0; |
92 | 92 |
93 private: | 93 private: |
94 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 94 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
95 }; | 95 }; |
96 | 96 |
97 } // namespace media | 97 } // namespace media |
98 | 98 |
99 #endif // MEDIA_BASE_DEMUXER_H_ | 99 #endif // MEDIA_BASE_DEMUXER_H_ |
OLD | NEW |