Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: media/base/demuxer.h

Issue 2267963002: Add support for cancellation of demuxer reads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix and add tests. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/data_source.h ('k') | media/base/media_log.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 kAborted.
93 virtual void AbortPendingReads() = 0;
94
91 // Indicates that a new Seek() call is on its way. Implementations may abort 95 // 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 96 // 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. 97 // executed. |seek_time| is the presentation timestamp of the new Seek() call.
94 // 98 //
95 // In actual use, this call occurs on the main thread while Seek() is called 99 // 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 100 // on the media thread. StartWaitingForSeek() can be used to synchronize the
97 // two. 101 // two.
98 // 102 //
99 // StartWaitingForSeek() MUST be called before Seek(). 103 // StartWaitingForSeek() MUST be called before Seek().
100 virtual void StartWaitingForSeek(base::TimeDelta seek_time) = 0; 104 virtual void StartWaitingForSeek(base::TimeDelta seek_time) = 0;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 const std::vector<MediaTrack::Id>& track_ids, 149 const std::vector<MediaTrack::Id>& track_ids,
146 base::TimeDelta currTime) = 0; 150 base::TimeDelta currTime) = 0;
147 151
148 private: 152 private:
149 DISALLOW_COPY_AND_ASSIGN(Demuxer); 153 DISALLOW_COPY_AND_ASSIGN(Demuxer);
150 }; 154 };
151 155
152 } // namespace media 156 } // namespace media
153 157
154 #endif // MEDIA_BASE_DEMUXER_H_ 158 #endif // MEDIA_BASE_DEMUXER_H_
OLDNEW
« no previous file with comments | « media/base/data_source.h ('k') | media/base/media_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698