Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Side by Side Diff: media/filters/chunk_demuxer.cc

Issue 125543002: Add plumbing and support for crossfading StreamParserBuffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/base/stream_parser_buffer.cc ('k') | media/filters/source_buffer_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/base/stream_parser_buffer.cc ('k') | media/filters/source_buffer_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698