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

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

Issue 10803019: Chrome-side implementation of media source timestamp offset (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
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 // Sets a time |offset| in seconds to be applied to subsequent buffers
78 // appended to the source buffer assicated with |id|.
79 void TimestampOffset(const std::string& id, float offset);
80
81 // Clears a previously set timestamp offset.
82 void ClearTimestampOffset(const std::string& id);
83
77 // Signals an EndOfStream request. 84 // Signals an EndOfStream request.
78 // Returns false if called in an unexpected state or if there is a gap between 85 // Returns false if called in an unexpected state or if there is a gap between
79 // the current position and the end of the buffered data. 86 // the current position and the end of the buffered data.
80 bool EndOfStream(PipelineStatus status); 87 bool EndOfStream(PipelineStatus status);
81 void Shutdown(); 88 void Shutdown();
82 89
83 protected: 90 protected:
84 virtual ~ChunkDemuxer(); 91 virtual ~ChunkDemuxer();
85 92
86 private: 93 private:
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 std::string source_id_video_; 152 std::string source_id_video_;
146 153
147 base::TimeDelta start_time_; 154 base::TimeDelta start_time_;
148 155
149 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); 156 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer);
150 }; 157 };
151 158
152 } // namespace media 159 } // namespace media
153 160
154 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ 161 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698