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

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

Issue 8661002: Fire CanPlayThrough immediately for local and streaming media files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix media/event-attributes.html Created 9 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Implements a Demuxer that can switch among different data sources mid-stream. 5 // Implements a Demuxer that can switch among different data sources mid-stream.
6 // Uses FFmpegDemuxer under the covers, so see the caveats at the top of 6 // Uses FFmpegDemuxer under the covers, so see the caveats at the top of
7 // ffmpeg_demuxer.h. 7 // ffmpeg_demuxer.h.
8 8
9 #include "media/filters/chunk_demuxer.h" 9 #include "media/filters/chunk_demuxer.h"
10 10
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 audio_ = NULL; 362 audio_ = NULL;
363 } 363 }
364 364
365 void ChunkDemuxer::SetPreload(Preload preload) {} 365 void ChunkDemuxer::SetPreload(Preload preload) {}
366 366
367 int ChunkDemuxer::GetBitrate() { 367 int ChunkDemuxer::GetBitrate() {
368 // TODO(acolwell): Implement bitrate reporting. 368 // TODO(acolwell): Implement bitrate reporting.
369 return 0; 369 return 0;
370 } 370 }
371 371
372 bool ChunkDemuxer::IsLocalSource() {
373 // TODO(acolwell): Report whether source is local or not.
374 return false;
375 }
376
372 // Demuxer implementation. 377 // Demuxer implementation.
373 scoped_refptr<DemuxerStream> ChunkDemuxer::GetStream( 378 scoped_refptr<DemuxerStream> ChunkDemuxer::GetStream(
374 DemuxerStream::Type type) { 379 DemuxerStream::Type type) {
375 if (type == DemuxerStream::VIDEO) 380 if (type == DemuxerStream::VIDEO)
376 return video_; 381 return video_;
377 382
378 if (type == DemuxerStream::AUDIO) 383 if (type == DemuxerStream::AUDIO)
379 return audio_; 384 return audio_;
380 385
381 return NULL; 386 return NULL;
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 base::AutoUnlock auto_unlock(lock_); 801 base::AutoUnlock auto_unlock(lock_);
797 if (cb.is_null()) { 802 if (cb.is_null()) {
798 host()->SetError(error); 803 host()->SetError(error);
799 return; 804 return;
800 } 805 }
801 cb.Run(error); 806 cb.Run(error);
802 } 807 }
803 } 808 }
804 809
805 } // namespace media 810 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698