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_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 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // start time, and duration. If |ignore_text_track| is true, then no text | 118 // start time, and duration. If |ignore_text_track| is true, then no text |
119 // buffers should be passed later by the parser to |new_buffers_cb|. | 119 // buffers should be passed later by the parser to |new_buffers_cb|. |
120 virtual void Init( | 120 virtual void Init( |
121 const InitCB& init_cb, | 121 const InitCB& init_cb, |
122 const NewConfigCB& config_cb, | 122 const NewConfigCB& config_cb, |
123 const NewBuffersCB& new_buffers_cb, | 123 const NewBuffersCB& new_buffers_cb, |
124 bool ignore_text_track, | 124 bool ignore_text_track, |
125 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, | 125 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, |
126 const NewMediaSegmentCB& new_segment_cb, | 126 const NewMediaSegmentCB& new_segment_cb, |
127 const base::Closure& end_of_segment_cb, | 127 const base::Closure& end_of_segment_cb, |
128 const LogCB& log_cb) = 0; | 128 const scoped_refptr<MediaLog>& media_log) = 0; |
129 | 129 |
130 // Called when a seek occurs. This flushes the current parser state | 130 // Called when a seek occurs. This flushes the current parser state |
131 // and puts the parser in a state where it can receive data for the new seek | 131 // and puts the parser in a state where it can receive data for the new seek |
132 // point. | 132 // point. |
133 virtual void Flush() = 0; | 133 virtual void Flush() = 0; |
134 | 134 |
135 // Called when there is new data to parse. | 135 // Called when there is new data to parse. |
136 // | 136 // |
137 // Returns true if the parse succeeds. | 137 // Returns true if the parse succeeds. |
138 virtual bool Parse(const uint8* buf, int size) = 0; | 138 virtual bool Parse(const uint8* buf, int size) = 0; |
(...skipping 15 matching lines...) Expand all Loading... |
154 // subtle issues with tie-breaking. See http://crbug.com/338484. | 154 // subtle issues with tie-breaking. See http://crbug.com/338484. |
155 MEDIA_EXPORT bool MergeBufferQueues( | 155 MEDIA_EXPORT bool MergeBufferQueues( |
156 const StreamParser::BufferQueue& audio_buffers, | 156 const StreamParser::BufferQueue& audio_buffers, |
157 const StreamParser::BufferQueue& video_buffers, | 157 const StreamParser::BufferQueue& video_buffers, |
158 const StreamParser::TextBufferQueueMap& text_buffers, | 158 const StreamParser::TextBufferQueueMap& text_buffers, |
159 StreamParser::BufferQueue* merged_buffers); | 159 StreamParser::BufferQueue* merged_buffers); |
160 | 160 |
161 } // namespace media | 161 } // namespace media |
162 | 162 |
163 #endif // MEDIA_BASE_STREAM_PARSER_H_ | 163 #endif // MEDIA_BASE_STREAM_PARSER_H_ |
OLD | NEW |