| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |