| 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 |
| 377 bool ChunkDemuxer::IsSeekable() { |
| 378 // TODO(acolwell): Report whether source is seekable or not. |
| 379 return true; |
| 380 } |
| 381 |
| 372 // Demuxer implementation. | 382 // Demuxer implementation. |
| 373 scoped_refptr<DemuxerStream> ChunkDemuxer::GetStream( | 383 scoped_refptr<DemuxerStream> ChunkDemuxer::GetStream( |
| 374 DemuxerStream::Type type) { | 384 DemuxerStream::Type type) { |
| 375 if (type == DemuxerStream::VIDEO) | 385 if (type == DemuxerStream::VIDEO) |
| 376 return video_; | 386 return video_; |
| 377 | 387 |
| 378 if (type == DemuxerStream::AUDIO) | 388 if (type == DemuxerStream::AUDIO) |
| 379 return audio_; | 389 return audio_; |
| 380 | 390 |
| 381 return NULL; | 391 return NULL; |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 base::AutoUnlock auto_unlock(lock_); | 806 base::AutoUnlock auto_unlock(lock_); |
| 797 if (cb.is_null()) { | 807 if (cb.is_null()) { |
| 798 host()->SetError(error); | 808 host()->SetError(error); |
| 799 return; | 809 return; |
| 800 } | 810 } |
| 801 cb.Run(error); | 811 cb.Run(error); |
| 802 } | 812 } |
| 803 } | 813 } |
| 804 | 814 |
| 805 } // namespace media | 815 } // namespace media |
| OLD | NEW |