Commit Graph

95 Commits

Author SHA1 Message Date
Gerd Hoffmann
a5145cc93e new watch api: switch channels 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
e8a2cca026 new watch api: switch sound 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
614fa00903 new watch api: switch migration 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
5549de4b10 new watch api: switch inputs 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
d54f1103fa new watch api: switch ssl accept 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
2dda5683b6 new watch api: switch main channel 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
1a69ea6627 new watch api: switch liasync read 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
d1ab29c1af new watch api: switch listening sockets 2010-05-19 11:22:06 +02:00
Gerd Hoffmann
4c67874a6d introduce new watch api
This patch adds a new file handle watch interface to libspice, featuring
three callbacks:

  (1) watch_add() -- create a new file watch.
  (2) watch_update_mask() -- change event mask.  spice frequently
                             enables/disables write notification.
  (3) watch_remove() -- remove a file watch.

libspice users must implement these functions to allow libspice
monitoring file handles.

The old interface (set_file_handlers) doesn't explicitly express the
lifecycle of a watch.  Also it maps 1:1 to a qemu-internal function.
In case the way qemu implements file watches changes (someone sayed
QemuIONotifier?) this will break horribly.  Beside that it is very
bad style.

Follwing patches will switch over users one by one to the new interface
and finally zap the old one.
2010-05-19 11:22:06 +02:00
Gerd Hoffmann
91f747ea1d fix visibility 2010-05-19 11:22:05 +02:00
Gerd Hoffmann
fe8b838341 zap CoreInterface->{term_printf,log}
Was used to print stuff to the qemu monitor.
Fundamentally incompatible with QMP.  Remove.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
3f7ea8e7a4 zap qterm interfaces
old way to handle monitor, obsolete.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
881c685f90 zap CoreInterface->(un)register_change_notifiers()
spice_server_add_interface() and spice_server_remove_interface()
can be used instead.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
df95728bf0 zap CoreInterface->next()
Interfaces must be registered after spice_server_init().
The "next" callback is used to discover interfaces
registered before spice_server_init().  Which is a empty
list and thus pretty pointless.  Remove it.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
43caec519e channel security cleanup
- drop spice_channel_name_t enum, use spice-protocol defines instead.
- switch spice_server_set_channel_security() channel parameter from
  enum to string.
- drop spice_server_set_default_channel_security(), use
  spice_server_set_channel_security with channel == NULL instead.
2010-05-19 11:22:05 +02:00
Gerd Hoffmann
edc1af5f67 zap spice_parse_args + spice_usage_str
First step to throw out the old interface.
2010-05-19 11:22:05 +02:00
Alexander Larsson
25bca7a286 Minor whitespace cleanup 2010-05-19 11:13:47 +02:00
Alexander Larsson
ee1e60c4a0 Make it --enable-tunnel work 2010-05-19 11:13:06 +02:00
Yonit Halperin
66a7c4a5e5 server: fix invalid self loop in surfaces dependencies.
Cyclic dependencies between surfaces mustn't occur. They can cause invalid rendering -
recent drawables might be rendered before older ones.
2010-05-03 16:40:37 +02:00
Dan Kenigsberg
270328e5c0 spice server: fix typo in private key error message 2010-05-03 16:40:37 +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
295c8ed8bc Don't send alpha bytes for primary surface
The framebuffer is not used as a source for alpha blends, so we never
need to scan it for alpha bytes.
2010-04-30 09:54:01 +02:00
Gerd Hoffmann
7425253cec iovec: add sanity check
Adds sanity check to iovec setup.  In theory this should never ever
trigger.  In practice guest driver bugs can make it trigger.  This
patch avoids qemu burning cpu in a endless loop, instead we'll print a
message and abort.  Not sure whenever there is a more graceful way to
handle the situation ...
2010-04-29 18:20:15 +02:00
Gerd Hoffmann
ae8429d0c5 fix worker->stop surface cleanup 2010-04-29 18:19:56 +02:00
Alexander Larsson
42e83e3843 Add support for SPICE_IMAGE_FLAGS_HIGH_BITS_SET 2010-04-28 15:43:41 +02:00
Alexander Larsson
c2f38a68ba If we have alpha in a 32bit rgb surface, ensure we send that
If we don't then alpha is lost which is problematic if the surface
is later used as with alpha_blend and SRC_SURFACE_HAS_ALPHA.
2010-04-23 16:41:47 +02:00
Alexander Larsson
395b5a5626 Server: Use the right image format when updating from a surface 2010-04-23 16:41:47 +02:00
Alexander Larsson
4f5a09a73d Make each surface its own depth/format
Surface creation now specifies the exact format, not only the bit depth
of each surface which is used for rendering.

Additionally we now actually store the surfaces in that format, instead
of converting everything to 32bpp when drawing or e.g. handling palettes.
2010-04-23 16:41:42 +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
Izik Eidus
99341e058f spice: server: change update_area command
The new command return dirty area to be used
by users that want spice to render localy or
into some framebuffer (sdl / vnc)

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-14 19:38:49 +03:00
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Alexander Larsson
288a9ad03f Use fast DCT method for better jpeg compression performance 2010-04-12 20:54:35 +02:00
Izik Eidus
ad1a4849ee spice server: fix validate_chunk
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-12 13:43:38 +03:00
Izik Eidus
03fb4e05be take the right lock when freeing glz stuff of surfaces
this was noticed by Yonit.

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-09 22:47:03 +03:00
Alexander Larsson
34fb3f6806 Split out the memslot stuff from red_worker.c to its own files
This is required so that we can have code in other files that does address
validation.
2010-04-09 16:51:52 +02:00
Yonit Halperin
a3700a1bfb server: fix race condition in lz global dictionary, in its image segments list 2010-04-09 10:11:09 +02:00
Alexander Larsson
de4306af33 Initialize _kill_mark so we don't get spurious valgrind warnings 2010-04-08 17:09:32 +02:00
Izik Eidus
80e1379ff6 spice server: fix not sent depth size for surfaces
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-08 10:25:07 +03:00
Yonit Halperin
4acf155fb2 server configuration: make network redirection support optional
By default it is disabled. To enable: configure --enable-tunnel.
When active, requires libslirp.
2010-04-06 17:45:04 +02:00
Izik Eidus
cc943035c9 spice server: try to be less brutal when changing res or when flushing the tree
The idea is that we can try to defer some stuff to be later
send in the pipe if the pipe is not fulled yet, moreover
we will then walk on the pipe using:
red_clear_surface_drawables_from_pipe() and will try to
remove the uneeded objects of this surface

Still some room to improvment but later...

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-06 02:02:38 +03:00
Izik Eidus
da2afcff8c spice server: remove surface_id and surfaces_dest[3] from guest mem
Validate the surface_ids just once and keep them in safe
memory area

Make things simpler

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-06 01:11:59 +03:00
Izik Eidus
9076297d1d spice-server: when destroying a surface don`t send uneeded items
Just skip the items of destroyed surface that are found in the pipe
before we skip them, we check if they are needed by other users...

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-05 07:39:05 +03:00
Izik Eidus
2ae3ab9e09 spice-server: remove glz objects related to surface when destroying a surface
make the surface released faster in the release ring
as well as clean unneeded reference into the glz

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-05 05:39:39 +03:00
Izik Eidus
925140aa03 spice: reds: fix uninitlized pointer
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-05 05:33:14 +03:00
Izik Eidus
4a208b3644 libspice: add off screens support
Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-03 05:35:31 +03:00
Izik Eidus
27a8ec1ef4 spice server: surface create/destroy protocol support
Now we can send commands from the server to the client
to destroy surfaces (right now just the primary surface)

Needed for offscreens support)

Another patch`s on the way.

Signed-off-by: Izik Eidus <ieidus@redhat.com>
2010-04-03 05:34:48 +03:00
Alexander Larsson
e9b5846704 Rename .so spice-server.so
Also change include dir to "spice-server" for consistency.

libspice.so conflicted with the tclspice package, and its also
a clarification for when we create a spice client library.
2010-03-24 17:13:42 +01:00
Alexander Larsson
4a36b98440 Get rid of more out-of-memory checks
We already check this in spice_malloc now
2010-03-24 15:57:33 +01:00
Yonit Halperin
66310f99e0 spice: server: Being more permissive in video identification
In 'filter' video streaming mode, use a more permissive threshold for distinguishing
'realistic' streams from 'textaul'/'artificial' streams. The previous threshold classified
streams that were scaled on the guest as artificial and thus they were not recoginized as videos.
2010-03-24 15:23:39 +01:00
Yonit Halperin
d2edac47cd spice: server: avoid video streaming of small images
I added a lower limit to the size of images that are being streamed.
The limit is only active in "filter" video streaming mode.
This will prevent blurry animated icons.
2010-03-24 15:23:07 +01:00