libgthread was needed to call g_thread_init.
This was removed by this commit:
commit 3e116a6c71
Date: Wed Feb 6 13:32:09 2019 +0000
Obsolete Glib cleanup
We require at least GLib 2.38, remove code and check to
support earlier versions.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
SpiceCopy and SpiceBlend are typedefs of the same structure.
This to prove that canvas_draw_blend and canvas_draw_copy do
exactly the same thing.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Flexible arrays cannot have other fields following, even
if the fields are from a containing structure.
To fix this use an union and put the additional field inside
other structure in the union.
The final layout is the same but the compiler is not complaining.
This works on both GCC and Visual Studio.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Add agent.h and agent.c to deal with some common agent job:
- checking message from network and fixing network order.
- send back file transfer status.
Code based on Linux agent and Windows agent.
AgentXxxx and agent_xxx are used to avoid conflicts with protocol.
See agent.h for more detail on how to use these APIs.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Containing project can request a greater SPICE protocol version.
This will be taken into account while checking our requirements.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Of all SPICE_MSGC_SMARTCARD_xxx constants only SPICE_MSGC_SMARTCARD_DATA
is used by both spice-gtk and spice-server.
Generate the right constant, all obsolete ones will not be generated.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
This structure is not used by both spice-gtk and spice-server.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
We want to obsolete from enumeration values, currently CELT.
The removal of check in has_attr is not an issue, as the attributes
are already checked by fix_attributes calls.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
These messages are used to exchange Streaming Quality messages between
SPICE client and SPICE server:
- `SPICE_MSGC_MAIN_QUALITY_INDICATOR`: a client->server message on the
Main channel. This message is used by the client to share streaming
quality observation with the server and the adaptive streaming
control center. The format of the string message is not specified
yet, it will depend of the sender/receiver final implementation.
- `SPICE_MSG_DISPLAY_QUALITY_INDICATOR`: a server->client message on
the Display channel. This message is used to inform the client about
adaptive-streaming specific details. The client should use it to
configure its quality-message generation algorithms. The format of
the string message is not specified yet, it will depend of the
sender/receiver final implementation.
As an example, a `SPICE_MSG_DISPLAY_QUALITY_INDICATOR` message can
inform the client about the requested framerate (say, 60 FPS); and the
client will send a `SPICE_MSGC_MAIN_QUALITY_INDICATOR` warning message
when the measured framerate drops below 45 FPS.
Signed-off-by: Kevin Pouget <kpouget@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
All other projects just use master version of spice-protocol.
Do this also on Windows to use the last sources, it could happen
that we need them and not last packaged version.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
"level" can have value "DEBUG". In some environment "DEBUG" is
used as preprocessor name to enable some debugging code.
Using -DDEBUG option (or similar) cause "DEBUG" to be defined as "1"
so "G_PASTE(G_LOG_LEVEL_, level)" will be expanded to "G_LOG_LEVEL_1"
instead of "G_LOG_LEVEL_DEBUG".
Just concatenate the two literal to avoid "DEBUG" expansion.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
warning_level 2 setting for Meson add the same "-Wall -Wextra"
options to GCC compiler.
This removes a warning using Meson.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This patch introduces `set_bitmap` and `test_bitmap` + relevant
macros, adapted from `<qemu>/include/qemu/bitops.h`.
These functions differ from `set_bit`/`test_bit` as they can set/test
bits in bit arrays longer than scalar data-types.
Signed-off-by: Kevin Pouget <kpouget@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
spice-common depends on Glib2, so automatically add to the
dependency list.
You can define a GLIB2_MIN_VER m4 variable in configure.ac
to raise the default GLib2 required version.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
Add a common.m4 file to be included directly in other project.
This include will include all needed checks to use spice-common.
Just include directly this file in your configure.ac.
This will define SPICE_COMMON_CFLAGS and SPICE_COMMON_DIR (for
linking .la files) which are needed to use spice-common.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
Reduce execution time. No need to run so much tests, coverage
stays more or less the same.
We iterate twice to check RGB mode with alpha, otherwise the
coverage reduce about 10-20%.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@gmail.com>
There's no much need for than size to be so big, limit to
reduce execution time, coverage stays more or less the same.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Do not call the function for every iteration
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@gmail.com>
New versions of gcc have implemented __has_builtin which causes meson
to detect functions in libm, such as hypot() and sqrt() as built-ins
during configure time, while they are actually part of libm. This has
been causing build failures in Fedora 32 Rawhide and has been reported
in meson for some time now: https://github.com/mesonbuild/meson/issues/3740
Meson always adds --as-needed to linker arguments so, it does not hurt
to link against libm even though no functions from that library will be
used.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This rule remove possible integer overflows.
Current code generated is not affected by these integer overflows
as the computations are done using 64 bit but better safe then sorry.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Julien Rope <jrope@redhat.com>
No need to compute these variable always, only if we have
a reference to a previous sequence.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Francesco Giudici <fgiudici@redhat.com>
The loop is always executed once so use a do {} while construct
to avoid the repetition.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Francesco Giudici <fgiudici@redhat.com>
Boundaries checks already done some lines above, no needs
to repeat for each pixel.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Francesco Giudici <fgiudici@redhat.com>
"buffers" and "marshallers" are always pointing to the static
buffers inside the same structure.
Use single array fields to avoid having initialize and have them.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Julien Rope <jrope@redhat.com>
This macro was suggested to simplify hot path expensive checks
which should be disable in production environments.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Francesco Giudici <fgiudici@redhat.com>
Allows to check QUIC algorithm and code with multiple input/output
formats.
Was limited to just RGB and RGBA.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Remove some system checks.
Specifically:
- functions in the standard C (memset, memmove);
- functions we use but we assume in the specific implementation
present (dup2, fork);
- functions we don't use (error_at_line);
- headers in the standard C (stddef.h, stdint.h, string.h);
- headers present in all systems we support if are not checked
in the source files (malloc.h);
- types we assume being present (XintYY_t, pid_t).
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Include headers required for implementation only in the
implementation file.
This remove dependency and avoid the user component having to
check for header flags (in this case HAVE_CELT051 and HAVE_OPUS).
This make easier integration in other components.
This also make compilation faster.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
quic_config is used only by the implementation so include it
only from the implementation file.
This remove dependency.
This make easier integration in other components.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Allow the user to disable tests through -Dtests=false
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Allow the user to disable tests through --disable-tests, this is
especially useful for example to disable gdk-pixbuf dependency
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>