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

Function decoder_run

src/decoder/Thread.cxx:605–628  ·  view source on GitHub ↗

* * Caller holds DecoderControl::mutex. */

Source from the content-addressed store, hash-verified

603 * Caller holds DecoderControl::mutex.
604 */
605static void
606decoder_run(DecoderControl &dc) noexcept
607try {
608 dc.ClearError();
609
610 assert(dc.song != nullptr);
611 const DetachedSong &song = *dc.song;
612
613 const char *const uri_utf8 = song.GetRealURI();
614
615 Path path_fs = nullptr;
616 AllocatedPath path_buffer = nullptr;
617 if (PathTraitsUTF8::IsAbsolute(uri_utf8)) {
618 path_buffer = AllocatedPath::FromUTF8Throw(uri_utf8);
619 path_fs = path_buffer;
620 }
621
622 decoder_run_song(dc, song, uri_utf8, path_fs);
623} catch (...) {
624 dc.state = DecoderState::ERROR;
625 dc.command = DecoderCommand::NONE;
626 dc.error = std::current_exception();
627 dc.client_cond.notify_one();
628}
629
630void
631DecoderControl::RunThread() noexcept

Callers 1

RunThreadMethod · 0.85

Calls 1

decoder_run_songFunction · 0.85

Tested by

no test coverage detected