| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "media/filters/frame_processor.h" | 5 #include "media/filters/frame_processor.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <cstdlib> | 9 #include <cstdlib> |
| 10 | 10 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // We're switching from 'sequence' to 'segments' mode. Be safe and signal a | 189 // We're switching from 'sequence' to 'segments' mode. Be safe and signal a |
| 190 // new coded frame group on the next frame emitted. | 190 // new coded frame group on the next frame emitted. |
| 191 coded_frame_group_last_dts_ = kNoDecodeTimestamp(); | 191 coded_frame_group_last_dts_ = kNoDecodeTimestamp(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 // Step 8: Update the attribute to new mode. | 194 // Step 8: Update the attribute to new mode. |
| 195 sequence_mode_ = sequence_mode; | 195 sequence_mode_ = sequence_mode; |
| 196 } | 196 } |
| 197 | 197 |
| 198 bool FrameProcessor::ProcessFrames( | 198 bool FrameProcessor::ProcessFrames( |
| 199 const StreamParser::BufferQueue& audio_buffers, | 199 const StreamParser::BufferQueueMap& buffer_queue_map, |
| 200 const StreamParser::BufferQueue& video_buffers, | |
| 201 const StreamParser::TextBufferQueueMap& text_map, | |
| 202 base::TimeDelta append_window_start, | 200 base::TimeDelta append_window_start, |
| 203 base::TimeDelta append_window_end, | 201 base::TimeDelta append_window_end, |
| 204 base::TimeDelta* timestamp_offset) { | 202 base::TimeDelta* timestamp_offset) { |
| 205 StreamParser::BufferQueue frames; | 203 StreamParser::BufferQueue frames; |
| 206 if (!MergeBufferQueues(audio_buffers, video_buffers, text_map, &frames)) { | 204 if (!MergeBufferQueues(buffer_queue_map, &frames)) { |
| 207 MEDIA_LOG(ERROR, media_log_) << "Parsed buffers not in DTS sequence"; | 205 MEDIA_LOG(ERROR, media_log_) << "Parsed buffers not in DTS sequence"; |
| 208 return false; | 206 return false; |
| 209 } | 207 } |
| 210 | 208 |
| 211 DCHECK(!frames.empty()); | 209 DCHECK(!frames.empty()); |
| 212 | 210 |
| 213 // Implements the coded frame processing algorithm's outer loop for step 1. | 211 // Implements the coded frame processing algorithm's outer loop for step 1. |
| 214 // Note that ProcessFrame() implements an inner loop for a single frame that | 212 // Note that ProcessFrame() implements an inner loop for a single frame that |
| 215 // handles "jump to the Loop Top step to restart processing of the current | 213 // handles "jump to the Loop Top step to restart processing of the current |
| 216 // coded frame" per June 9, 2016 MSE spec editor's draft: | 214 // coded frame" per June 9, 2016 MSE spec editor's draft: |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 // Step 21 is currently handled differently. See MediaSourceState's | 757 // Step 21 is currently handled differently. See MediaSourceState's |
| 760 // |auto_update_timestamp_offset_|. | 758 // |auto_update_timestamp_offset_|. |
| 761 return true; | 759 return true; |
| 762 } | 760 } |
| 763 | 761 |
| 764 NOTREACHED(); | 762 NOTREACHED(); |
| 765 return false; | 763 return false; |
| 766 } | 764 } |
| 767 | 765 |
| 768 } // namespace media | 766 } // namespace media |
| OLD | NEW |