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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Completes initialization of the demuxer. | 82 // Completes initialization of the demuxer. |
83 // | 83 // |
84 // The demuxer does not own |host| as it is guaranteed to outlive the | 84 // The demuxer does not own |host| as it is guaranteed to outlive the |
85 // lifetime of the demuxer. Don't delete it! |status_cb| must only be run | 85 // lifetime of the demuxer. Don't delete it! |status_cb| must only be run |
86 // after this method has returned. | 86 // after this method has returned. |
87 virtual void Initialize(DemuxerHost* host, | 87 virtual void Initialize(DemuxerHost* host, |
88 const PipelineStatusCB& status_cb, | 88 const PipelineStatusCB& status_cb, |
89 bool enable_text_tracks) = 0; | 89 bool enable_text_tracks) = 0; |
90 | 90 |
91 // Aborts any pending read operations that the demuxer is involved with; any | 91 // Aborts any pending read operations that the demuxer is involved with; any |
92 // read aborted will be aborted with a status of kAborted. | 92 // read aborted will be aborted with a status of kAborted. Future reads will |
| 93 // also be aborted until Seek() is called. |
93 virtual void AbortPendingReads() = 0; | 94 virtual void AbortPendingReads() = 0; |
94 | 95 |
95 // Indicates that a new Seek() call is on its way. Implementations may abort | 96 // Indicates that a new Seek() call is on its way. Implementations may abort |
96 // pending reads and future Read() calls may return kAborted until Seek() is | 97 // pending reads and future Read() calls may return kAborted until Seek() is |
97 // executed. |seek_time| is the presentation timestamp of the new Seek() call. | 98 // executed. |seek_time| is the presentation timestamp of the new Seek() call. |
98 // | 99 // |
99 // In actual use, this call occurs on the main thread while Seek() is called | 100 // In actual use, this call occurs on the main thread while Seek() is called |
100 // on the media thread. StartWaitingForSeek() can be used to synchronize the | 101 // on the media thread. StartWaitingForSeek() can be used to synchronize the |
101 // two. | 102 // two. |
102 // | 103 // |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 const std::vector<MediaTrack::Id>& track_ids, | 150 const std::vector<MediaTrack::Id>& track_ids, |
150 base::TimeDelta currTime) = 0; | 151 base::TimeDelta currTime) = 0; |
151 | 152 |
152 private: | 153 private: |
153 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 154 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
154 }; | 155 }; |
155 | 156 |
156 } // namespace media | 157 } // namespace media |
157 | 158 |
158 #endif // MEDIA_BASE_DEMUXER_H_ | 159 #endif // MEDIA_BASE_DEMUXER_H_ |
OLD | NEW |