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

Function decoder_run_stream_fallback

src/decoder/Thread.cxx:251–269  ·  view source on GitHub ↗

* Try decoding a stream, using the fallback plugin. */

Source from the content-addressed store, hash-verified

249 * Try decoding a stream, using the fallback plugin.
250 */
251static DecodeResult
252decoder_run_stream_fallback(DecoderBridge &bridge, InputStream &is,
253 std::unique_lock<Mutex> &lock)
254{
255 const struct DecoderPlugin *plugin;
256
257#ifdef ENABLE_FFMPEG
258 plugin = decoder_plugin_from_name("ffmpeg");
259#else
260 plugin = decoder_plugin_from_name("mad");
261#endif
262 if (plugin == nullptr)
263 return DecodeResult::NO_PLUGIN;
264
265 if (plugin->stream_decode == nullptr)
266 return DecodeResult::NO_STREAM_PLUGIN;
267
268 return decoder_stream_decode(*plugin, bridge, is, lock);
269}
270
271/**
272 * Attempt to load replay gain data, and pass it to

Callers 1

decoder_run_streamFunction · 0.85

Calls 2

decoder_plugin_from_nameFunction · 0.85
decoder_stream_decodeFunction · 0.85

Tested by

no test coverage detected