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

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

Issue 2254093002: Return buffers from StreamParsers in a single unified map (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restored calling GetBuffers after each Parse in WebM test Created 4 years, 4 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/filters/frame_processor_unittest.cc ('k') | media/filters/media_source_state.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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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_MEDIA_SOURCE_STATE_H_ 5 #ifndef MEDIA_FILTERS_MEDIA_SOURCE_STATE_H_
6 #define MEDIA_FILTERS_MEDIA_SOURCE_STATE_H_ 6 #define MEDIA_FILTERS_MEDIA_SOURCE_STATE_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 // Called by the |stream_parser_| at the end of a media segment. 147 // Called by the |stream_parser_| at the end of a media segment.
148 void OnEndOfMediaSegment(); 148 void OnEndOfMediaSegment();
149 149
150 // Called by the |stream_parser_| when new buffers have been parsed. 150 // Called by the |stream_parser_| when new buffers have been parsed.
151 // It processes the new buffers using |frame_processor_|, which includes 151 // It processes the new buffers using |frame_processor_|, which includes
152 // appending the processed frames to associated demuxer streams for each 152 // appending the processed frames to associated demuxer streams for each
153 // frame's track. 153 // frame's track.
154 // Returns true on a successful call. Returns false if an error occurred while 154 // Returns true on a successful call. Returns false if an error occurred while
155 // processing the buffers. 155 // processing the buffers.
156 bool OnNewBuffers(const StreamParser::BufferQueue& audio_buffers, 156 bool OnNewBuffers(const StreamParser::BufferQueueMap& buffer_queue_map);
157 const StreamParser::BufferQueue& video_buffers,
158 const StreamParser::TextBufferQueueMap& text_map);
159 157
160 void OnSourceInitDone(const StreamParser::InitParameters& params); 158 void OnSourceInitDone(const StreamParser::InitParameters& params);
161 159
162 // EstimateVideoDataSize uses some heuristics to estimate the size of the 160 // EstimateVideoDataSize uses some heuristics to estimate the size of the
163 // video size in the chunk of muxed audio/video data without parsing it. 161 // video size in the chunk of muxed audio/video data without parsing it.
164 // This is used by EvictCodedFrames algorithm, which happens before Append 162 // This is used by EvictCodedFrames algorithm, which happens before Append
165 // (and therefore before parsing is performed) to prepare space for new data. 163 // (and therefore before parsing is performed) to prepare space for new data.
166 size_t EstimateVideoDataSize(size_t muxed_data_chunk_size) const; 164 size_t EstimateVideoDataSize(size_t muxed_data_chunk_size) const;
167 165
168 // Tracks the number of MEDIA_LOGs emitted for segments missing expected audio 166 // Tracks the number of MEDIA_LOGs emitted for segments missing expected audio
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // TODO(wolenetz): Refactor this function while integrating April 29, 2014 220 // TODO(wolenetz): Refactor this function while integrating April 29, 2014
223 // changes to MSE spec. See http://crbug.com/371499. 221 // changes to MSE spec. See http://crbug.com/371499.
224 bool auto_update_timestamp_offset_; 222 bool auto_update_timestamp_offset_;
225 223
226 DISALLOW_COPY_AND_ASSIGN(MediaSourceState); 224 DISALLOW_COPY_AND_ASSIGN(MediaSourceState);
227 }; 225 };
228 226
229 } // namespace media 227 } // namespace media
230 228
231 #endif // MEDIA_FILTERS_MEDIA_SOURCE_STATE_H_ 229 #endif // MEDIA_FILTERS_MEDIA_SOURCE_STATE_H_
OLDNEW
« no previous file with comments | « media/filters/frame_processor_unittest.cc ('k') | media/filters/media_source_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698