PhotoBridge home at frequal.comfrequal.com

VNC Viewer for the Roku PhotoBridge HD

Summary

I have written a VNC Viewer for the Roku PhotoBridge following the design described below. For more information visit the VncSix main page.

VncSix is a VNC Viewer for the Roku PhotoBridge HD. Currently it can show the remote display, as well as send mouse movements, clicks, and keystrokes to the server. This is enough to perform most tasks from the PhotoBridge remotely.

Future Features

Several changes and improvements are planned to VncSix, in expected implementation order:

Automatic Support Of Any Server Resolution

VncSix should automatically adapt to any server resolution. To do so the handleVncComm function must be split into a connection phase function (that includes Connect and Initialise) and a RFB handling phase. The connection phase should be called first in VncSixApp::OnMaterialize. Then the hard-coded 1024x768 there could be replaced by the values from si.framebuffer[Width|Height].

Further changes and debugging are needed. This has been impleemnted but it only works properly for 1024x768. 1920x1080 shows only slightly less than half of left side of the screen. 800x600 is completely garbled.

It appears that the ARGB8888 color format has problems with resolutions wider than 1024 pixels. VncSix will be converted to tuse the RGB565 color space. [Update: this is implemented in version 0.7]

Encrypted Password Storage

VncSix should store server/password pairs in a file for later reuse. The password should be encrypted so that causal snooping won't expose it. vncEncryptAndStorePasswd provides this functionality in the file vncauth.h.

With minor changes, the vncauth code can be changed to encrypt and decrypt passwords and return the encrypted/decrypted strings. Then the strings could be stored in the Roku settings/preferences for VncSix. One master string called "ServerList" would list the addresses (including ":1") separated by spaces. Then, for each address in ServerList there would be one entry listing the encrypted password.

There should be a command-line application storepasswd that takes a server string and a password and writes it into the settings. The application should connect to the server using the store password if only one is in the saved settings. If a server is specified on the command-line the application should connect to that server using the stored password if available in the settings. This would allow a one-time setup of the saved passwords usign the command-line tool, and application shortuts to be setup for the different servers, each of which would connect without asking for a password.

Mouse Movement And Clikcing

VncSix allows the direction buttons on the remote to move the mouse cursor, and the select button to send a left-mouse-click.

Mouse movement accelerates as the direction button is held down longer and longer, to allow for large mouse moves in an acceptable amount of time.

One area of investigation is the concept of local and remote mouse cursors. In the current VncSix code, the only mouse command that can be sent to the server is a button press at a certain location. This means that a local mouse cursor would have to be displayed and moved based on arrow buttons. It would be preferable if the remote mouse cursor could be moved, and a button-press event sent that doesn't specify the location but instead uses the remote location. But this may not be supported on the server side. [Update: using the SendPointerEvent function with a zero button mask (all buttons up) it is possible to move the remote mouse cursor without clicking the mouse. This is now implemented.]

Aspect Ratio Preservation

Many computer displays use a 4:3 aspect ratio (1024x768, 800x600, 1280x1024, etc.). However, the Roku PhotoBridge is usually connected to an HDTV, which has a 16x9 aspect ratio (1920x1080 or 1280x720). In the current version (0.5) VncSix stretches the server display to fill the PhotoBridge display, resulting in distortion. This can be temporarily avoided (on Unix at least) by launching the vncserver with a 16x9 aspect ratio, like so:
vncserver -geometry 1024x576
However, VncSix should be changed to automatically render the server image without distortion, letterboxing on the sides if need be. It should be possible to use the m_scalerOutputRect variable to achieve this.

Audio Support

It would be neat if audio could be transferred from the server and played on the PhotoBridge like video is currently. The VNCAudio project accomplished this some time ago. However, the changes aren't in the VncSix code base and would take some effort to merge. Additionally, the server side code appears to be separate and Unix-specific(?), so other solutions would need to be found for other server OSes.

Original Investigation Notes

I have been examining the source code for several VNC viewer flavors, including:

Design Notes

In no particular order:

Specific Changes to fbvnc

Future Input Possibilities


Last modified on 23 Nov 2006 by AO

Copyright © 2024 Andrew Oliver