radek-k / FFMediaToolkit

FFMediaToolkit is a cross-platform video decoder/encoder library for .NET that uses FFmpeg native libraries. It supports video frames extraction, reading stream metadata and creating videos from bitmaps in any format supported by FFmpeg.
MIT License
352 stars 56 forks source link

MediaFile.Audio.TryGetNextFrame overloads? #112

Closed tottaka closed 2 years ago

tottaka commented 2 years ago

Is there a reason why MediaFile.Audio.TryGetNextFrame doesn't have the same overloads as the video counterpart? I'd like to write the next audio frame to a pinned buffer, but the overload is not available for audio as it is with video

tottaka commented 2 years ago

Never mind about this, I can see now that MediaFile.Audio.TryGetNextFrame exposes a ref struct with a Span of the data I can copy to my pinned memory