MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / ffmpeg_sample_format

Function ffmpeg_sample_format

src/decoder/plugins/FfmpegDecoderPlugin.cxx:330–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330[[gnu::const]]
331static SampleFormat
332ffmpeg_sample_format(enum AVSampleFormat sample_fmt) noexcept
333{
334 const auto result = Ffmpeg::FromFfmpegSampleFormat(sample_fmt);
335 if (result != SampleFormat::UNDEFINED)
336 return result;
337
338 char buffer[64];
339 const char *name = av_get_sample_fmt_string(buffer, sizeof(buffer),
340 sample_fmt);
341 if (name != nullptr)
342 FmtError(ffmpeg_domain,
343 "Unsupported libavcodec SampleFormat value: {} ({})",
344 name, sample_fmt);
345 else
346 FmtError(ffmpeg_domain,
347 "Unsupported libavcodec SampleFormat value: {}",
348 sample_fmt);
349 return SampleFormat::UNDEFINED;
350}
351
352static void
353FfmpegParseMetaData(AVDictionary &dict,

Callers 2

FfmpegDecodeFunction · 0.85
FfmpegScanStreamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected