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

Function TryContainerDecoder

src/decoder/Thread.cxx:406–421  ·  view source on GitHub ↗

* Decode a container file with the given decoder plugin. * * DecoderControl::mutex is not locked by caller. */

Source from the content-addressed store, hash-verified

404 * DecoderControl::mutex is not locked by caller.
405 */
406static DecodeResult
407TryContainerDecoder(DecoderBridge &bridge, Path path_fs,
408 std::string_view suffix,
409 const DecoderPlugin &plugin)
410{
411 if (plugin.container_scan == nullptr ||
412 plugin.file_decode == nullptr ||
413 !plugin.SupportsSuffix(suffix))
414 return DecodeResult::NO_PLUGIN;
415
416 bridge.Reset();
417
418 DecoderControl &dc = bridge.dc;
419 const std::lock_guard protect{dc.mutex};
420 return decoder_file_decode(plugin, bridge, path_fs);
421}
422
423/**
424 * Decode a container file.

Callers 1

decoder_run_fileFunction · 0.85

Calls 4

decoder_file_decodeFunction · 0.85
IsFinalDecodeResultFunction · 0.85
SupportsSuffixMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected