Commit Graph

61 Commits

Author SHA1 Message Date
Alon Levy
0e16cadc70 Make CEGUI optional
This makes the CEGUI dependency optional and off by default. Restoring
previous behaviour of exiting on disconnect if disabled.
2010-07-01 13:48:58 +02:00
Yonit Halperin
59152e31f0 client: add --include "common.h" for generated marshallers 2010-06-29 13:59:46 +02:00
Alexander Larsson
7e26ff3c26 Replace log4cpp with custom log function
Also prints a simpler error to stderr for WARN or above so that
we print something on the commandline if something go wrong.
2010-06-28 21:54:53 +02:00
Alexander Larsson
dc8625c7e1 Make pointers 32bit in new protocol format 2010-06-23 16:33:07 +02:00
Alexander Larsson
2788b2ec46 Generate marshaller/demarshallers for old protocol 2010-06-22 17:34:39 +02:00
Yonit Halperin
25bb38f643 applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00
Alexander Larsson
cfc1e95bda Make opengl optional, disabled by default
The OpenGL renderer isn't really useful right now, its not quite up
to date, its not really faster than software and it only supports a limited
subset of drivers. So, lets disable it for now.

Long term opengl rendering of the 2d part of spice is important if we want
to combine 2d and 3d rendering (say if spice adds opengl support in the
protocol). But until then this is isn't useful for normal use.
2010-06-21 14:50:18 +02:00
Alexander Larsson
ae4436215c Make generated marshallers build on win32 2010-06-18 21:10:25 +02:00
Alexander Larsson
1a0b3fbdbb Generate demarshalling code on win32 too 2010-06-18 16:32:11 +02:00
Alexander Larsson
4154d70289 Client: Use the autogenerated demarshallers
When a message has been read from the network we now pass it into
the generated demarshaller for the channel. The demarshaller converts
the network data to in-memory structures that is passed on to the
spice internals.

Additionally it also:
* Converts endianness
* Validates sizes of message and any pointers in it
* Localizes offsets (converts them to pointers)
* Checks for zero offsets in messages where they are not supported

Some of this was previously done using custom code in the client, this
is now removed.
2010-06-18 16:32:11 +02:00
Yonit Halperin
263646a1f7 JPEG support: introducing jpeg encoding for spice bitmaps 2010-06-09 11:40:25 +02:00
Alexander Larsson
ae40f270cf Remove all mentions of "cairo" from the code
The command line option is renamed from "cairo" to "sw", and
similarly all filenames and types from Cairo to Sw (and similar).
2010-05-03 12:38:02 +02:00
Alexander Larsson
fcbd3208fc client: Report window format right for win32 2010-04-29 13:34:44 +02:00
Alexander Larsson
1e4ec1f513 client: Support 16bpp pixmaps on win32 2010-04-29 13:34:16 +02:00
Alexander Larsson
a1ec6e065a Fix up win32 client with recent changes 2010-04-23 16:41:47 +02:00
Alexander Larsson
774e5bd36f Client: Support pixmap format conversion in copy_pixels
In order to be able to support 16bit canvases on 32bit screens and 32bit
canvases on 16bit screens we need to handle format conversion when drawing
RedPixmaps.

The way this works now for X11 is that we only have one PIXELS_SOURCE_TYPE
for pixmaps, which always has a pixman_image_t for the data, but additionally
it has an XImage (shared mem or not) if the screen the pixmap was created
for (i.e. an explicit one or the default screen) has the same format as
the pixmap.

When we draw a pixmap on a drawable we have two variants. If the pixmap
has a XImage and it matches the format of the target drawable then we
just X(Shm)PutImage it to the drawable. If the formats differ, then we
create a temporary XImage and convert into that before drawing it to
the screen.

Right now this is a bit inefficient, because we always allocate a new
temporary image when converting. We want to add some caching here, but
at least this lets things work again.
2010-04-23 16:39:13 +02:00
Alexander Larsson
2d6fbde89b Move RedPixmap::Format to RedDrawable::Format
We need to know the format for other drawables too (like for instance
the native format of a window), so we're pushing this down.

This changes a bunch of references to be RedDrawable::, but not all.
The the old RedPixmap:: references still work, but will be phased out.
2010-04-23 16:36:35 +02:00
Alexander Larsson
98d91203c5 Make client canvas and pixmaps handle more formats and simplify
We now support 16bit format pixmaps as well as the old ones. Including
both 555 and 565 modes.

We drop the palette argument for pixmap construction as it was only
used for black/white anyway.

Canvas creation is simplified so that there is no separate set_mode
state. Canvases are already created in the right mode and never change.
2010-04-23 16:36:35 +02:00
Alexander Larsson
ee04978272 Add emacs modelines to more files 2010-04-23 16:36:31 +02:00
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Alexander Larsson
3f94cad657 Use upstream name for pthreads lib and new freetype version 2010-04-12 21:43:16 +02:00
Izik Eidus
22d1ac9eb5 spice: win32 client: fix gdi locking
While the fix could have been more effective,
it seems like this patch stream better with the coding
logic that was there..., maybe later we will want to change
the locking into more effective way.

(There is just the primary surface to protect in reiality)

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-09 05:09:02 +03:00
Alexander Larsson
5059c304be Use libjpeg to decode mjpegs, not ffmpeg
This is pretty straightforward, although there are two weird issues.
The current encoder has two bugs in the yuv conversion. First of all
it switches red and blue, due to something of an endianness issue. We
keep this behavior by switching red and blue. Maybe we want to
change this in the new protocol version since switching this may
cause jpeg compression to be worse.

Secondly, the old coder/decoder did rgb to/from yuv420 wrongly for
jpeg, not using the "full scale" version of Y that is used in jpeg,
but the other one where y goes from 16 to 235. (See jpeg/jfif
reference on http://en.wikipedia.org/wiki/YCbCr for details.)
The new decoder uses the full range in order to get better quality,
which means old encoders will show slightly darker images.

This completely removes all ffmpeg usage in the client
2010-04-08 11:30:18 +02:00
Alexander Larsson
ed568302ad Update project file to visual studio 2008 2010-04-08 09:30:16 +02:00
Alexander Larsson
440ac41cf1 New memory allocators that exit on OOM and handle multiplication overflow
Every place that does a regular malloc/calloc and aborts on failure
should use spice_malloc/spice_mallo0 instead, which is leaner and cleaner.

Allocations of dynamically sized arrays can use g_malloc_n or g_new etc
which correctly handle multiplication overflow if some of the arguments
are not trusted.
2010-03-11 12:13:59 +01:00
Alexander Larsson
90c5766caf Use macros from <spice/macros.h> rather than duplicate them 2010-03-09 11:10:00 +01:00
Alexander Larsson
4f097150cb Fix up win32 build reference to pixman_utils.cpp
It was pointing to the wrong directory for pixman_utils.cpp
2010-03-05 17:17:23 +01:00
Larsson@.(none)
d425690875 Update visual studio project for pixman changes 2010-03-01 15:12:37 +01:00
Alexander Larsson
1caa4b65c5 Remove no longer needed CAIRO_CANVAS_CACH_IS_SHARED define and code 2010-02-23 22:52:06 +01:00
Alexander Larsson
16540e9953 Use the new header names
I just ran:
 find -name "*.[ch]" | xargs sed -i -f ../spice-protocol/includes.sed
 find -name "*.cpp" | xargs sed -i -f ../spice-protocol/includes.sed
2010-02-04 18:49:05 +01:00
Alexander Larsson
1f51697852 Rename symbols that were changed in spice-protocol
This is an automatic change using:
$ find -name "*.[ch]" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
$ find -name "*.cpp" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
2010-02-04 18:49:00 +01:00
Yaniv Kamay
8ceb531958 client: add Platform::term_printf
Platform::term_printf is a variant of printf that
on windows dynamically opens console in order to
have visible output during command line processing.
2010-01-11 19:57:29 +02:00
Yaniv Kamay
ad12181027 client: move log file to spicec appdata dir 2010-01-11 19:30:39 +02:00
Yonit Halperin
3eae1c80d9 server,client: server authentication for secured channels.
3 available mechanisms:  by public key, by host name, and by certificate subject name.
In the former method, chain of trust verification is not performed.
The CA certificate files are looked for under <spice-config-dir>/spice_truststore.pem

windows <spice-config-dir>=%APPDATA%\spicec\
linux <spice-config-dir>=$HOME/.spicec/
2010-01-11 19:10:54 +02:00
Arnon Gilboa
dcf326cfd5 spice: menu additons
-functions: set_name, remove_command, remove_sub, clear
-item state & enum
-add state support in RedWindow insert_command & insert_menu
2010-01-07 13:53:41 +02:00
Arnon Gilboa
6dd05455fb spice: add missing break 2010-01-06 17:26:23 +02:00
Yaniv Kamay
c362f8473b client: use spice icon instead-of solidice icon 2010-01-04 21:13:03 +02:00
Arnon Gilboa
ea9af22e62 spice: position mouse in primary monitor center after full screen toggle
-move _focused & _pointer_in_window from RedWindow to RedWindow_p's
-move shadow focus & cursor handling to sync()
-add reset_cursor_pos() to Platform
-Monitor set_mode()/restore() use virtual do_set_mode()/do_restore()
2009-12-30 22:15:02 +02:00
Arnon Gilboa
02a07b2c06 spice: on_activate_screen generates on_key_down for any modifier pressed
-call SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc...) only once, in RedWindow::init()
-add Application::cleanup_globals() & RedWindow::cleanup()
-cleanup LowLevelKeyboardProc()
2009-12-30 22:09:25 +02:00
Yaniv Kamay
76fc1dd847 client: remove splash image 2009-12-28 12:39:37 +02:00
Yaniv Kamay
68fb440129 client: add GUI infrastructure + functional login dialog 2009-12-28 12:38:58 +02:00
Yaniv Kamay
ce480b0733 client: add soft renderer and cegui 2009-12-28 12:37:01 +02:00
Yaniv Kamay
321d375b5e win client: change avcodec version to 51 2009-12-24 00:45:20 +02:00
Yaniv Kamay
a0a1a973d8 client: new static title image 2009-12-23 22:29:15 +02:00
Yaniv Kamay
6c5966d8ed client: KeyHandler now receive unicode char event in addition to RedKey events 2009-11-30 18:22:13 +02:00
Yaniv Kamay
3b51087b36 client: interactive screen layer 2009-11-30 18:03:35 +02:00
Arnon Gilboa
3cabc1c1e7 spice: pass modifiers stroke events down the hook chain 2009-11-18 13:42:48 +02:00
Arnon Gilboa
56eb1acb9e spice: add [pid:tid] to log lines 2009-11-18 13:36:43 +02:00
Arnon Gilboa
8b36ed5460 spice: on toggle_full_screen, generate on_key_down if shift is still pressed 2009-11-18 13:25:06 +02:00
Yaniv Kamay
c7346dd0cb client: change jitter buffer size to 300ms 2009-11-16 00:04:03 +02:00