OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "media/filters/ffmpeg_demuxer.h" | 5 #include "media/filters/ffmpeg_demuxer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 CHECK(blocking_thread_.Start()); | 316 CHECK(blocking_thread_.Start()); |
317 base::PostTaskAndReplyWithResult( | 317 base::PostTaskAndReplyWithResult( |
318 blocking_thread_.message_loop_proxy(), FROM_HERE, | 318 blocking_thread_.message_loop_proxy(), FROM_HERE, |
319 base::Bind(&FFmpegGlue::OpenContext, base::Unretained(glue_.get())), | 319 base::Bind(&FFmpegGlue::OpenContext, base::Unretained(glue_.get())), |
320 base::Bind(&FFmpegDemuxer::OnOpenContextDone, this, status_cb)); | 320 base::Bind(&FFmpegDemuxer::OnOpenContextDone, this, status_cb)); |
321 } | 321 } |
322 | 322 |
323 scoped_refptr<DemuxerStream> FFmpegDemuxer::GetStream( | 323 scoped_refptr<DemuxerStream> FFmpegDemuxer::GetStream( |
324 DemuxerStream::Type type) { | 324 DemuxerStream::Type type) { |
325 DCHECK(message_loop_->BelongsToCurrentThread()); | 325 DCHECK(message_loop_->BelongsToCurrentThread()); |
| 326 // For now, there is an issue on opensles_output.cc. |
| 327 // Turning audio off until the issue is resolved. |
| 328 if (type == DemuxerStream::AUDIO) { |
| 329 return NULL; |
| 330 } |
326 return GetFFmpegStream(type); | 331 return GetFFmpegStream(type); |
327 } | 332 } |
328 | 333 |
329 scoped_refptr<FFmpegDemuxerStream> FFmpegDemuxer::GetFFmpegStream( | 334 scoped_refptr<FFmpegDemuxerStream> FFmpegDemuxer::GetFFmpegStream( |
330 DemuxerStream::Type type) const { | 335 DemuxerStream::Type type) const { |
331 StreamVector::const_iterator iter; | 336 StreamVector::const_iterator iter; |
332 for (iter = streams_.begin(); iter != streams_.end(); ++iter) { | 337 for (iter = streams_.begin(); iter != streams_.end(); ++iter) { |
333 if (*iter && (*iter)->type() == type) { | 338 if (*iter && (*iter)->type() == type) { |
334 return *iter; | 339 return *iter; |
335 } | 340 } |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 } | 663 } |
659 for (size_t i = 0; i < buffered.size(); ++i) | 664 for (size_t i = 0; i < buffered.size(); ++i) |
660 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); | 665 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); |
661 } | 666 } |
662 | 667 |
663 void FFmpegDemuxer::OnDataSourceError() { | 668 void FFmpegDemuxer::OnDataSourceError() { |
664 host_->OnDemuxerError(PIPELINE_ERROR_READ); | 669 host_->OnDemuxerError(PIPELINE_ERROR_READ); |
665 } | 670 } |
666 | 671 |
667 } // namespace media | 672 } // namespace media |
OLD | NEW |