Hi! I believe the problem is that your boundary is set to "--MyBoundary\r\nContent-Type: ..." which works fine for the first frame, but because the JPG doesn't (usually) end with "\r\n" this is not a valid boundary for the subsequent frames. You need to use "\r\n--MyBoundary\r\nContent-Type: ..." so that the browser detects the boundary correctly.
At least that's my best guess right now. Generally, you should probably use wireshark to look at the HTTP stream that you're generating, that way you can likely tell yourself if it looks 'correct'. Happy hacking! Christian On 08/19/14 09:42, Kiran G wrote: > Hi all, > > I am trying to implement MJPEG streaming server using MHD. I have > attached my test code. > > Basically I am looping through a directory with JPEG files to create > each frame. And I am able to start the process without any error. > > But fetching the URL using wget gets stuck . Vlc player shows the first > frame only. > > I suspect there is some issue with buffer handling in the callback > function. Please take a look and let me know if you find any issues in > my code(Please note that this is just POC code). Also If there is a > publicly available implementation of MJPEG server using MHD please let > me know. > > Thanks for your time. > > Regards, > Kiran G > > > >
