- Jan 15, 2019
-
-
Lukáš Hrázký authored
Adds serialization of the GraphicsDeviceInfo message and sends it to the server when it starts to stream. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
-
Lukáš Hrázký authored
Adds an interface method to the FrameCapture class to get the device display info (device address and device display id) for each display of the graphics device that is captured. Also adds functions to the API implementing this functionality for X11 in variants with and without DRM (the non-DRM version is rather limited and may not work for more complex setups) as well as some helper functions to make it easier for plugins to implement this and avoid code duplication. Implements the new interface method for the two built-in plugins (mjpeg-fallback and gst-plugin). Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com>
-
- Dec 05, 2018
-
-
This commits adds the -export-dynamic linker flag to export dynamic symbols to be used by the streaming agent's plugins. It also adds the -fvisibility=hidden compiler flag to hide all symbols by default (along with -fvisibility-inline-hidden for C++ inline functions). Then it adds the visibility("default") attribute to the namespace containing the Error class, as that one needs to be exported and have its typeinfo defined for exception catching to work. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
The syslog() helper for logging an error is not necessary, leave it out of the API and move it to a new private utils module. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
Moves IOError and its descendants to stream-port.hpp, as those are I/O errors related to that. Makes the Error class a public base class for exceptions thrown across the API boundary. Note exception ABI conpatibility is not guaranteed between different compilers, but it is compatible between gcc and clang so for these two compilers it is safe. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Oct 16, 2018
-
-
Heavily based on code by Christophe de Dinechin. Wraps the serialization code in the OutboundMessage class and its descendants for each specific message. Uses Cruiously Recurring Template Pattern (CRTP) to avoid runtime overhead of polymorphism. The messages are placed along with the code that sends them, this helps to avoid header proliferation, e.g. the CursorMessage requires X11 headers for it's interface. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
Wraps the deserialization of the received messages in an InboundMessages class. The class is created with the deserialized header and the raw data of the message. A template function get_payload() returns the struct of the concrete message. The function is specialized for each incoming message. While this leaves the responsibility to call the get_payload() function with the message according to the type in the header to the caller, the solution preserves the efficiency of the original implementation without introducing too much complexity around the separation of the code. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Oct 12, 2018
-
-
Lukáš Hrázký authored
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Oct 02, 2018
-
-
Frediano Ziglio authored
Usually when references are used ownership is not moved. Avoid to use references to confuse code reader. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-
- Sep 18, 2018
-
-
Gstreamer based plugin utilizing gstreamer elements to capture screen from X, convert and encode into h264/h265/vp8/vp9/mjpeg stream Configure with --enable-gst-plugin, will be built as a separate plugin. The plugin was made for testing purposes, it was mainly tested with the x264enc (h264 is the defualt codec) encoder. To choose codec type use: '-c gst.codec=<h264/h265/vp8/vp9/mjpeg>' To specify a certain plugin use: '-c gst.encoder=<plugin name>' in addition to its matching codec type (gst.codec). Signed-off-by: Snir Sheriber <ssheribe@redhat.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Aug 09, 2018
-
-
Uri Lublin authored
Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-
Uri Lublin authored
The server sends StreamMsgStartStop to tell spice-streaming-agent to start streaming and a list of available codecs. The first uint8_t is the number of codecs. Each following uint8_t is a codec. This patch checks that the number of codecs in the message, as reported by the server, is not too large. Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-
- Jul 20, 2018
-
-
Using errno requires <errno.h>. Some platforms/compilers are stricter than others in this respect. frame-log.cpp:27:96: error: use of undeclared identifier 'errno' throw Error(std::string("Failed to open log file '") + log_name + "': " + strerror(errno)); Signed-off-by: Christophe de Dinechin <dinechin@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
The [[noreturn]] attribute must be visible from call sites. This is a hard error in clang: cursor-updater.cpp:77:3: error: function declared '[[noreturn]]' after its first declaration [[noreturn]] void CursorUpdater::operator()() ^ ./cursor-updater.hpp:24:10: note: declaration missing '[[noreturn]]' attribute is here void operator()(); ^ 1 error generated. Signed-off-by: Christophe de Dinechin <dinechin@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
- Jul 18, 2018
-
-
Frediano Ziglio authored
The pointer is not updated to the last byte used so using it to compute the bytes written into the buffer we ignore some bytes causing some image corruptions. Note that also free_in_buffer is not updated to last written byte. When buf_empty_output_buffer is called the buffer is full so use the size of it instead of relying on next_output_byte or free_in_buffer. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Uri Lublin <uril@redhat.com>
-
- Jul 10, 2018
-
-
Wraps the code in a functor which can then be used in std::thread. Keeps the call to std::thread::detach() for now, as the thread actually cannot be properly joined. It spends most of the time blocking on XNextEvent() and there is no way of interrupting it. It seems XNextEvent() is acutally using a socket, so a proper solution might be to integrate this into the loop of the main process. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Jul 02, 2018
-
-
Snir Sheriber authored
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>
-
Lukáš Hrázký authored
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
Lukáš Hrázký authored
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>
-
Lukáš Hrázký authored
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>
-
Lukáš Hrázký authored
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>
-
Lukáš Hrázký authored
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>
-
- Jun 28, 2018
-
-
Lukáš Hrázký authored
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>
-
Lukáš Hrázký authored
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
Lukáš Hrázký authored
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>
-
- Jun 25, 2018
-
-
Lukáš Hrázký authored
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>
-
Lukáš Hrázký authored
Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
Lukáš Hrázký authored
It doesn't help anything. Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Jun 06, 2018
-
-
Uri Lublin authored
Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
Uri Lublin authored
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>
-
- Jun 04, 2018
-
-
Frediano Ziglio authored
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>
-
- Jun 01, 2018
-
-
Frediano Ziglio authored
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>
-
Frediano Ziglio authored
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-
Frediano Ziglio authored
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>
-
Frediano Ziglio authored
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>
-
- May 31, 2018
-
-
Frediano Ziglio authored
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>
-
Frediano Ziglio authored
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>
-
Frediano Ziglio authored
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>
-
Frediano Ziglio authored
Allows to kill the process without losing log lines Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Uri Lublin <uril@redhat.com>
-