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

Side by Side Diff: media/filters/chunk_demuxer.h

Issue 10879056: Support setting an explicit duration on MediaSource objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: response to CR Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.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_FILTERS_CHUNK_DEMUXER_H_ 5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_
6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ 6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 Ranges<base::TimeDelta> GetBufferedRanges(const std::string& id) const; 67 Ranges<base::TimeDelta> GetBufferedRanges(const std::string& id) const;
68 68
69 // Appends media data to the source buffer associated with |id|. Returns 69 // Appends media data to the source buffer associated with |id|. Returns
70 // false if this method is called in an invalid state. 70 // false if this method is called in an invalid state.
71 bool AppendData(const std::string& id, const uint8* data, size_t length); 71 bool AppendData(const std::string& id, const uint8* data, size_t length);
72 72
73 // Aborts parsing the current segment and reset the parser to a state where 73 // Aborts parsing the current segment and reset the parser to a state where
74 // it can accept a new segment. 74 // it can accept a new segment.
75 void Abort(const std::string& id); 75 void Abort(const std::string& id);
76 76
77 // Notifies the demuxer that the duration of the media has changed to
78 // |duration|.
79 void SetDuration(base::TimeDelta duration);
80
77 // Sets a time |offset| to be applied to subsequent buffers appended to the 81 // Sets a time |offset| to be applied to subsequent buffers appended to the
78 // source buffer assicated with |id|. Returns true if the offset is set 82 // source buffer assicated with |id|. Returns true if the offset is set
79 // properly, false if the offset cannot be applied because we're in the 83 // properly, false if the offset cannot be applied because we're in the
80 // middle of parsing a media segment. 84 // middle of parsing a media segment.
81 bool SetTimestampOffset(const std::string& id, base::TimeDelta offset); 85 bool SetTimestampOffset(const std::string& id, base::TimeDelta offset);
82 86
83 // Signals an EndOfStream request. 87 // Signals an EndOfStream request.
84 // Returns false if called in an unexpected state or if there is a gap between 88 // Returns false if called in an unexpected state or if there is a gap between
85 // the current position and the end of the buffered data. 89 // the current position and the end of the buffered data.
86 bool EndOfStream(PipelineStatus status); 90 bool EndOfStream(PipelineStatus status);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // removed with RemoveID() but can not be re-added (yet). 185 // removed with RemoveID() but can not be re-added (yet).
182 std::string source_id_audio_; 186 std::string source_id_audio_;
183 std::string source_id_video_; 187 std::string source_id_video_;
184 188
185 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); 189 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer);
186 }; 190 };
187 191
188 } // namespace media 192 } // namespace media
189 193
190 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ 194 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698