Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: media/filters/ffmpeg_demuxer.cc

Issue 2801803002: Android: enable H264&VP8 HW accelerator for MediaRecorder (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« media/ffmpeg/ffmpeg_common.cc ('K') | « media/ffmpeg/ffmpeg_common.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« media/ffmpeg/ffmpeg_common.cc ('K') | « media/ffmpeg/ffmpeg_common.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698