using Bmp.Core.FFMpeg.CsCorePorts.FFMpegWrap.Interops; namespace Bmp.Core.FFMpeg.CsCoreExt; public unsafe class FFMpegAttachedPic { private readonly AVStream* _avStream; public ReadOnlySpan Data => new(_avStream->attached_pic.data, _avStream->attached_pic.size); public IReadOnlyDictionary Meta => _avStream->metadata == null ? Array.Empty>().ToDictionary() : _avStream->metadata->Elements.Select(p => new KeyValuePair(p.Key, p.Value)).ToDictionary(); internal FFMpegAttachedPic(AVStream* avStream) => _avStream = avStream; }