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

Function TryUriDecode

src/decoder/Thread.cxx:309–330  ·  view source on GitHub ↗

* Try decoding a URI. * * DecoderControl::mutex is not be locked by caller. */

Source from the content-addressed store, hash-verified

307 * DecoderControl::mutex is not be locked by caller.
308 */
309static DecodeResult
310TryUriDecode(DecoderBridge &bridge, const char *uri)
311{
312 DecodeResult result = DecodeResult::NO_PLUGIN;
313
314 for (const auto &plugin : GetEnabledDecoderPlugins()) {
315 if (!plugin.SupportsUri(uri))
316 continue;
317
318 std::unique_lock lock{bridge.dc.mutex};
319 bridge.Reset();
320
321 if (const auto r = DecoderUriDecode(plugin, bridge, uri);
322 r > result) {
323 result = r;
324 if (IsFinalDecodeResult(result))
325 break;
326 }
327 }
328
329 return result;
330}
331
332/**
333 * Try decoding a stream.

Callers 1

decoder_run_streamFunction · 0.85

Calls 4

DecoderUriDecodeFunction · 0.85
IsFinalDecodeResultFunction · 0.85
SupportsUriMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected