| 328 | } |
| 329 | |
| 330 | [[gnu::const]] |
| 331 | static SampleFormat |
| 332 | ffmpeg_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 | |
| 352 | static void |
| 353 | FfmpegParseMetaData(AVDictionary &dict, |
no outgoing calls
no test coverage detected