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

Side by Side Diff: media/base/stream_parser.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
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.h » ('j') | media/mp4/mp4_stream_parser.cc » ('J')
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_STREAM_PARSER_H_ 5 #ifndef MEDIA_BASE_STREAM_PARSER_H_
6 #define MEDIA_BASE_STREAM_PARSER_H_ 6 #define MEDIA_BASE_STREAM_PARSER_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Called when a seek occurs. This flushes the current parser state 79 // Called when a seek occurs. This flushes the current parser state
80 // and puts the parser in a state where it can receive data for the new seek 80 // and puts the parser in a state where it can receive data for the new seek
81 // point. 81 // point.
82 virtual void Flush() = 0; 82 virtual void Flush() = 0;
83 83
84 // Called when there is new data to parse. 84 // Called when there is new data to parse.
85 // 85 //
86 // Returns true if the parse succeeds. 86 // Returns true if the parse succeeds.
87 virtual bool Parse(const uint8* buf, int size) = 0; 87 virtual bool Parse(const uint8* buf, int size) = 0;
88 88
89 // Gives the parser a time offset to apply to the buffers it parsers,
90 // beginning at the next media segment.
91 // First parameter - The time offset.
92 virtual void SetTimestampOffset(base::TimeDelta offset) = 0;
93
94 // Called to clear the offset set from a call SetTimestampOffset(). Does
95 // nothing if SetTimestampOffset() was never called before.
96 virtual void ClearTimestampOffset() = 0;
97
89 private: 98 private:
90 DISALLOW_COPY_AND_ASSIGN(StreamParser); 99 DISALLOW_COPY_AND_ASSIGN(StreamParser);
91 }; 100 };
92 101
93 } // namespace media 102 } // namespace media
94 103
95 #endif // MEDIA_BASE_STREAM_PARSER_H_ 104 #endif // MEDIA_BASE_STREAM_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/chunk_demuxer.h » ('j') | media/mp4/mp4_stream_parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698