开发者

Browser rendering and streaming

I want to to render an application (e.g. a browser) in memory (not on screen) and stream the result of this rendering to a couple of remote desktops.

What options do I have? Is开发者_运维百科 there a Java framework (maybe based on OpenGL) that I can use for this?


OpenGL is a drawing API; totally unsuited for your demands; just telling you to clear things up.

The whole "do the thing off-screen" requires to hook into the lower parts of the graphics system. With Java this means serious tinkering with the JNI and probably also some native binary code. IMHO not worth the effort, as there is a much nicer solution:

Xorg has a X server that is backed by a VNC framebuffer (Xvnc). You can start a browser in such and if there's no window manager and desktop environment running, the browser will be the only thing visible, no decorations, titlebar or the like. Then you connect using VNC to that server and will see the picture of the browser only. Technically VNC is just a video stream of JPEG images, and there are tools to create a regular video stream from VNC.

X provides you an additional possibility: The Composite extension. X Composite provides a mechanism to transfer a window into an offscreen rendering area. The contents rendered to the offscreen area must be composited to the screen by a so called compositor. It is possible, though quite inefficient, to copy those offscreen images into process memory and from there build a video stream.


Depending on what you are trying to do, you could run you application on a linux box and stream the output of the application over SSH to an xserver on another machine. I believe that there are xservers available for Windows and MacOS, but this gets you pretty far away from Java.

http://www.vanemery.com/Linux/XoverSSH/X-over-SSH2.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜