| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Avoid overflows using its values.
The patch was originally written by Christophe Fergeau
Acked-by: Victor Toso <victortoso@redhat.com>
|
|
|
|
|
|
| |
The AudioVolume and AudioMute messages are not sent by the client, so
they do not need to appear in SpiceMessageMarshallers in
client_marshallers.h
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clients that support multiple codecs must advertise the
SPICE_DISPLAY_CAP_MULTI_CODEC capability and one
SPICE_DISPLAY_CAP_CODEC_XXX per supported codec.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
(cherry picked from spice-protocol commit 7937915d67702a5c4b5147b277c432f5555e3852)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add 2 new messages to the display channel to stream pre-rendered GL
images of the display. This is only possible when the client supports
SPICE_DISPLAY_CAP_GL_SCANOUT capability.
The first message, SPICE_MSG_DISPLAY_GL_SCANOUT_UNIX, sends a gl image
file handle via socket ancillary data, and can be imported in a GL
context with the help of eglCreateImageKHR() (as with the 2d canvas, the
SPICE_MSG_DISPLAY_MONITORS_CONFIG will give the monitors
coordinates (x/y/w/h) within the image). There can be only one scanount
per display channel.
A SPICE_MSG_DISPLAY_GL_DRAW message is sent with the coordinate of the
region within the scanount to (re)draw on the client display. For each
draw, once the client is done with the rendering, it must acknowldge it
by sending a SPICE_MSGC_DISPLAY_GL_DRAW_DONE message, in order to
release the context (it is expected to improve this in the future with a
cross-process GL fence).
The relation with the existing display channel messages is that all
other messages are unchanged: the last drawing command received must be
displayed. However the scanout display is all or nothing. Consequently,
if a 2d canvas draw is received, the display must be switched to the
drawn canvas. In other words, if the last message received is a GL draw
the display should switch to the GL display, if it's a 2d draw message
the display should be switched to the client 2d canvas.
(there will probably be a stipped-down "gl-only" channel in the future,
or support for other streaming methods, but this protocol change should
be enough for basic virgl or other gpu-accelerated support)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
(cherry picked from spice-protocol commit 3fc2221e965623c5a7e50d95f1623269a067c2d3)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
|
|
|
| |
No need to use an uint8 typed member, we can directly use the
appropriate enum8 type here, which makes everything more explicit.
(cherry picked from spice-protocol commit 8a3def14e35039753097094ba356e85e8fc2d128)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Re-using the SPICE_IMAGE_COMPRESS_ prefix in newer spice-protocol
releases is going to cause issues as there will be clashing enum members
in older spice-server releases. Using SPICE_IMAGE_COMPRESSION_ as a
prefix sidesteps these backward compability issues.
(cherry picked from spice-protocol commit e857cd9a378cdf56805b64284491a12af93a7cbf)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is a left-over from the fd passing commit 267391c8fd as
suggested by Frediano Ziglio during review.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
(cherry picked from spice-protocol commit 47076559628d71c128e14e11147ce36b92677885)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new type, "unix_fd", used to describe file descriptor sharing via
socket ancillary data (these messages are local only).
The marshaller/demarshaller can't serialize this in memory (consume_fd
implementation is empty), so it is the responsability of the marshaller
user to handle sending and receiving the handles, which are appended at
the end of the message with an extra stream byte (because some Unix
requires sending at least a byte with ancillary data).
Even if there is no fd to send (or if the fd is invalid etc), the
receiver side expects an extra byte anyway.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
(cherry-picked from spice-protocol commit 267391c8fd7c90c067b3e4845ff0227a2580e2e2)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7665dcf1bb2fa0b16b3d0015b28d7f5912664c3f.
Also revert the related build-sys changes to fix the build.
codegen generated code depends on spice-common code (marshaller,
messages etc), it makes more sense to keep the generator along
this. Otherwise a newer protocol release will fail to build older
projects.
*.proto files are required as well, since it generates code that parent
modules depend on unconditionnaly.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
|
|
|
|
|
|
| |
This test is sensitive to G_MESSAGES_DEBUG variable. Make it insensitive
by unsetting the environment variable.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
|
|
|
| |
has_fd was not initialized.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Marc-André Lureau <mlureau@redhat.com>
|
|
|
|
|
|
|
|
|
| |
In some cases, it might be worth to be able to send a message with a -1
fd, has the protocol permits. Change add_fd/get_fd in order to track
if the caller wanted to send -1.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
|
|
| |
Change the default option to "auto"
Acked-by: Victor Toso <victortoso@redhat.com>
|
|
|
|
|
|
|
| |
Code is in the slow path, this reduce space needed for data+code.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
|
|
|
| |
avoid to compute the string length twice and use memcpy instead of
strcpy which is faster not having to check for terminator.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
|
|
|
| |
Actually not causing problems as when used is always followed by another
terminator but better to fix the definition.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
|
| |
It's redundant with spice_warn_if_fail(), and can even be confusing.
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gives us a baseline of how the SPICE/glib integration is supposed
to behave.
Everything goes through glib logging facilities, and is impacted by
G_MESSAGES_DEBUG/G_DEBUG=fatal-{warnings,criticals}
Messages in the SPICE_LOG_DOMAIN log domain (output either through
spice_log() or g_log()) will also consider the legacy SPICE_DEBUG_LEVEL
and SPICE_ABORT_LEVEL environment variables. Messages in other domains
will not be impacted by these legacy environment variables.
If spice-common is built without SPICE_DISABLE_ABORT,
spice_return_if_fail()/spice_critical() will abort the program.
g_return_if_fail()/g_critical() will not abort the program.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The next commit will introduce a test for log messages. As
libspice-common.la behaviour varies depending on whether
SPICE_DISABLE_ASSERT was defined at compile-time, this test will also
take into account this preprocessor define.
We are more likely to get a consistent build (SPICE_DISABLE_ASSERT being
the same when building libspice-common.la and the test) if both are
built at the same time.
This commit changes that, tests are now built (but not run) at 'make'
time rather than 'make check' time.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
spice-common has been duplicating glib logging methods for a long while.
Now that spice-common is depending on glib, it's more consistent to use
glib logging too. However, the code base is still using spice logging
functions.
This commit aims to make spice logging go through glib logging system,
while keeping the same behaviour for the SPICE_ABORT_LEVEL and
SPICE_DEBUG_LEVEL environment variables. They are deprecated however in
favour of the glib alternatives (G_DEBUG and G_MESSAGES_DEBUG).
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
|
|
|
|
| |
If header guards are working as expected, there should not be multiple
definitions of these macros. If they are redefined somewhere else, this
is a bug we want to fix.
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
|
| |
No need to have our own SPICE_STMT_BEGIN/END and SPICE_STRINGIFY
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
|
| |
It will be used in the server code
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
|
|
|
| |
See related protocol changes.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The marshaller can't serialize fd in memory stream. Instead, append the
fd to the marshaller structure. The marshaller user is responsible for
sending the fd when the message is sent. The fd to send can be retrieved
with spice_marshaller_get_fd().
Note: only a single fd is supported with this API, supporting multiple
fd is left for the future if it becomes necessary.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This is consistent with the rest of the code making clear
fields are pointers.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
|
|
|
|
| |
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
|
|
|
|
|
| |
It is not used by spice-common, but both server and client can use it.
Compared to current checks in spice-gtk and spice server this macro only
supports libsasl2.
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
| |
|
|
|
|
|
| |
The surface before conversion can be either LE or BE on a BE machine.
Check against both BE and LE color order on BE machine.
|
|
|
|
| |
Fixes color order on PowerPC when using jpeg compression.
|
|
|
|
| |
Fixes color order on PowerPC when using LZ4 image compression.
|
|
|
|
| |
Fixes color order on PowerPC when using LZ image compression.
|
|
|
|
| |
Fixes color order on PowerPC when using QUIC image compression.
|
|
|
|
|
|
|
|
|
|
|
| |
On LE machine, color order when creating surface will always be A/XRGB.
On BE machines the color order will sometimes be ARGB and sometimes BGRA/X.
This is because we actually create the surface two times on BE machines.
Once with BE order, and then again with LE order. Copying data inbetween
theese two surfaces will byteswap the colors automatically.
This change introduces cases for BGRA/X color byte orders on BE machines.
|
|
|
|
|
|
| |
After the previous commit, spice_bitmap_try_as_pixman() can be
simplified as its #ifdef WORDS_BIGENDIAN exactly match what the
PIXMAN_LE_ constants do.
|
|
|
|
|
|
|
|
|
|
| |
When using image compression on PowerPC architecture, colors are in
wrong order ARGB -> BGRA.
This commit introduces macros, that will change the color order
according to machine endianness.
Theese macros are similar to QEMU macros in qemu-pixman.h
|
|
|
|
|
|
| |
This allows libtool/automake to correctly add a dependency from
libspice-common.la to test_marshallers. With _LDFLAGS, the binary won't
automatically get rebuilt/relinked when the lib changes.
|
|
|
|
|
| |
autogen.sh fails on el6 unless the second argument to
AC_DEFUN([SPICE_WARNING]) is enclosed in []
|
|
|
|
|
| |
GInetAddress is a GObject, so we must unref anything we create with
g_inet_address_new_*
|
|
|
|
| |
It will return NULL if the string we pass it cannot be parsed.
|
|
|
|
|
|
|
|
|
| |
libcacard.h requires 2.5.1. Keep compatibility for older versions until
the transition in distros to the standalone version is done.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[ Christophe: add < 2.5.1 fallback ]
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
|
|
|
|
|
| |
Fix make distcheck both with standalone spice-common and with spice
server.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
This makes it possible to warn the developer that the GStreamer elements
needed at runtime are missing and give him a hint on how to fix the
issue.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|
|
|
|
|
|
|
| |
This simplifies checking for GStreamer modules by setting all the
variables we normally need.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
|