On 12.05.2021 15:52, Timo Rothenpieler wrote:
On 12.05.2021 15:19, Samuel Marks wrote:
Started hacking around to make it work. So I changed the `main` to a:
extern int ffprobe(int argc, char **argv);
Then I added a header with a prototype of the same, and started
messing with vcpkg + CMake to try and get it to build correctly.
That's not going to work.
The whole thing is not designed to be called more than once, and you can
be close to certain that it's going to fail miserably and in unexpected
ways.
Use the libraries if you want to integrate ffmpeg functionality into
your own application.
Another alternative would be to run ffprobe as a separate process using
fork() and execv() on Linux, or CreateProcessW() on Windows. Optionally
you can use pipes to redirect the stdout of ffprobe to your parent
application.
A quick online search finds this code example for C (have not tested it
but the general concept looks fine to me):
https://stackoverflow.com/a/83456
Good luck,
Tobias
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".