Chromium Code Reviews| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 | 81 |
| 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 | |
| 92 // read aborted will be aborted with a status of kOk and an EOS buffer to | |
|
wolenetz
2016/08/24 23:46:55
Why not re-use kAborted? ISTM even with this patch
DaleCurtis
2016/08/24 23:49:41
Good point, I think this can just be kAborted with
wolenetz
2016/08/24 23:54:18
SGTM. I'll look again at this in the morning. So f
| |
| 93 // ensure that the process is non fatal to receiving clients. | |
| 94 virtual void AbortPendingReads() = 0; | |
| 95 | |
| 91 // 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 |
| 92 // 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 |
| 93 // 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. |
| 94 // | 99 // |
| 95 // 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 |
| 96 // on the media thread. StartWaitingForSeek() can be used to synchronize the | 101 // on the media thread. StartWaitingForSeek() can be used to synchronize the |
| 97 // two. | 102 // two. |
| 98 // | 103 // |
| 99 // StartWaitingForSeek() MUST be called before Seek(). | 104 // StartWaitingForSeek() MUST be called before Seek(). |
| 100 virtual void StartWaitingForSeek(base::TimeDelta seek_time) = 0; | 105 virtual void StartWaitingForSeek(base::TimeDelta seek_time) = 0; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 145 const std::vector<MediaTrack::Id>& track_ids, | 150 const std::vector<MediaTrack::Id>& track_ids, |
| 146 base::TimeDelta currTime) = 0; | 151 base::TimeDelta currTime) = 0; |
| 147 | 152 |
| 148 private: | 153 private: |
| 149 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 154 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
| 150 }; | 155 }; |
| 151 | 156 |
| 152 } // namespace media | 157 } // namespace media |
| 153 | 158 |
| 154 #endif // MEDIA_BASE_DEMUXER_H_ | 159 #endif // MEDIA_BASE_DEMUXER_H_ |
| OLD | NEW |