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

Function DecoderUnlockedRunUri

src/decoder/Thread.cxx:498–515  ·  view source on GitHub ↗

* Decode a song. * * DecoderControl::mutex is not locked. */

Source from the content-addressed store, hash-verified

496 * DecoderControl::mutex is not locked.
497 */
498static DecodeResult
499DecoderUnlockedRunUri(DecoderBridge &bridge,
500 const char *real_uri, Path path_fs)
501try {
502 return !path_fs.IsNull()
503 ? decoder_run_file(bridge, real_uri, path_fs)
504 : decoder_run_stream(bridge, real_uri);
505} catch (StopDecoder) {
506 return DecodeResult::STOP;
507} catch (...) {
508 const char *error_uri = real_uri;
509 const std::string allocated = uri_remove_auth(error_uri);
510 if (!allocated.empty())
511 error_uri = allocated.c_str();
512
513 std::throw_with_nested(FmtRuntimeError("Failed to decode {:?}",
514 error_uri));
515}
516
517/**
518 * Try to guess whether tags attached to the given song are

Callers 1

decoder_run_songFunction · 0.85

Calls 4

decoder_run_fileFunction · 0.85
decoder_run_streamFunction · 0.85
uri_remove_authFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected