[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Stopping MJPEG streams

From: David J Myers
Subject: [libmicrohttpd] Stopping MJPEG streams
Date: Tue, 8 Feb 2011 18:38:10 -0000


I’m having some trouble with my streaming MJPEG webserver. It’s basically about how a client webpage can cause the stream to stop and trigger the MHD_Content_Reader_free_Callback.


The webserver uses MHD_create_response_from callback with MHD_SIZE_UNKNOWN, and the Daemon is set for 2 second client timeouts.


So the webpage starts the stream with this line of html.


    <td rowspan="2" align="center" valign="top" style="border-right:dashed 1px grey;"><div id="div1" style="width:640px; height:480px; border:solid 1px red; position:relative; left:0px"><img src="mjpg/video.cgi?view=1" name="main1" /> </div>


Then there is a button on the webpage to stop the video, which causes this _javascript_ function to execute


function stop()





The blank jpeg is drawn into the div, but the webserver continues to stream the video and the reader free callback isn’t triggered.


Does anyone know how I can stop the stream without totally navigating away from the page?


Thanks and regards


David Myers


reply via email to

[Prev in Thread] Current Thread [Next in Thread]