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 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 // parsing. | 1296 // parsing. |
1297 bool old_waiting_for_data = IsSeekWaitingForData_Locked(); | 1297 bool old_waiting_for_data = IsSeekWaitingForData_Locked(); |
1298 | 1298 |
1299 if (length == 0u) | 1299 if (length == 0u) |
1300 return; | 1300 return; |
1301 | 1301 |
1302 DCHECK(data); | 1302 DCHECK(data); |
1303 | 1303 |
1304 switch (state_) { | 1304 switch (state_) { |
1305 case INITIALIZING: | 1305 case INITIALIZING: |
1306 DCHECK(IsValidId(id)); | |
1307 if (!source_state_map_[id]->Append(data, length, | |
1308 append_window_start, | |
1309 append_window_end, | |
1310 timestamp_offset, | |
1311 init_segment_received_cb)) { | |
1312 ReportError_Locked(DEMUXER_ERROR_COULD_NOT_OPEN); | |
1313 return; | |
1314 } | |
1315 break; | |
1316 | |
1317 case INITIALIZED: { | 1306 case INITIALIZED: { |
1318 DCHECK(IsValidId(id)); | 1307 DCHECK(IsValidId(id)); |
1319 if (!source_state_map_[id]->Append(data, length, | 1308 if (!source_state_map_[id]->Append(data, length, |
1320 append_window_start, | 1309 append_window_start, |
1321 append_window_end, | 1310 append_window_end, |
1322 timestamp_offset, | 1311 timestamp_offset, |
1323 init_segment_received_cb)) { | 1312 init_segment_received_cb)) { |
1324 ReportError_Locked(PIPELINE_ERROR_DECODE); | 1313 ReportError_Locked(PIPELINE_ERROR_DECODE); |
1325 return; | 1314 return; |
1326 } | 1315 } |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 } | 1790 } |
1802 | 1791 |
1803 void ChunkDemuxer::ShutdownAllStreams() { | 1792 void ChunkDemuxer::ShutdownAllStreams() { |
1804 for (SourceStateMap::iterator itr = source_state_map_.begin(); | 1793 for (SourceStateMap::iterator itr = source_state_map_.begin(); |
1805 itr != source_state_map_.end(); ++itr) { | 1794 itr != source_state_map_.end(); ++itr) { |
1806 itr->second->Shutdown(); | 1795 itr->second->Shutdown(); |
1807 } | 1796 } |
1808 } | 1797 } |
1809 | 1798 |
1810 } // namespace media | 1799 } // namespace media |
OLD | NEW |