Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
This is required so the daemon can manage the various sessions.
The helper is launched every time a graphic session is started.
It sends information to the daemon on how to connect to the given
display server.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
This allows to manage properly multiple servers (currently only Xorg).
The executable will run as a service forking the proper agent.
The agent will then manage the active server.
The server receive just minimal information for the various
graphic terminals and use to fork the agent.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Check if the current display server is active or not and stream only if
active.
This will allow to support multiple display servers running.
When multiple display servers are running only one have the GPU
associated and is writing to the screen.
Stop capturing and release resources when the display server is not
active and vice versa.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
This will allow printing run-time information to stderr (by using
LOG_NOTICE level) without classifying it as warning/error or by
enabling debug mode.
Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
It doesn't throw and is part of the main() setup, not the business code.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Unify the error handling to use exceptions, narrowing down the exit
spots for success/error to one each.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Extends the try-catch block to encompass all the business code in
main(), making it a catch-all for all errors.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
It is unnecessary, the syslog connections are closed automatically on
exit.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
A C++ standard library implementation is a bit simpler and preferred in
C++ codebase. The system_clock has microsecond precision and efficiency
should be on par.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
The FrameLog class provides RAII for the FILE and encapsulates the
logging functionality.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
The variable is unnecessary, we can pass the value straight to
setlogmask().
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
It doesn't help anything.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
1. break a long description line into two lines
2. add changelog version of pre-release 0.1 version
3. replace "ChangeLog" documentation file with "NEWS"
(we try to keep NEWS updated, but not ChangeLog)
4. description: s/Spice/SPICE/
Signed-off-by: Uri Lublin <uril@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Make dist requires xz as is the default compression algorithm.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
The udev rule is used to do some action when the device is added to the
system. Current rule change the permission of the special file to allow to
open it by any user.
Some systems use /lib/udev while others use /usr/lib/udev.
Allow to specify the full path to support both type of systems.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
Due to recent check build is failing with:
configure.ac:21: error: Missing AX_CXX_COMPILE_STDCXX_11, install autoconf-archive
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
During autoreconf this suggestion is emitted:
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
A missing AX_CXX_COMPILE_STDCXX_11 at autoreconf time will only trigger
a non-fatal "command not found" when configure runs, but then
compilation will unexpectedly fail unless -std=c++11 is added to the
CXXFLAGS.
This commit makes sure we error out at autoreconf time when the macro
is unknown.
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
This with gcc 8 causes:
test-stream-port.cpp: In function ‘void ____C_A_T_C_H____T_E_S_T____0()’:
test-stream-port.cpp:78:18: error: unused variable ‘buf’ [-Werror=unused-variable]
char buf[10];
^~~
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
Allows to enable/disable different categories of logging.
Currently disabling by default logging of full frame data which can take
huge amount of log and allow to enable it if needed.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
Allow to see frame size even if frame data is disabled.
Useful to compute frame statistics not spending huge amount of space
for frame data.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
Allows to kill the process without losing log lines
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
Allows to track different frame timing.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
Currently exceptions from a plugin are not handled when creating
a capture engine.
Catch the exception and try to use another plugin instead of
bailing out.
This was tested with an experimental GStreamer plugin.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
Use exceptions for errors. Handle EINTR from poll and report nothing to
read, relying on the enclosing loop to poll for the command on the next
iteration.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Wrap the streaming virtio port along with the mutex to lock it in a
class. Pass the class temporarily around to functions that need it until
the functions too are consolidated into the class.
The locking needs to be outside the class for now to prevent situations
like:
1 - data header
2 - cursor header
3 - data message
4 - cursor message
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
In blocking mode, a write to the virtio port blocks indefinitely if the
server closes the virtio port on it's side. Change to non-blocking mode,
so that we can quit the streaming agent in case the port gets closed.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Reading from a closed virtio port looped indefinitely, check the read()
returning 0 and throw an exception if it happens.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Both versions are fine, unify for consistency. Use the optically less
verbose version.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Update the interface to not return the size written, as it is not needed
anymore.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Introduces an exception hierarchy up to a ReadError class, which is
thrown from read_all().
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Unnamed structure combined with inheritance is considered a
bit hard to read, add a name to make more readable.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Lukáš Hrázký <lhrazky@redhat.com>
|
|
This starts at the bottom and prepares for gradually moving more stuff
out of the main file.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Unifies the reading from the virtio port, read_all() supports signals
and partial reads.
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Unit test where not compiling with same options.
In this case warnings are different producing different results.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Currently -Wsign-compare is disabled by default in the default settings
(m4/spice-compile-warnings.m4).
However is good and not that expensive to remove this warning.
Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|
|
Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
|