Am 24.01.2014 22:47, schrieb Carsten A. Arnholm:
> On 18. jan. 2014 15:09, Carsten A. Arnholm wrote:
...
>>
> Hi Tommi, all
>
> I have now another question relating to tntnet in general, but also
> raspberry pi, as I have just installed the raspberry pi camera, see
> http://www.raspberrypi.org/camera for info on the camera.
>
> The camera works perfectly, and I am able to get high quality video as
> well as still images.
>
> Clearly, one could use tntnet to capture still images remotely with this
> camera, and show in the browser. But what about streaming video? If we
> assume a fast enough network, would something like that be possible with
> tntnet without too much difficulty?
>
> Carsten Arnholm
Hi,

there is a project named vdr, which implements a video disk recorder 
based on linux. And there is a web front end as a plugin available, 
which runs on tntnet: http://www.vdr-wiki.de/wiki/index.php/Live-plugin. 
They stream videos via tntnet. It is more a download of videos, which 
are then showed in the browser. But it works.

One problem they encountered was the watchdog feature of tntnet. Tntnet 
expects, that a component returns within 10 minutes. If it does not, 
tntnet restarts itself for safety reasons, because tntnet thinks the 
component is in a endless loop. The solution is calling 
"request.touch()" regularly to tell tntnet, that the component is still 
working.

Another problem, which happens in case the video is actually a stream 
is, that tntnet needs the content size before it starts sending the 
stream. The content size is needed since it is part of the http header. 
The solution is to use chunked encoding. Unfortunately tntnet do not 
support it yet. Tntnet allows a component always to fail. Even at the 
very end of the processing of the component, the component might decide 
to throw an exception. In case of a exception tntnet sends a http error 
500: internal server error. But it can only send the error code, when it 
has not sent anything. Therefore the content is collected in a buffer 
and sending is done, when the component has successfully finished. Then 
tntnet can be sure, that no error happens any more.

Using chunked encoding might be an interesting feature for tntnet. A 
component should be able to call "reply.setChunkedEncoding()", in which 
case the component is not allowed to fail any more but can send data 
synchronously to the client. Any opinions?


Tommi

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to