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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 2572883002: Convert USE_PROPRIETARY_CODECS to a buildflag header. (Closed)
Patch Set: Merge Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/ffmpeg_demuxer.h ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 0c532d0edb1a84a026487497e29bdc7a5f10bb93..14db5020ee4b9c9bf82e7bf0b47def36e7248d79 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -371,7 +371,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
}
}
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
// Convert the packet if there is a bitstream filter.
if (packet->data && bitstream_converter_ &&
!bitstream_converter_->ConvertPacket(packet.get())) {
@@ -655,7 +655,7 @@ void FFmpegDemuxerStream::Read(const ReadCB& read_cb) {
void FFmpegDemuxerStream::EnableBitstreamConverter() {
DCHECK(task_runner_->BelongsToCurrentThread());
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
InitBitstreamConverter();
#else
NOTREACHED() << "Proprietary codecs not enabled.";
@@ -663,14 +663,14 @@ void FFmpegDemuxerStream::EnableBitstreamConverter() {
}
void FFmpegDemuxerStream::ResetBitstreamConverter() {
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
if (bitstream_converter_)
InitBitstreamConverter();
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
}
void FFmpegDemuxerStream::InitBitstreamConverter() {
-#if defined(USE_PROPRIETARY_CODECS)
+#if BUILDFLAG(USE_PROPRIETARY_CODECS)
switch (stream_->codecpar->codec_id) {
case AV_CODEC_ID_H264:
// Clear |extra_data| so that future (fallback) decoders will know that
@@ -698,7 +698,7 @@ void FFmpegDemuxerStream::InitBitstreamConverter() {
default:
break;
}
-#endif // defined(USE_PROPRIETARY_CODECS)
+#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
}
bool FFmpegDemuxerStream::SupportsConfigChanges() { return false; }
« no previous file with comments | « media/filters/ffmpeg_demuxer.h ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698