In our team, we were faced with a choice: we need to call external third-party code and process its output from our C # code.
Third-party code is available in two forms: a set of dll and one exe file (which probably calls these dll ). And possible approaches may be as follows: use the Process.Start to run the executable file and get its output. And one more thing is to call the dll directly.
I'm trying to figure out which approach we should use.
On the one hand, calling an executable file is simple, but on the other, it does not feel reliable.
On the one hand, calling dll seems to be the more correct way to complete the task, and on the other, it can be a very difficult task to provide C# binding for all functions that we have in native C code.
But I need to conduct a more substantial analysis on this topic in order to make a final decision. I was faced with the same question before someone, perhaps you could share your location.
It would be very helpful!
EDIT . I am talking about video conversion in this particular case. I need to get a video stream from a user and convert it to one video format for everyone. To complete the task, you can call ffmpeg , and everything is fine until something happens, and I need to either restart the encoding or take some action. I could not estimate how long it would take, and if I need to convert several videos in parallel ffmpeg will not be as flexible as I plan ...
At least I see it now. There may be more problems logging in.
shytikov
source share