FFMS / ffms2

An FFmpeg based source library and Avisynth/VapourSynth plugin for easy frame accurate access
Other
574 stars 104 forks source link

Lambda as a TIndexCallback? #353

Closed wrosecrans closed 2 years ago

wrosecrans commented 4 years ago

Is there any way to attach a callback during indexing using a C++ lambda, or std::function? As near as I can tell, the public API having a C interface makes it impossible to use anything but a straight C function pointer, but I'm not sure if I'm missing anything obvious and/or clever to make the callback API more convenient from a C++ application

myrsloik commented 4 years ago

There's a reason you have a data pointer you can pass along. You can also pass stateless lambdas if you like syntactic sugar.