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

Unified Diff: media/filters/ffmpeg_audio_decoder.cc

Issue 1685683004: Move media::AudioCodec to its own source file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix date and commit message Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: media/filters/ffmpeg_audio_decoder.cc
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index 8159604a55495f5c947d41be69ba7abc6a40b9c2..a4a9a3dcb36e906c2f95f95921f85c1ad6589d54 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -128,6 +128,14 @@ static int GetAudioBuffer(struct AVCodecContext* s, AVFrame* frame, int flags) {
return 0;
}
+// static
+bool FFmpegAudioDecoder::IsCodecSupported(AudioCodec codec,
+ SampleFormat sample_format) {
+ FFmpegGlue::InitializeFFmpeg();
+ return avcodec_find_decoder(AudioCodecToCodecID(codec, sample_format)) !=
+ nullptr;
+}
+
FFmpegAudioDecoder::FFmpegAudioDecoder(
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
const scoped_refptr<MediaLog>& media_log)

Powered by Google App Engine
This is Rietveld 408576698