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 <cstdlib> | 7 #include <cstdlib> |
8 | 8 |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "media/base/stream_parser_buffer.h" | 10 #include "media/base/stream_parser_buffer.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 itr->second->set_needs_random_access_point(true); | 280 itr->second->set_needs_random_access_point(true); |
281 } | 281 } |
282 } | 282 } |
283 | 283 |
284 void FrameProcessor::Reset() { | 284 void FrameProcessor::Reset() { |
285 DVLOG(2) << __FUNCTION__ << "()"; | 285 DVLOG(2) << __FUNCTION__ << "()"; |
286 for (TrackBufferMap::iterator itr = track_buffers_.begin(); | 286 for (TrackBufferMap::iterator itr = track_buffers_.begin(); |
287 itr != track_buffers_.end(); ++itr) { | 287 itr != track_buffers_.end(); ++itr) { |
288 itr->second->Reset(); | 288 itr->second->Reset(); |
289 } | 289 } |
| 290 |
| 291 if (sequence_mode_) { |
| 292 DCHECK(kNoTimestamp() != group_end_timestamp_); |
| 293 group_start_timestamp_ = group_end_timestamp_; |
| 294 } |
290 } | 295 } |
291 | 296 |
292 void FrameProcessor::OnPossibleAudioConfigUpdate( | 297 void FrameProcessor::OnPossibleAudioConfigUpdate( |
293 const AudioDecoderConfig& config) { | 298 const AudioDecoderConfig& config) { |
294 DCHECK(config.IsValidConfig()); | 299 DCHECK(config.IsValidConfig()); |
295 | 300 |
296 // Always clear the preroll buffer when a config update is received. | 301 // Always clear the preroll buffer when a config update is received. |
297 audio_preroll_buffer_ = NULL; | 302 audio_preroll_buffer_ = NULL; |
298 | 303 |
299 if (config.Matches(current_audio_config_)) | 304 if (config.Matches(current_audio_config_)) |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 DCHECK(group_end_timestamp_ >= base::TimeDelta()); | 735 DCHECK(group_end_timestamp_ >= base::TimeDelta()); |
731 | 736 |
732 return true; | 737 return true; |
733 } | 738 } |
734 | 739 |
735 NOTREACHED(); | 740 NOTREACHED(); |
736 return false; | 741 return false; |
737 } | 742 } |
738 | 743 |
739 } // namespace media | 744 } // namespace media |
OLD | NEW |