| 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 <deque> | 8 #include <deque> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 RETURNING_DATA_FOR_READS, | 325 RETURNING_DATA_FOR_READS, |
| 326 RETURNING_ABORT_FOR_READS, | 326 RETURNING_ABORT_FOR_READS, |
| 327 SHUTDOWN, | 327 SHUTDOWN, |
| 328 }; | 328 }; |
| 329 | 329 |
| 330 // Assigns |state_| to |state| | 330 // Assigns |state_| to |state| |
| 331 void ChangeState_Locked(State state); | 331 void ChangeState_Locked(State state); |
| 332 | 332 |
| 333 void CompletePendingReadIfPossible_Locked(); | 333 void CompletePendingReadIfPossible_Locked(); |
| 334 | 334 |
| 335 // Gets the value to pass to the next Read() callback. Returns true if | |
| 336 // |status| and |buffer| should be passed to the callback. False indicates | |
| 337 // that |status| and |buffer| were not set and more data is needed. | |
| 338 bool GetNextBuffer_Locked(DemuxerStream::Status* status, | |
| 339 scoped_refptr<StreamParserBuffer>* buffer); | |
| 340 | |
| 341 // Specifies the type of the stream. | 335 // Specifies the type of the stream. |
| 342 Type type_; | 336 Type type_; |
| 343 | 337 |
| 344 scoped_ptr<SourceBufferStream> stream_; | 338 scoped_ptr<SourceBufferStream> stream_; |
| 345 | 339 |
| 346 mutable base::Lock lock_; | 340 mutable base::Lock lock_; |
| 347 State state_; | 341 State state_; |
| 348 ReadCB read_cb_; | 342 ReadCB read_cb_; |
| 349 | 343 |
| 350 DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerStream); | 344 DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerStream); |
| (...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1820 } | 1814 } |
| 1821 | 1815 |
| 1822 void ChunkDemuxer::ShutdownAllStreams() { | 1816 void ChunkDemuxer::ShutdownAllStreams() { |
| 1823 for (SourceStateMap::iterator itr = source_state_map_.begin(); | 1817 for (SourceStateMap::iterator itr = source_state_map_.begin(); |
| 1824 itr != source_state_map_.end(); ++itr) { | 1818 itr != source_state_map_.end(); ++itr) { |
| 1825 itr->second->Shutdown(); | 1819 itr->second->Shutdown(); |
| 1826 } | 1820 } |
| 1827 } | 1821 } |
| 1828 | 1822 |
| 1829 } // namespace media | 1823 } // namespace media |
| OLD | NEW |