Hi Group!

> Tommi Mäkitalo hat am 29. Januar 2014 um 23:18 geschrieben:
[...]
> > I will make a tntnet application with a main program and two ecpp components
> >
> > vstream.ecpp  : the actual video stream using chunked encoding
> >
> > vcontrol.ecpp : A simple HTML page with a HTML5 tag to contain the
> > actual video image. This is where I am unsure, i am thinking something
> > like the code below, where HTML5 tag is used.
> >
> >
> >
> >      HTML5/Tntnet Video stream Demo
> > 
> > 
> > 
> >
> >
> > Does that make sense? If this is not the best way, please advice.
> >
> > The vstream.ecpp component must at first call reply.setChunkedEncoding()
> > and probably also reply.setContentType("video/h264);
> >
> > if the image format is H.264. Or is it necessary to use something else
> > wrt mime type? I will use FireFox on Kubuntu btw. I'm ok if it just
> > works in one browser for now.
> >
> > My understanding is then that the vstream component just loops "forever"
> > and captures data from the camera and sends each image frame to the
> > output stream, i.e. to reply.out();
> >
> > Tntnet will then create 8k chunks from the image data and send to the
> > browser.
> >
> > If reply.setChunkedEncoding() was not used, nothing would ever show in
> > this scenario, because the video would never be complete, right?
> >
> > Have I understood the setChunkedEncoding() feature correctly?

[..]

> Sounds very good. You have understood it right.
>
> Just 2 hints.
>
> You have to call setContentType before setChunkedEncoding since setting
> chunked encoding sends the headers. You can't manipulate the headers
> after that any more.
>
> And as already mentioned, you have to call request.touch() in your
> vstream-component from time to time. It is a really cheap call so it is
> no problem to call it very frequently.

Please, can you add this solution in the FAQ-site! Or better, as a
short howto?

Olaf

-------------------|-------------------|-------------------|-------------------|

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to