| 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 cb.Run(status); | 349 cb.Run(status); |
| 350 } | 350 } |
| 351 | 351 |
| 352 void ChunkDemuxer::OnAudioRendererDisabled() { | 352 void ChunkDemuxer::OnAudioRendererDisabled() { |
| 353 base::AutoLock auto_lock(lock_); | 353 base::AutoLock auto_lock(lock_); |
| 354 audio_ = NULL; | 354 audio_ = NULL; |
| 355 } | 355 } |
| 356 | 356 |
| 357 void ChunkDemuxer::SetPreload(Preload preload) {} | 357 void ChunkDemuxer::SetPreload(Preload preload) {} |
| 358 | 358 |
| 359 int ChunkDemuxer::GetBitrate() { |
| 360 // Bitrate is unknown. |
| 361 return 0; |
| 362 } |
| 363 |
| 359 // Demuxer implementation. | 364 // Demuxer implementation. |
| 360 scoped_refptr<DemuxerStream> ChunkDemuxer::GetStream( | 365 scoped_refptr<DemuxerStream> ChunkDemuxer::GetStream( |
| 361 DemuxerStream::Type type) { | 366 DemuxerStream::Type type) { |
| 362 if (type == DemuxerStream::VIDEO) | 367 if (type == DemuxerStream::VIDEO) |
| 363 return video_; | 368 return video_; |
| 364 | 369 |
| 365 if (type == DemuxerStream::AUDIO) | 370 if (type == DemuxerStream::AUDIO) |
| 366 return audio_; | 371 return audio_; |
| 367 | 372 |
| 368 return NULL; | 373 return NULL; |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 base::AutoUnlock auto_unlock(lock_); | 736 base::AutoUnlock auto_unlock(lock_); |
| 732 if (cb.is_null()) { | 737 if (cb.is_null()) { |
| 733 host()->SetError(error); | 738 host()->SetError(error); |
| 734 return; | 739 return; |
| 735 } | 740 } |
| 736 cb.Run(error); | 741 cb.Run(error); |
| 737 } | 742 } |
| 738 } | 743 } |
| 739 | 744 |
| 740 } // namespace media | 745 } // namespace media |
| OLD | NEW |