| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |