MJPEGWriter icon indicating copy to clipboard operation
MJPEGWriter copied to clipboard

Can compile on both Windows and Linux

Open thomasarmel opened this issue 3 years ago • 6 comments

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 :)

thomasarmel avatar Jun 01 '21 18:06 thomasarmel

mjpeg.zip Compiled with Visual Studio Enterprise 2019 and CLion

thomasarmel avatar Jun 01 '21 18:06 thomasarmel

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.

JulesThuillier avatar Jun 03 '21 09:06 JulesThuillier

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 ?

thomasarmel avatar Jun 03 '21 21:06 thomasarmel

One more precision: I suggest you to compile with a recent release of OpenCV or at least compile with libjpeg-turbo support.

thomasarmel avatar Jun 03 '21 21:06 thomasarmel

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 😅

JulesThuillier avatar Jun 04 '21 09:06 JulesThuillier

Ok thank you have a nice "coding we" ^^

thomasarmel avatar Jun 04 '21 09:06 thomasarmel