| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To be able to enable/disable keyboard leds on X11, we need to query
the X server for which mask correspond to which led (NumLock,
CapsLock). So far this was done using XKeysymToKeycode and iterating
over X modifier mapping.
Xkb provides XkbKeysymToModifiers for this purpose, and since
we're using Xkb anyway, it makes more sense to use it.
At some point, on my Fedora 15 box, XKeysymToKeycode was returning
NoSymbol for CapsLock and NumLock leading to spicec not being able
to change the keyboard leds when qemu tells it to. However, I couldn't
reproduce this when I tried again :-/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
InputsChannel::handle_modifiers converts _modifiers which is a
bitflag of SPICE_KEYBOARD_MODIFIER_FLAGS_* to a Platform::*_MODIFIER
bitflag, which is what Platform::set_keyboard_lock_modifiers expects.
However, it's called with _modifiers, and the bitflag that this
function computes is never used. Pass the computed bitflag to
::set_keyboard_lock_modifiers since _modifiers format is meaningless
for ::set_keyboard_lock_modifiers.
This bug was harmless because the two different set of modifier
flags actually use the same values, so _modifiers and modifiers could
be used interchangeably. However it's more future-proof to use the
right format here.
|
| |
|
| |
|
|
|
|
|
|
| |
Even if VDAgentDisplayConfig::depth will be unused if the
VD_AGENT_DISPLAY_CONFIG_FLAG_SET_COLOR_DEPTH isn't set, it's
better to initialize it anyway to avoid warnings from valgrind.
|
| |
|
|
|
|
|
|
| |
3f8d7e59dbd94b1837503f37b5065698df3ffbc7 introduced a regression, after
sending one attach_channels message we never send another one.
Fix by resetting on disconnect.
|
|
|
|
|
| |
I forgot to handle SPICE_BITMAP_FMT_RGBA when mapping from
spice image formats to libjpeg-turbo colorspaces.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the changes to add libjpeg-turbo support to spice-server mjpeg
compression code, it's relatively easy to hit an assertion from
libjpeg in spice-server about "too few scanlines transferred" when
the mjpeg streaming code triggers. This assertion brings down qemu,
which is bad :)
This is because when we first initialize the mjpeg encoder, we do:
stream_width = SPICE_ALIGN(src_rect->right - src_rect->left, 2);
stream_height = SPICE_ALIGN(src_rect->bottom - src_rect->top, 2);
stream->mjpeg_encoder = mjpeg_encoder_new(stream_width, stream_height);
and then when we iterate over the image scanlines to feed them to
libjpeg, we do:
const int image_height = src->bottom - src->top;
const int image_width = src->right - src->left;
for (i = 0; i < image_height; i++) {
mjpeg_encoder_encode_scanline(...);
}
mjpeg_encoder_end_frame(...);
When stream_height is odd, the mjpeg_encoder will be created with
an height that is 1 more than the number of lines we encode. Then
libjpeg asserts when we tell it we're done with the compression
while it's still waiting for one more scanline.
Looking through git history, this rounding seems to be an artifact
from when we were using ffmpeg for the mjpeg encoding. Since
spicec and spicy (the latter needs a few fixes) can handle streams
with odd height/width, the best way to solve this issue is to stop
rounding up the height and width of the streams we create. This
even saves some bandwidth :)
|
|
|
|
|
|
|
|
|
|
|
| |
when changing resolutions due to the new async code paths the surface
creation command was kept by reference, and later, when the red_worker
signaled completion by calling async_complete the mouse mode was updated
using the reference. This caused the wrong values to be read resulting in wrong
resolutions set and a non working mouse pointer. Fix this by keeping a copy of
the surface creation command instead of a reference.
No bz. Found in testing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changelog from Arnon Gilboa, patch from me:
Commit eb6f55409412 caused the following regression:
When client runs without the auto-conf or disable-effects options
(either from CLI or controller), which is the case when using Spice
from Admin Portal, the client will unecessarily wait for 30sec before
connecting to a Windows guest with an agent running (this won't happen
with linux guests or without an agent running).
The mentioned patch assumed that on_agent_reply() of
VD_AGENT_DISPLAY_CONFIG will call send_main_attach_channels() and
connect. However, when auto-conf or disable-effects are not used,
on_agent_reply() will ignore the reply and not call
send_main_attach_channels(). Therefore, send_main_attach_channels()
will only be called on agent timeout.
The solution is to activate agent timer only if auto-conf or
disable-effects. Otherwise, simply call send_main_attach_channels().
Fixes rhbz #726441
|
|
|
|
|
| |
This also catches mingw32 which is probably fine, but at least it fixes
the build on visual studio.
|
|
|
|
|
|
| |
They were trying to convert the destination pointer to an integer before
trying to dereference it. The initial conversion was meant to be a cast
to a pointer of the right size, not to an integer.
|
|
|
|
| |
uint63_t should be uint64_t
|
|
|
|
|
|
|
|
| |
It is a bit early to bump, since a 0.9.1 release is not happening yet,
but this allows me to test if the vdagent SpiceCharInterface state callback
fixes are present or not in qemu code, and thus disabling the ugly vdagent
specific workaround from spice-qemu-char.c when compiling against a new
enough spice-server.
|
|
|
|
|
| |
See this long mail for the rationale for this:
http://lists.freedesktop.org/archives/spice-devel/2011-July/004837.html
|
| |
|
|
|
|
|
|
|
|
| |
It was sending the wrong data, the memory right after the VCSMsgHeader
which was actually not where the data was.
Fixed by having the header and data (VSCError, 4 bytes of the error code)
embedded in the ErrorItem pipe item.
|
|
|
|
|
| |
jpeg_mem_dest is a public symbol in libjpeg8 so using it with
no prefix will cause symbol clashes. Rename it to spice_jpeg_mem_dest.
|
|
|
|
|
|
| |
It's not used when we use jpeg-turbo colorspaces, so it's better
to allocate it when we know we'll need it rather than always
allocating it even if it won't be used.
|
|
|
|
|
|
| |
After the refactoring to optionally use libjpeg-turbo, some
of the functions that mjpeg-encoder used to provide are now no
longer used. This commit removes them.
|
|
|
|
|
|
| |
When libjpeg-turbo is available, we can use the BGR and BGRX
colorspaces that it provides to avoid extra conversions of the
data we want to compress to mjpeg
|
|
|
|
|
|
| |
The main point is to move the pixel conversion code into
the MjpegEncoder class to be able to make use libjpeg-turbo
additional pixel formats without the reds_worker code noticing.
|
|
|
|
|
| |
Returns the number of bytes per pixel corresponding to the input
data format.
|
|
|
|
|
|
| |
This API is meant to allow us to move the pixel format conversion
into MjpegEncoder. This will allow us to be able to use the
additional pixel formats from libjpeg-turbo when available.
|
|
|
|
|
|
| |
It takes a lot of arguments, "id" is unused, "frame" and
"frame_size" can be obtained from the "stream" argument, so
can get rid of 3 arguments to make things more readable.
|
|
|
|
|
|
|
|
|
|
| |
When encoding a frame, red_worker passes an allocated buffer to
libjpeg where it should encode the frame. When it fails, a new
bigger buffer is allocated and the encoding is restarted from
scratch. However, it's possible to use libjpeg to realloc this
buffer if it gets too small during the encoding process. Make use
of this feature, especially since it will make it easier to encore
one line at a time instead of a full frame in subsequent commits.
|
|
|
|
|
|
| |
When encoding to mjpeg, the on screen data have to be converted
to 24bpp RGB since that's the format that libjpeg expects. Factor
as much code as possible for the 3 formats we handle.
|
| |
|
| |
|
|
|
|
|
| |
2>&1 was typo'ed 2&>1 which caused an empty '1' file to be created
when running this test.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When the client connects to a spice VM, if an agent is detected,
there will be a few messages exchanged to exchange capabilities,
display resolutions, ... This exchange has a timeout in case
something goes wrong. However, when it fires, the client dies.
This commit changes this and lets the client connects to the
guest when the timeout happens.
rhbz #673973
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
492f7a9b fixed unwanted timeouts during initial client startup,
but it also caused a bad regression when connecting to
RHEL6+agent guests: the SPICE_MSGS_MAIN_ATTACH_CHANNELS message
was sent multiple times, once in RedClient::handle_init, then
once again in RedClient::on_agent_announce_capabilities (which
can even be triggered multiple times). Sending this message multiple
times is a big NO and causes the server to close the client connection,
and the client to die. Add a _msg_attach_message_sent boolean to
make sure we only send this message once.
rhbz #712938
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The check this patch removes causes us to not set vdagent to NULL, nor
update the mouse mode when the guest agent disconnects when no client is
attached. Which leads to a non working mouse, and on agent reconnect a
"spice_server_char_device_add_interface: vdagent already attached" message
instead of a successful re-add of the agent interface .
hansg: Note this is commit 443994ba from the 0.8 branch, which I did
not forward port back then because it seemed unnecessary on master, but it
turns out that the (wrong) check was just hidden in another place on master.
|
|
|
|
|
|
|
|
|
|
| |
The endless recursion happens due to Application::prepare_monitors calling RedScreen::resize
calling Application::rearrange_monitors calling Application::prepare_monitors
I changed RedScreen::resize not to call rearrange_monitors. Instead,
the monitor should be configured correctly from Application, before
calling resize.
In addition, I made some cleanups to allow reusing rearrange_monitors code.
|
|
|
|
|
|
|
| |
Having a loglevel variable is much more useful if we can actually change
its value without a recompile. Use a SPICEC_LOG_LEVEL environment variable so
we can do this from the spice xpi / activex too (by setting the environment
variable before starting the browser).
|
|
|
|
|
| |
When surfaces are being reloaded to the worker, we
will send them to the client only if and when it needs them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This does the following, all to remove any referenced memory on the pci bars:
flush_all_qxl_commands(worker);
flush_all_surfaces(worker);
red_wait_outgoing_item((RedChannel *)worker->display_channel);
red_wait_outgoing_item((RedChannel *)worker->cursor_channel);
The added api is specifically async, i.e. it calls async_complete
when done.
|
|
|
|
|
| |
when update_area_async is called update_area_complete will be called with
the surfaces dirty rectangle list.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new _ASYNC io's in qxl_dev listed at the end get six new api
functions, and an additional callback function "async_complete". When
the async version of a specific io is used, completion is notified by
calling async_complete, and no READY message is written or expected by
the dispatcher.
update_area has been changed to push QXLRects to the worker thread, where
the conversion to SpiceRect takes place.
A cookie has been added to each async call to QXLWorker, and is passed back via
async_complete.
Added api:
QXLWorker:
update_area_async
add_memslot_async
destroy_surfaces_async
destroy_primary_surface_async
create_primary_surface_async
destroy_surface_wait_async
QXLInterface:
async_complete
|
| |
|
|
|
|
|
|
|
|
|
| |
For each callback in QXLWorker, for example QXLWorker::update_area, add
a direct call named spice_qxl_update_area.
This will (a) remove the pointless indirection and (b) make shared
library versioning alot easier as we'll get new linker symbols which
we can tag with the version they appeared in the shared library.
|
| |
|
| |
|