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

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

Issue 8399023: Fire canplaythrough event at the proper time for audio/video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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/filters/chunk_demuxer.h ('k') | media/filters/dummy_demuxer.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) 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 cb.Run(status); 357 cb.Run(status);
358 } 358 }
359 359
360 void ChunkDemuxer::OnAudioRendererDisabled() { 360 void ChunkDemuxer::OnAudioRendererDisabled() {
361 base::AutoLock auto_lock(lock_); 361 base::AutoLock auto_lock(lock_);
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() {
368 // TODO(acolwell): Implement bitrate reporting.
369 return 0;
370 }
371
367 // Demuxer implementation. 372 // Demuxer implementation.
368 scoped_refptr<DemuxerStream> ChunkDemuxer::GetStream( 373 scoped_refptr<DemuxerStream> ChunkDemuxer::GetStream(
369 DemuxerStream::Type type) { 374 DemuxerStream::Type type) {
370 if (type == DemuxerStream::VIDEO) 375 if (type == DemuxerStream::VIDEO)
371 return video_; 376 return video_;
372 377
373 if (type == DemuxerStream::AUDIO) 378 if (type == DemuxerStream::AUDIO)
374 return audio_; 379 return audio_;
375 380
376 return NULL; 381 return NULL;
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 base::AutoUnlock auto_unlock(lock_); 796 base::AutoUnlock auto_unlock(lock_);
792 if (cb.is_null()) { 797 if (cb.is_null()) {
793 host()->SetError(error); 798 host()->SetError(error);
794 return; 799 return;
795 } 800 }
796 cb.Run(error); 801 cb.Run(error);
797 } 802 }
798 } 803 }
799 804
800 } // namespace media 805 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | media/filters/dummy_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698