MJPEGWriter
MJPEGWriter copied to clipboard
Can compile on both Windows and Linux
Hello, I've made some changes but the most important thing is you should be able to compile under windows too. I've used std::thread instead of Posix pthread(). I haven't made any change on the Authorization branch. Thanks for your job :)
mjpeg.zip Compiled with Visual Studio Enterprise 2019 and CLion
Hello ! Thank you for porting this soft to Windows.. I am trying to use it in Windows 10, VS2019, C++14, but I am encoutering a issue as son as it starts. "unlocked of unowned mutex", in th efirst line of MJPEG::write(cv::Mat frame), when trying to lock mutex_writer. Any idea ? I am looking into fixing this issue, I'll post it here if I find the answer.
Hello @JulesThuillier , Important precision: the code runs only in Release mode on my machine, because of OpenCV (but compiles well in both cases). What about running directly my program from the message above ? Actually I only "cleaned" the code, standardized it from C-like functions to C++ SL and added the correct #define for the cross-platform compilation. I compiled the code with C++ 11 and OpenCV 4, what about you ?
One more precision: I suggest you to compile with a recent release of OpenCV or at least compile with libjpeg-turbo support.
Hello @thomasarmel, I actually found a fix yesterday, I'll propose a solution on your git as a PR you'll tell me what you think about it. I might do it only next week thought I just took some holidays 😅
Ok thank you have a nice "coding we" ^^