summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-04-09Merge branch 'fix-deference-invalid-widget-listener' into 'master'HEADmasterMarc-André Lureau3-31/+140
wayland: use separate event queue for widgets, and code cleanup See merge request spice/spice-gtk!125
2024-04-09wayland: implement registry_handle_global_remove()Keyu Tao1-0/+21
The uint name of corresponding interface is also recorded in global listener. When in global remove listener, this would be used to compare with the name that got removed.
2024-04-09wayland: code cleanupKeyu Tao1-12/+12
Functions with `gtk_` prefix are renamed to avoid confusion, and strcmp calls in registry_handle_global() are replaced by g_strcmp0.
2024-04-09wayland: use separate event queue thread for widgetsKeyu Tao3-19/+107
2023-11-14po: update german translationChristoph Brinkhaus1-28/+26
This fixes https://gitlab.freedesktop.org/spice/spice-gtk/-/issues/179. Signed-off-by: Christoph Brinkhaus <c.brinkhaus@t-online.de>
2023-11-05gstreamer: Fallback to S/W decoder if H/W one is not workingFrediano Ziglio1-4/+35
In case the H/W decoder is not able to decode the stream (like too high profile) try the S/W version. This is done detecting the failure and trying to recreate the pipeline in case: - we are using a H/W pipeline; - we didn't decode any frame (otherwise it means we lost the beginning or it was not a problem of H/W decoder). Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
2023-11-05gstreamer: Fix leak using GstBus watchFrediano Ziglio1-1/+11
This patch fixes a leak due to not freeing GstBus watch. The watch is attached (as GSource) to the main loop and retains a pointer to the bus so we need to remove it to release the bus when we release the pipeline. This was detected forcibly creating and destroying lot of streams. After a while the client program consumed all file descriptors and stopped working. This as GstBus retains a GPoll which, under Unix, uses 2 file descriptors. For some reasons using gst_pipeline_get_bus again in free_pipeline do not fix entirely the leak so keep a pointer to the exact bus we set our watch on. Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
2023-11-03channel-display-gst: Use h/w based decoders with Intel GPUs if possibleVivek Kasireddy1-22/+211
We first try to detect if an Intel GPU is available (by looking into udev's database) and then probe Gstreamer's registry cache to see if there is h/w based decoder (element) available for the incoming video codec format. If both these conditions are satisfied (i.e, Intel Media SDK Gstreamer plugin (libgstmsdk.so) and associated libraries are properly installed), we then create a simple decode pipeline using appropriate h/w based decoder and post-processor elements instead of relying on playbin -- which may not be able to auto-select these elements. For example, if the incoming codec format is h264, we then create a pipeline using msdkh264dec and vaapipostproc elements instead of avdec_h264 and videoconvert. Cc: Frediano Ziglio <freddy77@gmail.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Cc: Dongwon Kim <dongwon.kim@intel.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Signed-off-by: Hazwan Arif Mazlan <hazwan.arif.mazlan@intel.com> Signed-off-by: Jin Chung Teng <jin.chung.teng@intel.com> Acked-by: Frediano Ziglio <freddy77@gmail.com>
2023-11-03gstreamer: Avoid dangling pointers in free_pipelineFrediano Ziglio1-1/+4
Although currently after free_pipeline we free the entire structure the name and the function suggests that we only free the pipeline. Also this is fixing a future possible problem with the series from Vivek Kasireddy reusing the SpiceGstDecoder for another pipeline if H/W encoder pipeline creation fails. Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
2023-11-03Update spice-common submoduleFrediano Ziglio1-0/+0
This brings in the following changes: Vivek Kasireddy (1): common: Add a udev helper to identify GPU Vendor Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-10-06channel-display-gst: Prefer playbin3 to playbinJin Chung Teng1-3/+9
If playbin3 is available (checked in Gstreamer registry), it makes sense to prefer it given the major improvements and features it offers including the capability to handle higher bitrates. Cc: Frediano Ziglio <freddy77@gmail.com> Cc: Dongwon Kim <dongwon.kim@intel.com> Cc: Hazwan Arif Mazlan <hazwan.arif.mazlan@intel.com> Signed-off-by: Jin Chung Teng <jin.chung.teng@intel.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Acked-by: Frediano Ziglio <freddy77@gmail.com>
2023-09-18channel-display-gst: Add "byte-stream" as the stream format for h264Vivek Kasireddy1-2/+2
Adding the string "stream-format=byte-stream" to decoder capabilities (dec_caps) for h264/h265 codecs stops Gstreamer from complaining about missing stream format. Cc: Frediano Ziglio <freddy77@gmail.com> Cc: Dongwon Kim <dongwon.kim@intel.com> Cc: Jin Chung Teng <jin.chung.teng@intel.com> Cc: Hazwan Arif Mazlan <hazwan.arif.mazlan@intel.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Acked-by: Frediano Ziglio <freddy77@gmail.com>
2023-07-25Merge branch 'single' into 'master'Marc-André Lureau5-150/+277
Use single version of double exported functions See merge request spice/spice-gtk!122
2023-07-25Use single version of double exported functionsFrediano Ziglio5-150/+277
Solve double export issue of some functions between spice-gtk and spice-glib libraries. Some functions are exported by both spice-gtk and spice-glib. As the state of these function can be duplicate this can create some issues. Specifically you can enable debug but get only partly enabled. So to solve this and have a consistent behaviour across system add new functions in spice-glib (where these functions where supposed to be) and use them (we need to keep providing old functions for ABI compatibility). Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-07-09Use visibility instead of just filtering using version scriptFrediano Ziglio39-43/+295
In case version script support is not available we can still able to filter symbols exported. This for instance will work with linkers not supporting --version-script (like system MacOS one). Use new version macros similar to Glib to detect also deprecated function. Tested that exported symbols remains the same from both Linux and Windows shared libraries. Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-07-02Remove not private function declarationFrediano Ziglio1-1/+0
Already declared in spice-audio.h. Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-07-02Fix some minor versions documentationFrediano Ziglio3-4/+4
Fix some "Since" field in function documentation. Nobody should nowadays use versions old like these but good to have them fixed. Function presence was checked looking at map-file and code presence. Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-06-26Split symbol file in 2 filesFrediano Ziglio3-28/+46
One file for spice-glib and another for spice-gtk. This avoid having duplicate exports in the future. spice_g_signal_connect_object, spice_util_get_debug, spice_util_get_version_string, spice_util_set_debug and spice_uuid_to_string are exported by both libraries to keep ABI compatibility. Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-06-22Do not use libtool -export-symbols optionFrediano Ziglio4-201/+14
This option is intended for libtool, not for any linker. Check the support of --version-script option using an empty list of symbols to catch some faulty linker supporting that option but not allowing not existing symbols (some buggy mold versions). Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-04-21usb-backend: Fix compiling with i686 clang in mingwBiswapriyo Nath1-1/+1
This adds the stdcall attribute to match the function prototype which is used with SetWindowSubclass Win32 API. Otherwise, clang 16 targeting i686-w64-windows-gnu shows the following compiler error: ../src/usb-backend.c:269:38: error: incompatible function pointer types passing 'LRESULT (HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR)' (aka 'long (struct HWND__ *, unsigned int, unsigned int, long, unsigned int, unsigned long)') to parameter of type 'SUBCLASSPROC' (aka 'long (*)(structHWND__ *, unsigned int, unsigned int, long, unsigned int, unsigned long) __attribute__((stdcall))') [-Wincompatible-function-pointer-types] if (!SetWindowSubclass(be->hWnd, subclass_proc, 0, (DWORD_PTR)be)) { ^~~~~~~~~~~~~ Acked-by: Frediano Ziglio <freddy77@gmail.com>
2023-03-15Remove dependency on gobject-introspection-1.0Balló György1-1/+0
2023-02-15spicy: add command line option to hide menu barJohn Citizen1-3/+12
Signed-off-by: WebOfNakedFancies <arshuni@gmx.com>
2023-01-23Release v0.42v0.42Marc-André Lureau2-4/+14
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-23meson: bump meson req to 0.56Marc-André Lureau3-12/+12
It's from Oct 2020, and widely available on various distro or backports. Fix related meson warnings. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-23meson: fix keymap-gen exec on msysMarc-André Lureau2-2/+1
meson wraps python scripts already on win32: "C:/msys64/mingw64/bin/meson" "--internal" "exe" "--capture" "src/vncdisplaykeymap_xorgevdev2xtkbd.h" "--" "C:/msys64/mingw64/bin/python.exe" "python" "C:/msys64/home/marca/src/spice-gtk/subprojects/keycodemapdb/tools/keymap-gen" "code-m ap" "--lang" "glib2" "--varname" "keymap_xorgevdev2xtkbd" "../subprojects/keycodemapdb/data/keymaps.csv" "xorgevdev" "xtkbd" --- stderr --- C:/msys64/mingw64/bin/python.exe: can't open file 'C:\\msys64\\home\\marca\\src\\spice-gtk\\build\\python': [Errno 2] No such file or directory Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-23meson: drop needless comments about unused protocolsMarc-André Lureau1-12/+0
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-23meson: fix some lib check warnings on win32Marc-André Lureau1-1/+1
WARNING: find_library('libws2_32') starting in "lib" only works by accident and is not portable Library libws2_32 found: YES WARNING: find_library('libgdi32') starting in "lib" only works by accident and is not portable Library libgdi32 found: YES WARNING: find_library('libcomctl32') starting in "lib" only works by accident and is not portable Library libcomctl32 found: YES Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-23meson: fix a warningMarc-André Lureau1-1/+1
WARNING: extract_all_objects called without setting recursive Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-23Fix compilation on win32 when EGL is enabledMarc-André Lureau1-0/+8
../src/spice-widget-egl.c:204:17: error: unused variable 'gdk_dpy' [-Werror=unused-variable] 204 | GdkDisplay *gdk_dpy = gdk_display_get_default(); Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-23meson: fix compilation on win32 when egl is availableMarc-André Lureau1-1/+1
When EGL is enabled (thanks to epoxy/angle), spice-gtk fails to link against epoxy. Link with it when EGL is enabled. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-23meson: add an `egl` optionMarc-André Lureau2-2/+5
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-23meson: update EGL optionMarc-André Lureau3-19/+16
Adjust `#ifdef` statements to use the single define. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-23Rename `near` and `far`, reserved keywords on win32Marc-André Lureau1-3/+3
Win32 has #define for those. Change variable names `near` and `far` to `_near` and `_far`. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-09spice-widget: fix hotspot position on Wayland/HiDPImsizanoen11-2/+15
Same as a945a3c24b11de017a3b22acb5085fec59efa662 but for Wayland. Fixes breakage caused by GTK behavior change in https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5159.
2022-12-13Quote angular parenthesis in README.md Frediano Ziglio1-1/+1
Otherwise they are not showed when rendered.
2022-11-20usb-device-cd: Detect Apple H/W CD support betterFrediano Ziglio2-4/+25
Hardware support for Apple iOS is not available, check correctly and not try to use it. Signed-off-by: osy <osy@turing.llc> Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Tested-by: osy <osy@turing.llc>
2022-10-11meson: Allow building on a Wayland-only environmentFabio Estevam1-1/+4
Currently, it is not possible to build spice-gtk on a Wayland-only environment due to the x11 dependency in meson. Since commit a7381b0864b7 ("Allow to build without X11 gdk backend) it is possible to build spice-gtk without X11 GDK backend, so make the x11 dependency in meson optional. Signed-off-by: Fabio Estevam <festevam@denx.de> Acked-by: Frediano Ziglio <freddy77@gmail.com>
2022-10-07usb-backend: Fix devices not being enumeratedVictor Toso1-0/+2
This patch fixes bad filtering of USB devices. The logic was introduced for windows clients in commit b838937 but was moved in 2e19014 and executed also by non windows clients, resulting in this bug. Fixes: 2e19014 "usb-redir: isolate usage of libusb and usbredirhost" Fixes: https://gitlab.freedesktop.org/spice/spice-gtk/-/issues/157 Signed-off-by: Victor Toso <victortoso@redhat.com>
2022-09-08po: Add Georgian translationNorwayFun2-0/+349
Signed-off-by: NorwayFun <temuri.doghonadze@gmail.com> Acked-by: Frediano Ziglio <freddy77@gmail.com>
2022-07-06spicy: Add keyboard shortcuts for copy/paste syncJoel Rangsmo1-2/+2
This simple change adds keyboard shortcuts for manual synchronization of copy/paste buffers. These come in handy when automatic clipboard sharing is disabled, which may be desirable to prevent a semi-trusted server from reading sensitive data populated by password managers and similar. Shift+F5/F6 ain't the most comfortable shortcuts, but it sticks with the current theme.
2022-07-04Release v0.41v0.41Marc-André Lureau2-1/+10
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-07-04ci: Make Windows test work againFrediano Ziglio1-3/+2
Install whole wine instead of just core. Set language to avoid warning in GLib. Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2022-07-04gitlab-ci: comment out failing wine testMarc-André Lureau1-1/+2
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-07-04channel: use openssl 3.0 APIMarc-André Lureau1-23/+68
Fix compilation warnings when building against openssl 3.0 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-07-01build-sys: build against phodav-3.0/soup-3.0 if possibleMarc-André Lureau1-3/+10
Prefer libsoup 3.0 over 2.0, when available. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-07-01spice-common: update to current gitMarc-André Lureau1-0/+0
Frediano Ziglio (1): Replace EVP_PKEY_cmp with EVP_PKEY_eq Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-06-27fix invalid use of subprojectsEli Schwartz3-4/+5
The keycodemapdb Meson subproject provides a program and a source input. Since it is a subproject, Meson wants to sandbox that and requires it to be explicitly exported. But this never happened -- instead, we manually poked at files using the actual string path "subprojects/......" This was always a Meson sandbox violation, but Meson 0.63.0 started noticing it and erroring out. Instead, do the right thing. Update the subproject to a version that has a meson.build with actually meaningful contents -- namely, a files variable and a found program. Then use these in order to run the needed custom_target. In the process, it is also necessary to correct the argument ordering when running keymap-gen. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-03-06meson: move cairo dependency to GTK build onlyosy1-2/+2
Cairo is only used in SpiceDisplay which is part of the GTK client. If we are building the GLib only client, it should be optional.
2022-03-04coroutine: add support for libucontextosy4-3/+20
libucontext is a lightweight implementation of ucontext for platforms that do not have a built-in implementation. This allows us to use the same code to support libucontext as ucontext.
2022-02-07Release v0.40v0.40Victor Toso2-4/+22
Signed-off-by: Victor Toso <victortoso@redhat.com>