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

Function FfmpegCheckTag

src/decoder/plugins/FfmpegDecoderPlugin.cxx:438–454  ·  view source on GitHub ↗

* Check if a new stream tag was received and pass it to * DecoderClient::SubmitTag(). */

Source from the content-addressed store, hash-verified

436 * DecoderClient::SubmitTag().
437 */
438static void
439FfmpegCheckTag(DecoderClient &client, InputStream *is,
440 AVFormatContext &format_context, int audio_stream) noexcept
441{
442 AVStream &stream = *format_context.streams[audio_stream];
443 if ((stream.event_flags & AVSTREAM_EVENT_FLAG_METADATA_UPDATED) == 0)
444 /* no new metadata */
445 return;
446
447 /* clear the flag */
448 stream.event_flags &= ~AVSTREAM_EVENT_FLAG_METADATA_UPDATED;
449
450 TagBuilder tag;
451 FfmpegScanTag(format_context, audio_stream, tag);
452 if (!tag.empty())
453 client.SubmitTag(is, tag.Commit());
454}
455
456static bool
457IsSeekable(const AVFormatContext &format_context) noexcept

Callers 1

FfmpegDecodeFunction · 0.85

Calls 4

emptyMethod · 0.80
FfmpegScanTagFunction · 0.70
SubmitTagMethod · 0.45
CommitMethod · 0.45

Tested by

no test coverage detected