OLD | NEW |
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...) Loading... |
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...) Loading... |
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 |
OLD | NEW |