Commit Graph

438 Commits

Author SHA1 Message Date
Victor Toso
9bb75ff1d9 Rename NEWS to CHANGELOG.md
Uppercase + prefix to make Gitlab happy and format it properly.
This should also be the case for all other spice components in Gitlab.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-04-12 13:04:30 +00:00
Victor Toso
fc8f868949 ChangeLog: remove old one
Added 193c54c in 2010-02-04 by Alexander Larsson <alexl@redhat.com>
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-04-12 13:04:21 +00:00
Victor Toso
26ca56157c gitlab-ci: add fedora meson+autotools
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-04-12 13:04:17 +00:00
Victor Toso
2256fbe8f6 build-sys: automake: do not require NEWS and ChangeLog
Following patches will rename NEWS to CHANGELOG.md due Gitlab
integration and remove the currently empty ChangeLog.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-04-12 13:04:11 +00:00
Frediano Ziglio
0edf46218c Bump minor version to mark cleanup change
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-04-06 13:25:52 +01:00
Frediano Ziglio
f7ba19224d protocol: Generate enums.h again to remove old protocol definitions
spice.proto was updated to remove really old definitions,
update enums.h accordingly.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2019-03-29 16:06:32 +00:00
Frediano Ziglio
f6e4cb65da stats: Avoid holes in SpiceStat structure
The SpiceStat structure can be 20 or 24 bytes depending on alignment.
Being a memory mapped structure potentially used with lockless access,
it is not good to have it unaligned.
The only tool that we know of that reads this memory mapped file
(reds_stats) is able to detect if the structure is either 20 or 24
bytes and act accordingly so changing this structure won't affect the
behaviour (unless you have an old tool but as they are usually
packaged together this is quite improbable).
This will also help on Windows as in that system it is not possible
for reds_stats to implement the same discovery trick implemented on
Linux.  On Windows it is not possible to read the size of the file
mapping (on Windows to implement shared memory you can use a file
mapping not associated to a file).
The structure will change layout only on 32-bit architectures which is
not recommended nowadays (the 64-bit platforms that we support align
64-bit integers to 64 bits).

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2019-01-17 17:10:58 +00:00
Lukáš Hrázký
5ab9f2f7a5 Add the StreamMsgGraphicsDeviceInfo message
The message contains information about the graphics device and monitor
belonging to a particular video stream (which maps to a channel) from
the streaming agent.

Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-01-16 13:48:25 +00:00
Lukáš Hrázký
839cd8c1dd Add the VDAgentGraphicsDeviceInfo message
The message serves for passing the device address and device display ID
information for all display channels from SPICE server to the vd_agent.

Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-01-16 13:48:02 +00:00
Marc-André Lureau
578b92e635 build-sys: post-release version bump 0.12.16
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-01-11 21:31:05 +04:00
Marc-André Lureau
9e4414834d NEWS: prepare for 0.12.15 release
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-01-11 21:30:28 +04:00
Frediano Ziglio
334cef51d0 error_codes: Remove obsolete header file
This file was used by the old client to hold return error codes.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
2019-01-02 10:00:52 +00:00
Eduardo Lima (Etrunko)
ee136f0050 meson: Add declare_dependency statement
This is required in the case another project uses this one as a subproject

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-09-26 16:22:07 -03:00
Frediano Ziglio
beda5ec7a6 qxl_dev: Align QXLRam to 4 bytes
This avoids compilers detect misaligned access which can lead to
warnings.
In QEMU the structure is allocated at the beginning of a 4Kb page,
in Xspice is allocated with a calloc, so the structure will end up 4
bytes aligned as well with these users. We are not aware of other users
of QXLRam, but if there was, it's likely the struct would be at least
naturally aligned, so this change should not impact anyone.
Aligning to 4 bytes maintains the size of the structure unchanged
avoiding possible ABI changes.
clang currently generates an invalid function call if a misaligned
4 byte atomic operation is detected.

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1565766

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-07-11 10:19:45 +01:00
Christophe Fergeau
dca5931a3a meson: Post-release bump to 0.12.15
This was done for configure.ac earlier, but is missing in meson.build

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-06-21 14:43:45 +01:00
Frediano Ziglio
dec80bfe28 Fix typo in comment
extrenal -> external

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-06-21 11:27:09 +01:00
Snir Sheriber
5e2001b0ed Add support for h265 video codec
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-06-19 15:31:32 +01:00
Victor Toso
8460b25eec build-sys: post-release bump 0.12.15
Signed-off-by: Victor Toso <victortoso@redhat.com>
2018-06-01 12:17:48 +02:00
Victor Toso
d0cfb3648c NEWS: prepare for 0.12.14 release
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-06-01 10:09:13 +02:00
Frediano Ziglio
ccda863268 vd_agent: Do not define structures without fields
According to C standard the size of a structure without fields is
not defined (see
https://stackoverflow.com/questions/21851930/size-of-empty-structure-in-c-and-c).
As we almost only use GCC currently these structures are of size 0.
This can became a problem if 2 sides talking a given protocol use
these structures.
To avoid such possible mismatch (for instance having one side C and
the other C++ which defines these structures as having 1 as size) add
an empty (0-size array) field.
Although a 0-size array is not considered also that portable we use
extensively this feature with different compilers never encountering
issues.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
2018-05-31 17:20:54 +01:00
Frediano Ziglio
33b52556e5 Remove obsolete files used to help renaming some identifiers
These files were added in 2010.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2018-05-08 17:24:05 +01:00
Eduardo Lima (Etrunko)
440b515086 Add support for building with meson
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-05-08 10:38:22 +01:00
Victor Toso
545fbb8b11 streaming: define max of number of concurrent streams
This definition is lacking in client while in server it is hardcoded
to 50. Having a well defined limitation allow us to make the code
more robust and optimized.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-05-05 12:52:11 +01:00
Frediano Ziglio
87441524f4 stream-device: Define an enumeration to store capabilities constants
This will allow to define new capabilities.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <dinechin@redhat.com>
2018-04-11 12:31:08 +01:00
Lukáš Hrázký
967ac4a24c stream-device.h: Remove the reference to the streaming port name
It is a duplicate information in a place where it is not necessary and
of little value.

Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-04-05 16:53:14 +02:00
Frediano Ziglio
235ac17349 stream-device: Specify how padding shoud be inside new structures
Depending on how structures are initialised in the code is
possible that implicit padding bytes are not initialised
causing possible information leaks as the entire structure
with all padding is sent through device/network.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <dinechin@redhat.com>
2018-03-10 07:15:44 +00:00
Frediano Ziglio
bd279b1fc1 macros: Use Visual C++ built-ins for byte swapping if available
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-03-09 15:41:09 +00:00
Frediano Ziglio
d1dca6450c macros: Use GCC built-ins to swap bytes
GCC introduced __builtin_bswapXX intrinsics in a quite old
version.
As version 2 and 3 are no more used nowadays instead of manually
craft these functions using assembly language use the new built-ins.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-03-09 15:41:04 +00:00
Frediano Ziglio
4250216baf Allow to specify a surface will be streamed
This flag will allow the client to perform some optimisations
on output and buffering processing.
Old clients will ignore this additional flag.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2017-12-01 15:53:44 +00:00
Jonathon Jongsma
6371ecbcb1 Change STREAM_MSG_CAPABILITIES_MAX_BYTES
Clarify that this value specifies the size in bytes, not the number of
capabilities.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-11-09 11:43:00 -06:00
Jonathon Jongsma
e2176efb0e Add definition of STREAM_MSG_CAPABILITIES_MAX
This message is specified to have a size limit of 1024, so provide this
as a #define

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Christophe de Dinechin <dinechin@redhat.com>
2017-11-01 17:06:00 +01:00
Frediano Ziglio
c05cc91972 Add support for mouse movement
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
2017-09-15 18:47:04 +01:00
Frediano Ziglio
a419692ea9 Add support for setting cursor shape from guest
This allows to better support client mouse using streaming device

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
2017-09-15 18:47:04 +01:00
Frediano Ziglio
909da449e3 Add error reports from server to guest
Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
2017-09-15 18:47:04 +01:00
Frediano Ziglio
02b12e66de Add a message to control guest streaming
Allows server to tell codec and start/stop the streaming

Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
2017-09-15 18:47:04 +01:00
Frediano Ziglio
a1d8ccabbf Add protocol to send streams to server
This protocol allows a guest to send a video stream to the server.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe de Dinechin <cdupontd@redhat.com>
2017-09-15 18:47:04 +01:00
Michael Shigorin
6795f4edfd macros.h: s/endianess/endianness/g
A three-time typo, obviously :)

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-09-15 18:47:01 +01:00
Michael Shigorin
ed8f30d421 macros.h: added e2k detection
Elbrus 2000 is a little-endian architecture.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-09-15 18:46:57 +01:00
Marc-André Lureau
40544912ab build-sys: post-release bump 0.12.14 2017-07-03 13:20:29 +02:00
Marc-André Lureau
8dda82b49d NEWS: prepare for 0.12.13 release
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2017-07-03 13:14:29 +02:00
Jakub Janků
86c53ee5bf agent: Add new file-xfer statuses
Introduce new error statuses to report more info to clients:
VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED,
VD_AGENT_FILE_XFER_STATUS_VDAGENT_NOT_CONNECTED,
VD_AGENT_FILE_XFER_STATUS_DISABLED

These are only sent to clients that feature
VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS capability.
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-06-20 12:09:25 +02:00
Jakub Janků
8b025c4ed0 agent: Add support for reporting on free space
Agent can send VDAgentFileXferStatusMessage with result
VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE to indicate lack of free
space. This enables more detailed error reporting, so the user knows
why the file transfer has failed.

Add VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS to ensure detailed errors
are not sent to clients that do not support it. This can be used
with more file xfer errors in the future.

Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-05-31 23:06:50 +02:00
Frediano Ziglio
068266069c Change enums.h license to MIT
This allows the header to be used in no GPL programs.
Others headers are already MIT licensed so this change do
not require additional changes to already existing
programs.

The file can be generated with

  ./spice_codegen.py -e spice.proto --license MIT enums.h

from spice-common.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2017-05-08 09:50:59 +01:00
Pavel Grunt
3f27d410b4 agent: Add capability for disabled file transfer
Server can set it to indicate that it discards file transfer messages.

Related:
https://bugzilla.redhat.com/show_bug.cgi?id=1373725

Acked-by: Victor Toso <victortoso@redhat.com>
2017-03-10 10:43:21 +01:00
Pavel Grunt
b9bfbd2f7b agent: Add macro for clearing capability
Related:
https://bugzilla.redhat.com/show_bug.cgi?id=1373725

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-03-03 13:00:36 +00:00
Frediano Ziglio
5410de6407 protocol: Add support for VP9 video codec
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2017-01-31 08:54:46 +00:00
Victor Toso
9da109a661 protocol: add preferred video codec message
Client might want to choose a preferred video codec for streaming for
different reasons which having hardware decoder support being the most
interest one.

This message allows the client to send a list of video codecs in a
order of preference.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-01-06 12:24:27 +00:00
Francois Gouget
b1cdb2756f macros: Add MSVC support to SPICE_GNUC_DEPRECATED
Based on the G_DEPRECATED GLib macro.
For projects that don't use GLib.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2016-11-23 08:51:09 +01:00
Francois Gouget
0d7aa7579e macros: Use GLib's G_DEPRECATED macro if available
This gains us automatic support for whichever compilers GLib supports in
this macro when used in projects that use GLib.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2016-11-23 08:51:09 +01:00
Frediano Ziglio
97ae0b1bb4 vd_agent: Add some comments to clipboard messages
Document what the messages are meant to do.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-11-11 11:52:19 +00:00