nullsauce / ffmpeg-rs

Rust FFmpeg wrapper.
Do What The F*ck You Want To Public License
31 stars 5 forks source link

Log callback interface #30

Closed nullsauce closed 1 year ago

nullsauce commented 1 year ago

@jwiesler wrote:

This pull request implements a safe interface for setting a log callback and provides a simple default implementation that prints via the log crate. It does not change any existing APIs and works on all ffmpeg versions. It only supports the targets unix and windows but if you know how the varargs parameter looks like on other targets it can be easily extended. I'm open for discussion about whether this should be behind a feature flag, but I think there aren't any programs out there that don't include log and vsprintf is like 30 LOC.

Taken from https://github.com/zmwangx/rust-ffmpeg/pull/91/files