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

Method OpenLocal

src/decoder/Bridge.cxx:44–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44InputStreamPtr
45DecoderBridge::OpenLocal(Path path_fs, const char *uri_utf8)
46{
47 if (dc.input_cache != nullptr) {
48 auto lease = dc.input_cache->Get(uri_utf8, true);
49 if (lease) {
50 auto is = std::make_unique<CacheInputStream>(std::move(lease),
51 dc.mutex);
52 is->SetHandler(&dc);
53 return is;
54 }
55 }
56
57 auto is = OpenLocalInputStream(path_fs, dc.mutex);
58 is->SetHandler(&dc);
59 return is;
60}
61
62bool
63DecoderBridge::CheckCancelRead() const noexcept

Callers 1

decoder_run_fileFunction · 0.80

Calls 2

OpenLocalInputStreamFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected