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