Chromium Code Reviews| 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 #include "media/filters/chunk_demuxer.h" | 5 #include "media/filters/chunk_demuxer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <list> | 9 #include <list> |
| 10 | 10 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 323 DCHECK(!timestamp_offset_during_append_); | 323 DCHECK(!timestamp_offset_during_append_); |
| 324 DCHECK(!init_segment_received_cb.is_null()); | 324 DCHECK(!init_segment_received_cb.is_null()); |
| 325 DCHECK(init_segment_received_cb_.is_null()); | 325 DCHECK(init_segment_received_cb_.is_null()); |
| 326 append_window_start_during_append_ = append_window_start; | 326 append_window_start_during_append_ = append_window_start; |
| 327 append_window_end_during_append_ = append_window_end; | 327 append_window_end_during_append_ = append_window_end; |
| 328 timestamp_offset_during_append_ = timestamp_offset; | 328 timestamp_offset_during_append_ = timestamp_offset; |
| 329 init_segment_received_cb_= init_segment_received_cb; | 329 init_segment_received_cb_= init_segment_received_cb; |
| 330 | 330 |
| 331 // TODO(wolenetz/acolwell): Curry and pass a NewBuffersCB here bound with | 331 // TODO(wolenetz/acolwell): Curry and pass a NewBuffersCB here bound with |
| 332 // append window and timestamp offset pointer. See http://crbug.com/351454. | 332 // append window and timestamp offset pointer. See http://crbug.com/351454. |
| 333 bool err = stream_parser_->Parse(data, length); | 333 bool result = stream_parser_->Parse(data, length); |
| 334 if (!result) { | |
| 335 MEDIA_LOG(log_cb_) | |
| 336 << __FUNCTION__ << ": stream parsing failed." | |
|
wolenetz
2014/10/07 22:50:48
How does it look in chrome://media-internals when
| |
| 337 << " Data size=" << length | |
| 338 << " append_window_start=" << append_window_start.InSecondsF() | |
| 339 << " append_window_end=" << append_window_end.InSecondsF(); | |
| 340 } | |
| 334 timestamp_offset_during_append_ = NULL; | 341 timestamp_offset_during_append_ = NULL; |
| 335 init_segment_received_cb_.Reset(); | 342 init_segment_received_cb_.Reset(); |
| 336 return err; | 343 return result; |
| 337 } | 344 } |
| 338 | 345 |
| 339 void SourceState::Abort(TimeDelta append_window_start, | 346 void SourceState::Abort(TimeDelta append_window_start, |
| 340 TimeDelta append_window_end, | 347 TimeDelta append_window_end, |
| 341 base::TimeDelta* timestamp_offset) { | 348 base::TimeDelta* timestamp_offset) { |
| 342 DCHECK(timestamp_offset); | 349 DCHECK(timestamp_offset); |
| 343 DCHECK(!timestamp_offset_during_append_); | 350 DCHECK(!timestamp_offset_during_append_); |
| 344 timestamp_offset_during_append_ = timestamp_offset; | 351 timestamp_offset_during_append_ = timestamp_offset; |
| 345 append_window_start_during_append_ = append_window_start; | 352 append_window_start_during_append_ = append_window_start; |
| 346 append_window_end_during_append_ = append_window_end; | 353 append_window_end_during_append_ = append_window_end; |
| (...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1794 } | 1801 } |
| 1795 | 1802 |
| 1796 void ChunkDemuxer::ShutdownAllStreams() { | 1803 void ChunkDemuxer::ShutdownAllStreams() { |
| 1797 for (SourceStateMap::iterator itr = source_state_map_.begin(); | 1804 for (SourceStateMap::iterator itr = source_state_map_.begin(); |
| 1798 itr != source_state_map_.end(); ++itr) { | 1805 itr != source_state_map_.end(); ++itr) { |
| 1799 itr->second->Shutdown(); | 1806 itr->second->Shutdown(); |
| 1800 } | 1807 } |
| 1801 } | 1808 } |
| 1802 | 1809 |
| 1803 } // namespace media | 1810 } // namespace media |
| OLD | NEW |