Re: [Spice-devel] [PATCH v7 04/20] usb-backend: no emulated isoch devices

2019-09-19 Thread Victor Toso
Hi, On Wed, Sep 18, 2019 at 06:03:30AM -0400, Frediano Ziglio wrote: > > > > From: Yuri Benditovich > > > > SpiceUsbBackendDevice deals with real and emulated devices but there > > is no plans to implement emulated isochronous devices. > > > > This patch adds check to edev (emulated device) in

Re: [Spice-devel] [PATCH v7 05/20] usb-backend: add guard and doc to check_filter()

2019-09-19 Thread Victor Toso
On Wed, Sep 18, 2019 at 06:06:37AM -0400, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > * Add documentation on spice_usb_backend_device_check_filter() > > * Add guard on libusb_device > > * Adds G_GNUCE_INTERNAL as this is only called internally in > > Typo: G_GNUCE_INTERNAL -> G_GNU

Re: [Spice-devel] [PATCH v7 06/20] usb-backend: add safe check on attach()

2019-09-19 Thread Victor Toso
Hi, On Wed, Sep 18, 2019 at 06:09:24AM -0400, Frediano Ziglio wrote: > > > > From: Frediano Ziglio > > > > At this moment, spice_usb_backend_channel_attach() is only related to > > real devices and this call might happen on channel-up event that can > > possibly come before usbredirhost has bee

Re: [Spice-devel] [PATCH v7 07/20] usb-backend: include usbredirparser

2019-09-19 Thread Victor Toso
Hi, On Wed, Sep 18, 2019 at 06:17:16AM -0400, Frediano Ziglio wrote: > > > > From: Yuri Benditovich > > > > This patch introduces the usage of usbredirparser in > > SpiceUsbBackendChannel. > > > > The focus of this patch is to the code path of real devices. As we > > don't know beforehand if a

Re: [Spice-devel] [PATCH v7 13/20] build: Do not build usbredir dependent file is usbredir disabled

2019-09-19 Thread Victor Toso
Hi, On Mon, Sep 16, 2019 at 12:20:56PM +0200, Victor Toso wrote: > From: Frediano Ziglio > > These files would end up to compile empty code, no reason > to compile and link them. > > Signed-off-by: Frediano Ziglio Acked-by: Victor Toso > --- > src/meson.build | 10 +- > src/usb-b

Re: [Spice-devel] [PATCH v7 10/20] fixup! usb-redir: add files for SCSI and USB MSC implementation

2019-09-19 Thread Victor Toso
Hi, On Wed, Sep 18, 2019 at 06:21:27AM -0400, Frediano Ziglio wrote: > > > > From: Frediano Ziglio > > > > Do not use 0x%u as format, misleasding, %u is decimal. > > Also most of these are formatting lun number which in multiple cases are > > expressed as decimal. > > I remember somebody acked

Re: [Spice-devel] [PATCH v7 13/20] build: Do not build usbredir dependent file is usbredir disabled

2019-09-19 Thread Frediano Ziglio
> > Hi, > > On Mon, Sep 16, 2019 at 12:20:56PM +0200, Victor Toso wrote: > > From: Frediano Ziglio > > > > These files would end up to compile empty code, no reason > > to compile and link them. > > > > Signed-off-by: Frediano Ziglio > > Acked-by: Victor Toso > Before I forget, typo in ti

Re: [Spice-devel] [PATCH spice-common] codegen: Add 'chunk' to the output attributes

2019-09-19 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > Output attributes are the attributes that specify how to store > > > that field in the C structure. > > > There can be only one output type specified. > > > > > > Signed-off-by: Frediano Ziglio > > > --- > > > python_modules/ptypes.py | 2 +- > >

Re: [Spice-devel] [PATCH spice-common v2] codegen: Check validity of array members

2019-09-19 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > Check that combination of fields for an array does not > > > lead to unsafe code. > > > check_valid method came from generate_c_declaration with > > > some more check and it's use in demarshaller to validate > > > the array if the structure is not

Re: [Spice-devel] [PATCH spice-server 1/2] event-loop: Move adapter interface from reds.c

2019-09-19 Thread Frediano Ziglio
ping > > ping > > > > > ping > > > > > > > > ping the series > > > > > > > > > > > Put more event loop code in event-loop.c. > > > > This is a preparation patch for the next one. > > > > > > > > Signed-off-by: Frediano Ziglio > > > > --- > > > > server/event-loop.c | 58 +

[Spice-devel] [PATCH spice-server] red-qxl: Make sure we have at least one monitor

2019-09-19 Thread Frediano Ziglio
It does not make sense to have a graphic card without a monitor. In spice_qxl_set_max_monitors we prevent to set 0 monitors, do the same in spice_qxl_set_device_info. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1691721. Signed-off-by: Frediano Ziglio --- server/red-qxl.c | 2 +- 1 fi

Re: [Spice-devel] [PATCH spice-server] red-qxl: Make sure we have at least one monitor

2019-09-19 Thread Victor Toso
On Thu, Sep 19, 2019 at 11:17:25AM +0100, Frediano Ziglio wrote: > It does not make sense to have a graphic card without a monitor. > In spice_qxl_set_max_monitors we prevent to set 0 monitors, do > the same in spice_qxl_set_device_info. > > This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1

Re: [Spice-devel] [PATCH spice-server] red-qxl: Make sure we have at least one monitor

2019-09-19 Thread Frediano Ziglio
> > On Thu, Sep 19, 2019 at 11:17:25AM +0100, Frediano Ziglio wrote: > > It does not make sense to have a graphic card without a monitor. > > In spice_qxl_set_max_monitors we prevent to set 0 monitors, do > > the same in spice_qxl_set_device_info. > > > > This fixes https://bugzilla.redhat.com/sh

Re: [Spice-devel] [PATCH spice-server] red-qxl: Make sure we have at least one monitor

2019-09-19 Thread Dr. David Alan Gilbert
* Frediano Ziglio (fzig...@redhat.com) wrote: > > > > On Thu, Sep 19, 2019 at 11:17:25AM +0100, Frediano Ziglio wrote: > > > It does not make sense to have a graphic card without a monitor. > > > In spice_qxl_set_max_monitors we prevent to set 0 monitors, do > > > the same in spice_qxl_set_device_

[Spice-devel] [PATCH v8 03/20] usb-redir: do not use spice_usb_acl_helper for emulated devices

2019-09-19 Thread Victor Toso
From: Yuri Benditovich Signed-off-by: Yuri Benditovich Acked-by: Frediano Ziglio --- src/channel-usbredir.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c index 0a711c2..e407bac 100644 --- a/

[Spice-devel] [PATCH v8 01/20] usb-redir: define interfaces to support emulated devices

2019-09-19 Thread Victor Toso
From: Yuri Benditovich SpiceUsbBackendDevice structure is extended to support additional kind of device that is emulated by Spice-GTK and not present locally (and does not have libusb_device), such device has instead pointer to SpiceUsbEmulatedDevice abstract structure. Specific implementation of

[Spice-devel] [PATCH v8 00/20] added feature of sharing CD image

2019-09-19 Thread Victor Toso
From: Victor Toso Hi, CI: https://gitlab.freedesktop.org/victortoso/spice-gtk/tree/cd-rom-split-v8 v7->v8 (review by Frediano): * squashed v7 10/20 into v7 09/20 (an acked fixup) * Added missing patch, now v8 10/20 * add proper sign-offs to v7 04,07,08/20 * fixed some typos in commit log Teste

[Spice-devel] [PATCH v8 02/20] usb-redir: move implementation of device description to USB backend

2019-09-19 Thread Victor Toso
From: Yuri Benditovich For local USB device the USB backend returns the same device description as spice-usb-manager did, for emulated devices it uses the description provided by device's implementation. Signed-off-by: Yuri Benditovich Acked-by: Frediano Ziglio --- src/usb-backend.c|

[Spice-devel] [PATCH v8 08/20] usb-redir: extend USB backend to support emulated devices

2019-09-19 Thread Victor Toso
From: Yuri Benditovich Redirection of emulated devices requires special approach, as usbredirhost can't be used for that (it works only with libusb devices). For emulated devices we create instance of usbredirparser that implements USB redirection protocol. In order to work with the same set of

[Spice-devel] [PATCH v8 06/20] usb-backend: add safe check on attach()

2019-09-19 Thread Victor Toso
From: Frediano Ziglio At this moment, spice_usb_backend_channel_attach() is only related to real devices and this call might happen on channel-up event that can possibly come before usbredirhost has been created. Signed-off-by: Victor Toso --- src/usb-backend.c | 5 + 1 file changed, 5 ins

[Spice-devel] [PATCH v8 04/20] usb-backend: no emulated isoch devices

2019-09-19 Thread Victor Toso
From: Yuri Benditovich SpiceUsbBackendDevice deals with real and emulated devices but there is no plans to implement emulated isochronous devices. This patch adds check to edev (emulated device) in the guard, fix the return value to FALSE instead of plain 0 and return early in case the code path

[Spice-devel] [PATCH v8 13/20] build: Do not build usbredir dependent file if usbredir is disabled

2019-09-19 Thread Victor Toso
From: Frediano Ziglio These files would end up to compile empty code, no reason to compile and link them. Signed-off-by: Frediano Ziglio --- src/meson.build | 10 +- src/usb-backend.c | 4 src/usbutil.c | 3 --- src/usbutil.h | 4 4 files changed, 5 insertions(+)

[Spice-devel] [PATCH v8 14/20] usb-redir: command-line option to create emulated CD drive

2019-09-19 Thread Victor Toso
From: Yuri Benditovich Added command-line option for sharing emulated CD devices. It uses property interface of usb-device-manager to create CD, this is a temporary solution until public API of usb-device-manager defined for shared CD management from both GUI and command line. Signed-off-by: Yur

[Spice-devel] [PATCH v8 05/20] usb-backend: add guard and doc to check_filter()

2019-09-19 Thread Victor Toso
From: Victor Toso * Add documentation on spice_usb_backend_device_check_filter() * Add guard on libusb_device * Adds G_GNUC_INTERNAL as this is only called internally in usb-device-manager.c * Changed the style a bit, still under 100 char in a single line This is a preparatory patch for extend

[Spice-devel] [PATCH v8 07/20] usb-backend: include usbredirparser

2019-09-19 Thread Victor Toso
From: Yuri Benditovich This patch introduces the usage of usbredirparser in SpiceUsbBackendChannel. The focus of this patch is to the code path of real devices. As we don't know beforehand if a SpiceUsbBackendChannel will be used by real or emulated devices, an instance of usbredirparser must be

[Spice-devel] [PATCH v8 19/20] test-cd-emu: Make sure we can call spice_usb_backend_channel_flush_writes

2019-09-19 Thread Victor Toso
From: Frediano Ziglio Currently we call this function when the SPICE channel is up however this function should continue to work as in theory the channel could avoid to handle the message and stop the flow (for instance to implement some kind of flow limitation) and so will need to call this func

[Spice-devel] [PATCH v8 20/20] test-cd-emu: Test no libusb context support

2019-09-19 Thread Victor Toso
From: Frediano Ziglio Although currently not supported by the code (libusb_context in SpiceUsbBackend is never NULL), try to support it in order to be able to have only emulated devices if the libusb layer is failing. Signed-off-by: Frediano Ziglio --- tests/cd-emu.c | 16 +--- 1 f

[Spice-devel] [PATCH v8 11/20] usb-redir: add implementation of emulated CD device

2019-09-19 Thread Victor Toso
From: Yuri Benditovich This module contains implementation of emulated device interface for shared CD. Signed-off-by: Yuri Benditovich Acked-by: Frediano Ziglio --- src/usb-device-cd.c | 784 src/usb-device-cd.h | 34 ++ 2 files changed, 818 inser

[Spice-devel] [PATCH v8 18/20] test-cd-emu: Test detach and reattach

2019-09-19 Thread Victor Toso
From: Frediano Ziglio Make sure device can be detached and attached again. Signed-off-by: Frediano Ziglio --- tests/cd-emu.c | 104 +++-- 1 file changed, 75 insertions(+), 29 deletions(-) diff --git a/tests/cd-emu.c b/tests/cd-emu.c index fd91c41..f

[Spice-devel] [PATCH v8 15/20] test-cd-emu: Add base test for cd-emulation

2019-09-19 Thread Victor Toso
From: Frediano Ziglio Just allocate and free to test for base leaks and reference counting. Signed-off-by: Frediano Ziglio --- tests/cd-emu.c| 97 +++ tests/meson.build | 4 ++ 2 files changed, 101 insertions(+) create mode 100644 tests/cd-emu.

[Spice-devel] [PATCH v8 16/20] build: Use a convenience library for tests

2019-09-19 Thread Victor Toso
From: Frediano Ziglio Instead of linking all object inside spice-client-glib build a library from these object and link to each test. This will allow to override some object file for mocking purposes. Signed-off-by: Frediano Ziglio --- tests/meson.build | 8 +++- 1 file changed, 7 insertio

[Spice-devel] [PATCH v8 12/20] usb-redir: enable redirection of emulated CD drive

2019-09-19 Thread Victor Toso
From: Yuri Benditovich Add implementation of emulated device to build. Now it is possible to create emulated CD devices. Signed-off-by: Yuri Benditovich --- src/meson.build | 12 1 file changed, 12 insertions(+) diff --git a/src/meson.build b/src/meson.build index 4d9215c..00eb27

[Spice-devel] [PATCH v8 10/20] cd-scsi: Do not export sense code constants

2019-09-19 Thread Victor Toso
From: Frediano Ziglio They are used only inside the module. Use a macro to simplify declaration which is pretty long. Signed-off-by: Frediano Ziglio Acked-by: Victor Toso --- src/cd-scsi.c | 54 ++- 1 file changed, 28 insertions(+), 26 deletions

[Spice-devel] [PATCH v8 17/20] test-cd-emu: Test attach/detach emulated device

2019-09-19 Thread Victor Toso
From: Frediano Ziglio Mock some usb-backend functions to be able to simulate device attachment and detachment. Create session and channel to pass some valid pointer anyway. Emulate channel state correctly. Make sure HELLO packets are sent correctly at the beginning and no more afterwards. Test au

Re: [Spice-devel] [spice-gtk v1] Revert "channel: Abort migration in delayed unref"

2019-09-19 Thread Victor Toso
Ping :) On Wed, Sep 04, 2019 at 02:32:09PM +0200, Victor Toso wrote: > From: Victor Toso > > This reverts commit 109e575 "channel: Abort migration in delayed > unref" in 2016-05-02 by Pavel Grunt > > This commit is being reverted because it calls > spice_session_abort_migration() on the SpiceS

[Spice-devel] [PATCH spice-streaming-agent] gst-plugin: Changing framerate crash when ximagesrc is used

2019-09-19 Thread Snir Sheriber
When XLIB_CAPTURE is set to 0 and framerate is set to anything other than 25 streaming-agent crashes This is a regrerssion caused by e0cf764baff9d678a6e75916457300d1ff39b169 Fixing it is done by adding the framerate value to convertion caps Signed-off-by: Snir Sheriber --- src/gst-plugin.cpp |