| 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 <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 base::ResetAndReturn(&read_cb_).Run(kAborted, nullptr); | 655 base::ResetAndReturn(&read_cb_).Run(kAborted, nullptr); |
| 656 return; | 656 return; |
| 657 } | 657 } |
| 658 | 658 |
| 659 SatisfyPendingRead(); | 659 SatisfyPendingRead(); |
| 660 } | 660 } |
| 661 | 661 |
| 662 void FFmpegDemuxerStream::EnableBitstreamConverter() { | 662 void FFmpegDemuxerStream::EnableBitstreamConverter() { |
| 663 DCHECK(task_runner_->BelongsToCurrentThread()); | 663 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 664 | 664 |
| 665 #if BUILDFLAG(USE_PROPRIETARY_CODECS) | 665 #if BUILDFLAG(USE_PROPRIETARY_CODECS) || defined(OS_ANDROID) |
| 666 InitBitstreamConverter(); | 666 InitBitstreamConverter(); |
| 667 #else | 667 #else |
| 668 NOTREACHED() << "Proprietary codecs not enabled."; | 668 NOTREACHED() << "Proprietary codecs not enabled."; |
| 669 #endif | 669 #endif |
| 670 } | 670 } |
| 671 | 671 |
| 672 void FFmpegDemuxerStream::ResetBitstreamConverter() { | 672 void FFmpegDemuxerStream::ResetBitstreamConverter() { |
| 673 #if BUILDFLAG(USE_PROPRIETARY_CODECS) | 673 #if BUILDFLAG(USE_PROPRIETARY_CODECS) |
| 674 if (bitstream_converter_) | 674 if (bitstream_converter_) |
| 675 InitBitstreamConverter(); | 675 InitBitstreamConverter(); |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1852 | 1852 |
| 1853 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) { | 1853 void FFmpegDemuxer::SetLiveness(DemuxerStream::Liveness liveness) { |
| 1854 DCHECK(task_runner_->BelongsToCurrentThread()); | 1854 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 1855 for (const auto& stream : streams_) { | 1855 for (const auto& stream : streams_) { |
| 1856 if (stream) | 1856 if (stream) |
| 1857 stream->SetLiveness(liveness); | 1857 stream->SetLiveness(liveness); |
| 1858 } | 1858 } |
| 1859 } | 1859 } |
| 1860 | 1860 |
| 1861 } // namespace media | 1861 } // namespace media |
| OLD | NEW |