| 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 RETURNING_DATA_FOR_READS, | 338 RETURNING_DATA_FOR_READS, |
| 339 RETURNING_ABORT_FOR_READS, | 339 RETURNING_ABORT_FOR_READS, |
| 340 SHUTDOWN, | 340 SHUTDOWN, |
| 341 }; | 341 }; |
| 342 | 342 |
| 343 // Assigns |state_| to |state| | 343 // Assigns |state_| to |state| |
| 344 void ChangeState_Locked(State state); | 344 void ChangeState_Locked(State state); |
| 345 | 345 |
| 346 void CompletePendingReadIfPossible_Locked(); | 346 void CompletePendingReadIfPossible_Locked(); |
| 347 | 347 |
| 348 // Gets the value to pass to the next Read() callback. Returns true if | |
| 349 // |status| and |buffer| should be passed to the callback. False indicates | |
| 350 // that |status| and |buffer| were not set and more data is needed. | |
| 351 bool GetNextBuffer_Locked(DemuxerStream::Status* status, | |
| 352 scoped_refptr<StreamParserBuffer>* buffer); | |
| 353 | |
| 354 // Specifies the type of the stream. | 348 // Specifies the type of the stream. |
| 355 Type type_; | 349 Type type_; |
| 356 | 350 |
| 357 scoped_ptr<SourceBufferStream> stream_; | 351 scoped_ptr<SourceBufferStream> stream_; |
| 358 | 352 |
| 359 mutable base::Lock lock_; | 353 mutable base::Lock lock_; |
| 360 State state_; | 354 State state_; |
| 361 ReadCB read_cb_; | 355 ReadCB read_cb_; |
| 362 | 356 |
| 363 DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerStream); | 357 DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerStream); |
| (...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1853 } | 1847 } |
| 1854 | 1848 |
| 1855 void ChunkDemuxer::ShutdownAllStreams() { | 1849 void ChunkDemuxer::ShutdownAllStreams() { |
| 1856 for (SourceStateMap::iterator itr = source_state_map_.begin(); | 1850 for (SourceStateMap::iterator itr = source_state_map_.begin(); |
| 1857 itr != source_state_map_.end(); ++itr) { | 1851 itr != source_state_map_.end(); ++itr) { |
| 1858 itr->second->Shutdown(); | 1852 itr->second->Shutdown(); |
| 1859 } | 1853 } |
| 1860 } | 1854 } |
| 1861 | 1855 |
| 1862 } // namespace media | 1856 } // namespace media |
| OLD | NEW |