diff options
author | Corentin Chary <corentincj@iksaif.net> | 2011-02-04 09:06:01 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-02-23 16:28:28 -0600 |
commit | 148954faca586c42e5a4b06bc3ac67bd44e7fd83 (patch) | |
tree | d66e1b6014f9f901f75e7b24cfa923a768fb5111 /ui/vnc.h | |
parent | f8562e326bb8bf084b7519a53c6f30627b80ac1e (diff) |
vnc: Add ZRLE and ZYWRLE encodings.
Add ZRLE [1] and ZYWRLE [2] encodings. The code is inspire^W stolen
from libvncserver (again), but have been rewriten to match QEMU coding
style.
[1] http://www.realvnc.com/docs/rfbproto.pdf
[2] http://micro-vnc.jp/research/remote_desktop_ng/ZYWRLE/publications/
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/vnc.h')
-rw-r--r-- | ui/vnc.h | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -39,6 +39,8 @@ #include <stdbool.h> #include "keymaps.h" +#include "vnc-palette.h" +#include "vnc-enc-zrle.h" // #define _VNC_DEBUG 1 @@ -180,6 +182,20 @@ typedef struct VncZlib { int level; } VncZlib; +typedef struct VncZrle { + int type; + Buffer fb; + Buffer zrle; + Buffer tmp; + Buffer zlib; + z_stream stream; + VncPalette palette; +} VncZrle; + +typedef struct VncZywrle { + int buf[VNC_ZRLE_TILE_WIDTH * VNC_ZRLE_TILE_HEIGHT]; +} VncZywrle; + #ifdef CONFIG_VNC_THREAD struct VncRect { @@ -273,7 +289,8 @@ struct VncState VncTight tight; VncZlib zlib; VncHextile hextile; - + VncZrle zrle; + VncZywrle zywrle; Notifier mouse_mode_notifier; @@ -377,6 +394,8 @@ enum { #define VNC_FEATURE_COPYRECT 6 #define VNC_FEATURE_RICH_CURSOR 7 #define VNC_FEATURE_TIGHT_PNG 8 +#define VNC_FEATURE_ZRLE 9 +#define VNC_FEATURE_ZYWRLE 10 #define VNC_FEATURE_RESIZE_MASK (1 << VNC_FEATURE_RESIZE) #define VNC_FEATURE_HEXTILE_MASK (1 << VNC_FEATURE_HEXTILE) @@ -387,6 +406,8 @@ enum { #define VNC_FEATURE_COPYRECT_MASK (1 << VNC_FEATURE_COPYRECT) #define VNC_FEATURE_RICH_CURSOR_MASK (1 << VNC_FEATURE_RICH_CURSOR) #define VNC_FEATURE_TIGHT_PNG_MASK (1 << VNC_FEATURE_TIGHT_PNG) +#define VNC_FEATURE_ZRLE_MASK (1 << VNC_FEATURE_ZRLE) +#define VNC_FEATURE_ZYWRLE_MASK (1 << VNC_FEATURE_ZYWRLE) /* Client -> Server message IDs */ @@ -521,4 +542,8 @@ int vnc_tight_png_send_framebuffer_update(VncState *vs, int x, int y, int w, int h); void vnc_tight_clear(VncState *vs); +int vnc_zrle_send_framebuffer_update(VncState *vs, int x, int y, int w, int h); +int vnc_zywrle_send_framebuffer_update(VncState *vs, int x, int y, int w, int h); +void vnc_zrle_clear(VncState *vs); + #endif /* __QEMU_VNC_H */ |