Sorry for being pedantic :)
On Wed, 2018-05-09 at 10:05 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio
> ---
> python_modules/ptypes.py | 6 +-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> Changes since v1:
> - grammar and better comments
>
>
On Sun, 2018-05-06 at 13:33 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio
> ---
> python_modules/ptypes.py | 6 --
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py
> index
ore perhaps better to keep them there (though I
didn't really go and see how much sense it makes). But if you insist,
Acked-by: Lukáš Hrázký <lhra...@redhat.com>
(might also wanna wait a bit to see if someone holds special feelings
for them :))
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel
On Tue, 2018-05-08 at 10:26 +0100, Frediano Ziglio wrote:
> The current implementation of server and client assumes that a single
> data message contains an encoded frame.
> This is not a problem for most encoding but for MJPEG this causes
> the client to fail decoding.
> Collapse frame data into
On Wed, 2018-05-09 at 05:18 -0400, Frediano Ziglio wrote:
> >
> > On Tue, 2018-05-08 at 10:26 +0100, Frediano Ziglio wrote:
> > > The current implementation of server and client assumes that a single
> > > data message contains an encoded frame.
> > > This is not a problem for most encoding but
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/stream-port.cpp | 20 +++-
src/stream-port.hpp | 4 ++--
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/stream-port.cpp b/src/stream-port.cpp
index 526c564..cee63ac 100644
--- a/src/stream-po
As a last point, I think there is still a theoretical race possibility
with the poll()s with timeout -1. If the agent receives a SIGTERM right
before the poll(), the poll() will block and until something happens on
the port and until then the agent will not quit.
Lukáš Hrázký (9):
Use read_a
Use exceptions for errors, remove the inner loop in read_command, which
should practically never do more than one iteration. 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ý <l
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/unittests/.gitignore | 1 +
src/unittests/Makefile.am | 9 -
src/unittests/test-stream-port.cpp | 69 ++
3 files changed, 78 insertions(+), 1 deletion(-)
create mode 1006
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/spice-streaming-agent.cpp | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index 8b3f833..5dd41a9 100644
--- a/src/spice-streaming-agent.cpp
+++
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.
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/spice-streaming-agent.cpp
In blocking mode, the IO operations block 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ý <lhra...@redhat.com>
---
src/err
Introduces an exception hierarchy up to a ReadError class, which is
thrown from read_all().
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/Makefile.am | 2 ++
src/error.cpp | 29
src/error.hpp
Update the interface to not return the size written, as it is not needed
anymore.
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/error.cpp | 3 ++-
src/error.hpp | 14 +
src/spice-streaming-agent.cp
This starts at the bottom and prepares for gradually moving more stuff
out of the main file.
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/Makefile.am | 2 ++
src/spice-streaming-agent.cpp | 48 -
src/stream-port.cpp
On Wed, 2018-05-16 at 16:35 +0100, Frediano Ziglio wrote:
> Code that handled client and server messages check was the same, just
> changed some variable names.
> Instead use a class to store same information and reuse the code.
> This allows easier extension of the 2 path of code.
>
>
On Wed, 2018-05-16 at 12:47 -0400, Frediano Ziglio wrote:
> >
> > Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
> > ---
> > src/unittests/.gitignore | 1 +
> > src/unittests/Makefile.am | 9 -
> >
On Wed, 2018-05-16 at 11:08 +0200, Christophe de Dinechin wrote:
> > On 16 May 2018, at 10:59, Lukáš Hrázký <lhra...@redhat.com> wrote:
> >
> > On Tue, 2018-05-15 at 16:37 -0400, Frediano Ziglio wrote:
> > > >
> > > > Introduces an ex
really should put that in the commit message.
There is nothing more to it, I just picked one way and I think we agree
it's better to have the functions unified.
So, what do you want me to do? :)
> > > >
> > > > Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
> &g
On Tue, 2018-05-15 at 16:42 -0400, Frediano Ziglio wrote:
> >
> > Update the interface to not return the size written, as it is not needed
> > anymore.
> >
> > Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
> > ---
> > src/error
On Wed, 2018-05-16 at 05:25 -0400, Frediano Ziglio wrote:
> >
> > On Tue, 2018-05-15 at 16:37 -0400, Frediano Ziglio wrote:
> > > >
> > > > Introduces an exception hierarchy up to a ReadError class, which is
> > > > thrown from read_all().
&g
On Tue, 2018-05-15 at 16:52 -0400, Frediano Ziglio wrote:
> A bit more comments.
>
> >
> > Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
> > ---
> > src/unittests/.gitignore | 1 +
> > src/unittests/Makefile.am | 9 -
&g
t
feel this needs much explaining...
> >
> > Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
> > ---
> > src/stream-port.cpp | 20 +++-
> > src/stream-port.hpp | 4 ++--
> > 2 files changed, 13 insertions(+), 11 deletions(-)
> >
>
e enclosing loop to poll
> > for the command on the next iteration.
> >
> > Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
> > ---
> > src/spice-streaming-agent.cpp | 40 ++--
> > 1 file changed, 14 insertions(+), 26 deletions(
On Thu, 2018-05-17 at 08:40 -0400, Frediano Ziglio wrote:
> >
> > On Thu, 2018-05-17 at 07:36 -0400, Frediano Ziglio wrote:
> > > >
> > > > On Wed, 2018-05-16 at 16:35 +0100, Frediano Ziglio wrote:
> > > > > Code that handled client and server messages check was the same, just
> > > > > changed
On Thu, 2018-05-17 at 09:26 -0400, Frediano Ziglio wrote:
> >
> > On Thu, 2018-05-17 at 05:24 -0400, Frediano Ziglio wrote:
> > > >
> > > > On Wed, 2018-05-16 at 12:47 -0400, Frediano Ziglio wrote:
> > > > > >
>
On Thu, 2018-05-17 at 05:24 -0400, Frediano Ziglio wrote:
> >
> > On Wed, 2018-05-16 at 12:47 -0400, Frediano Ziglio wrote:
> > > >
> > > > Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
> > > > ---
> > > > src/unitte
On Thu, 2018-05-17 at 07:36 -0400, Frediano Ziglio wrote:
> >
> > On Wed, 2018-05-16 at 16:35 +0100, Frediano Ziglio wrote:
> > > Code that handled client and server messages check was the same, just
> > > changed some variable names.
> > > Instead use a class to store same information and reuse
On Wed, 2018-05-16 at 05:43 -0400, Frediano Ziglio wrote:
> > On Tue, 2018-05-15 at 16:52 -0400, Frediano Ziglio wrote:
> > > A bit more comments.
> > >
> > > >
> > > > Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
> > > > -
reaming-agent.cpp
> @@ -126,7 +126,7 @@ static void handle_stream_error(size_t len)
>
> std::to_string(sizeof(StreamMsgNotifyError)) + ")");
> }
>
> -struct : StreamMsgNotifyError {
> +struct StreamMsgNotifyError1K : Strea
This starts at the bottom and prepares for gradually moving more stuff
out of the main file.
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/Makefile.am | 2 ++
src/spice-streaming-agent.cpp | 48 -
src/stream-port.cpp
Unifies the reading from the virtio port, read_all() supports signals
and partial reads.
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/spice-streaming-agent.cpp | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src
header
3 - data message
4 - cursor message
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/spice-streaming-agent.cpp | 111 +++---
src/stream-port.cpp | 23 +
src/stream-port.hpp | 14 ++
3 files changed, 86 inse
In blocking mode, the IO operations block 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ý <lhra...@redhat.com>
---
src/err
Update the interface to not return the size written, as it is not needed
anymore.
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/error.cpp | 1 -
src/error.hpp | 14 +
src/spice-streaming-agent.cp
Both versions are fine, unify for consistency. Use the optically less
verbose version.
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/stream-port.cpp | 20 +++-
src/stream-port.hpp | 4 ++--
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/
Use exceptions for errors, remove the inner loop in read_command, which
should practically never do more than one iteration. 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ý <l
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/unittests/.gitignore | 1 +
src/unittests/Makefile.am | 9 -
src/unittests/test-stream-port.cpp | 69 ++
3 files changed, 78 insertions(+), 1 deletion(-)
create mode 1006
in the WriteError exception.
- Fixed the locking in "Encapsulate the stream port fd and locking".
Lukáš Hrázký (9):
Use read_all() to read headers of received messages
Move out {read,write}_all() to a separate module
Implement an exception hierarchy for ReadError
Introduce a WriteError
Introduces an exception hierarchy up to a ReadError class, which is
thrown from read_all().
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/Makefile.am | 2 ++
src/error.cpp | 22 ++
src/error.hpp
On Tue, 2018-05-15 at 16:37 -0400, Frediano Ziglio wrote:
> >
> > Introduces an exception hierarchy up to a ReadError class, which is
> > thrown from read_all().
> >
> > Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
> > ---
> > src/Make
On Wed, 2018-05-16 at 05:46 -0400, Frediano Ziglio wrote:
> >
> > On Tue, 2018-05-15 at 16:42 -0400, Frediano Ziglio wrote:
> > > >
> > > > Update the interface to not return the size written, as it is not needed
> > > > anymore.
> > > &
> +info.messages.append(m)
> +info.messages_byname[m.name] = m
> +
> +self.server_messages = server_info.messages
> +self.server_messages_byname = server_info.messages_byname
> +self.client_messages = client_info.messages
> +self.client_messages_byname = client_info.messages_byname
>
> return self
Assuming it works :)
Acked-by: Lukáš Hrázký <lhra...@redhat.com>
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel
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ý <lhra...@redhat.com>
---
src/spice-streaming-agent.cpp | 47 ---
in patch
5/5, it serves to read multiple commands at once.
Lukáš Hrázký (5):
Add a unit test for the stream port
Fix reading from a closed virtio port
Change the mode to NONBLOCK for the virtio port
Encapsulate the stream port fd and locking
Refactor and simplify polling for messages
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ý <lhra...@redhat.com>
---
src/spice-str
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/unittests/.gitignore | 1 +
src/unittests/Makefile.am | 8 ++
src/unittests/test-stream-port.cpp | 55 ++
3 files changed, 64 insertions(+)
create mode 100644 src/unittest
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ý <lhra...@redhat.com>
---
src/error.hpp | 2 ++
src/stream-port.cpp| 4
src/unittests/test-
header
3 - data message
4 - cursor message
Signed-off-by: Lukáš Hrázký <lhra...@redhat.com>
---
src/spice-streaming-agent.cpp | 111 +++---
src/stream-port.cpp | 23 +
src/stream-port.hpp | 14 ++
3 files changed, 86 inse
On Wed, 2018-06-06 at 04:36 -0400, Frediano Ziglio wrote:
> >
> > On Tue, 2018-06-05 at 17:30 +0200, Lukáš Hrázký wrote:
> > > The message is meant to contain information related to the stream,
> > > e.g.
> > > now the guest (xrandr) output ID of the st
On Tue, 2018-06-12 at 13:30 +0200, Christophe Fergeau wrote:
> Hey,
>
> On Wed, May 09, 2018 at 01:20:19PM +0200, Lukáš Hrázký wrote:
> > On Wed, 2018-05-09 at 05:18 -0400, Frediano Ziglio wrote:
> > > The agent send a single message, but reads/writes to the device ar
On Mon, 2018-05-21 at 11:45 +0100, Frediano Ziglio wrote:
> 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
On Mon, 2018-05-21 at 11:45 +0100, Frediano Ziglio wrote:
> 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
Hi,
On Mon, 2018-05-21 at 11:45 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio
> ---
> src/Makefile.am | 2 ++
> src/spice-streaming-agent.cpp | 1 +
> src/xorg-utils.cpp| 40 +++
> src/xorg-utils.hpp| 13
On Thu, 2018-06-14 at 05:31 -0400, Frediano Ziglio wrote:
> >
> > Unify the error handling to use exceptions, narrowing down the exit
> > spots for success/error to one each.
> >
> > Signed-off-by: Lukáš Hrázký
> > ---
> > src/spice-streaming-ag
On Wed, 2018-06-13 at 16:47 -0500, Jonathon Jongsma wrote:
> On Tue, 2018-06-05 at 17:30 +0200, Lukáš Hrázký wrote:
> > If the output_id is set, it is the true xrandr guest ID to use for
> > the
> > mouse motion event. If it's not present, keep relying on the wack
On Thu, 2018-06-14 at 06:44 -0400, Frediano Ziglio wrote:
> >
> > On Thu, 2018-06-14 at 04:42 -0400, Frediano Ziglio wrote:
> > > >
> > > > The FrameLog class provides RAII for the FILE and encapsulates the
> > > > logging functionali
On Thu, 2018-06-14 at 05:10 -0400, Frediano Ziglio wrote:
> >
> > On Wed, 2018-06-13 at 07:13 -0400, Frediano Ziglio wrote:
> > > >
> > > > On Tue, 2018-06-12 at 13:30 +0200, Christophe Fergeau wrote:
> > > > > Hey,
> > > > >
On Thu, 2018-06-14 at 04:42 -0400, Frediano Ziglio wrote:
> >
> > The FrameLog class provides RAII for the FILE and encapsulates the
> > logging functionality.
> >
> > Signed-off-by: Lukáš Hrázký
>
> Why "FrameLog" if, as you said too, is managing
On Thu, 2018-06-14 at 04:45 -0400, Frediano Ziglio wrote:
> >
> > Signed-off-by: Lukáš Hrázký
>
> Patch looks good but would be good to state the reasons.
> Portability?
> Just style?
I just prefer to use std::chrono since it's provided by the standard
library. It's no
On Thu, 2018-06-14 at 05:41 -0400, Frediano Ziglio wrote:
> >
> > Signed-off-by: Lukáš Hrázký
> > ---
> > src/spice-streaming-agent.cpp | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/spice-streaming-agent.cpp b/src/s
On Thu, 2018-06-14 at 05:29 -0400, Frediano Ziglio wrote:
> >
> > 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ý
>
> Idea is good, the patch does not c
Hi Snir,
mostly C++ and error handling notes :) I hope it's not too painful :D
On Sun, 2018-06-10 at 11:14 +0300, Snir Sheriber wrote:
> Gstreamer based plugin utilizing gstreamer elements to capture
> screen from X, convert and encode into h264/vp8/vp9/mjpeg stream
> Configure with
The FrameLog class provides RAII for the FILE and encapsulates the
logging functionality.
Signed-off-by: Lukáš Hrázký
---
While I retained all the behaviour of the original implementation, I
don't like it as it is.
1. The class is doing two different things:
a) logging the binary frames
a socket, so a proper solution
might be to integrate this into the loop of the main process.
Signed-off-by: Lukáš Hrázký
---
src/Makefile.am | 2 +
src/cursor-updater.cpp| 106 ++
src/cursor-updater.hpp| 34 +++
src/spice
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ý
---
src/spice-streaming-agent.cpp | 46 +--
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/src/spice
It doesn't help anything.
Signed-off-by: Lukáš Hrázký
---
src/spice-streaming-agent.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index aef49c7..ca10d3b 100644
--- a/src/spice-streaming-agent.cpp
+++ b
The variable is unnecessary, we can pass the value straight to
setlogmask().
Signed-off-by: Lukáš Hrázký
---
src/spice-streaming-agent.cpp | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index 392936a
...
Lukáš Hrázký (9):
Separate the code for logging frames/times into a class
FrameLog: Use std::chrono instead of gettimeofday for time
Remove the arg_error macro
Improve the invalid option argument (-c) error message
Introduce a short class to have RAII on the syslog
Remove
Unify the error handling to use exceptions, narrowing down the exit
spots for success/error to one each.
Signed-off-by: Lukáš Hrázký
---
src/spice-streaming-agent.cpp | 17 +++--
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice
Signed-off-by: Lukáš Hrázký
---
src/spice-streaming-agent.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index ca10d3b..d5ed034 100644
--- a/src/spice-streaming-agent.cpp
+++ b/src/spice-streaming-agent.cpp
Signed-off-by: Lukáš Hrázký
---
src/frame-log.cpp | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/frame-log.cpp b/src/frame-log.cpp
index b0bd09e..4418d09 100644
--- a/src/frame-log.cpp
+++ b/src/frame-log.cpp
@@ -9,9 +9,9 @@
#include "error.hpp"
Signed-off-by: Lukáš Hrázký
---
src/spice-streaming-agent.cpp | 20 +---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index d5ed034..392936a 100644
--- a/src/spice-streaming-agent.cpp
+++ b/src/spice
On Wed, 2018-06-13 at 07:13 -0400, Frediano Ziglio wrote:
> >
> > On Tue, 2018-06-12 at 13:30 +0200, Christophe Fergeau wrote:
> > > Hey,
> > >
> > > On Wed, May 09, 2018 at 01:20:19PM +0200, Lukáš Hrázký wrote:
> > > > On We
On Thu, 2018-06-14 at 16:22 +0200, Christophe de Dinechin wrote:
> > On 13 Jun 2018, at 14:06, Lukáš Hrázký wrote:
> >
> > The FrameLog class provides RAII for the FILE and encapsulates the
> > logging functionality.
> >
> > Signed-off-by: Lukáš Hráz
> > The FrameLog class provides RAII for the FILE and encapsulates the
> > > > > > logging functionality.
> > > > > >
> > > > > > Signed-off-by: Lukáš Hrázký
> > > > >
> > > > > Why "FrameLog" if, as you sai
gt; attempts.
In my tests, it actually does that only if you had two monitors (or
whatever number of your monitors is) enabled in the guest before. If
you only have one, then starting e.g. `remote-viewer -f ...` will only
give you one fullscreen client window :/
Cheers,
Lukas
&
On Thu, 2018-06-14 at 21:12 +0200, Marc-André Lureau wrote:
> Hi
>
> On Tue, Jun 5, 2018 at 5:30 PM, Lukáš Hrázký wrote:
> > Hi everyone,
> >
> > following is my attempt at solving the ID issues with monitors_config
> > and streaming. The concept is as foll
On Fri, 2018-06-15 at 12:24 +0200, Marc-André Lureau wrote:
> Hi
>
> On Fri, Jun 15, 2018 at 12:16 PM, Lukáš Hrázký wrote:
> > On Thu, 2018-06-14 at 21:12 +0200, Marc-André Lureau wrote:
> > > Hi
> > >
> > > On Tue, Jun 5, 2018 at 5:30 PM
On Thu, 2018-06-14 at 08:37 -0500, Jonathon Jongsma wrote:
> On Tue, 2018-06-05 at 17:30 +0200, Lukáš Hrázký wrote:
> > To keep compatibility with old endpoints (any of client, server,
> > vd_agent), we need to copy the message to add the output_id field.
> >
> > The
On Fri, 2018-06-15 at 15:12 +0200, Marc-André Lureau wrote:
> Hi
>
> On Fri, Jun 15, 2018 at 1:01 PM, Lukáš Hrázký wrote:
> > On Fri, 2018-06-15 at 12:24 +0200, Marc-André Lureau wrote:
> > > Hi
> > >
> > > On Fri, Jun 15, 2018 at 12:16 PM, Lukáš Hrázk
On Tue, 2018-06-19 at 15:41 +0200, Christophe de Dinechin wrote:
> > On 5 Jun 2018, at 17:30, Lukáš Hrázký wrote:
> >
> > To keep compatibility with old endpoints (any of client, server,
> > vd_agent), we need to copy the message to add the output_id field.
> >
On Fri, 2018-06-01 at 04:56 -0400, Frediano Ziglio wrote:
> >
> > On 06/01/2018 12:12 AM, Frediano Ziglio wrote:
> > > >
> > > > On 05/23/2018 12:03 PM, Frediano Ziglio wrote:
> > > > > The udev rule is used to do some action when the device is added to
> > > > > the
> > > > > system. Current
The StreamInfo message contains the guest (xrandr) output ID of the
monitor that is being streamed. It will later be passed to the client in
the MonitorsConfig message.
---
server/red-stream-device.c | 43 --
server/stream-channel.c| 14 +++--
The VDAgentMonitorsConfig message is sent from the client to the
server and possibly passed on to the vd_agent. Use the version 2 (V2
suffix) that contains the guest (xrandr) output ID of the monitor. The
output ID is only useful if the message is passed to the vd_agent, as it
is an ID in the
The StreamInfo message contanis information about the new stream, e.g.
the guest (xrandr) output ID of the monitor that is being streamed.
---
configure.ac | 2 +-
src/spice-streaming-agent.cpp | 22 ++
2 files changed, 23 insertions(+), 1 deletion(-)
diff
that to look up the correct monitor_config.
Signed-off-by: Lukáš Hrázký
---
spice-common | 2 +-
src/channel-display.c| 23 ++-
src/channel-main.c | 139 ---
src/channel-main.h | 2 +-
src/map-file | 5 ++
src
-by line, since they are not for merging, should not be an
issue...
Lukáš Hrázký (16):
spice-protocol
Add the StreamInfo message
Create a version 2 of the VDAgentMonitorsConfig message
spice-common
add output_id to SpiceMsgDisplayMonitorsConfig
spice-streaming-agent
Send a StreamInfo message
by the streaming agent. It is later used in the
guest by vd_agent for mouse input and possibly monitors_config
(enabling/disabling monitors and setting the resolution/position of
monitors).
Signed-off-by: Lukáš Hrázký
---
spice/vd_agent.h | 27 +++
1 file changed, 27
TODO: To keep backwards compatibility, the message needs to be copied
under a new name and the output_id field added to the copy, then used.
---
common/messages.h | 1 +
spice.proto | 1 +
2 files changed, 2 insertions(+)
diff --git a/common/messages.h b/common/messages.h
index
The message is meant to contain information related to the stream, e.g.
now the guest (xrandr) output ID of the streamed monitor.
Signed-off-by: Lukáš Hrázký
---
spice/stream-device.h | 15 +++
1 file changed, 15 insertions(+)
diff --git a/spice/stream-device.h b/spice/stream
When output_id is set in any VDAgentMonConfigV2 struct of the
VDAgentMonitorsConfigV2 message, it means the monitor is streamed from
the guest by the streaming agent. In that case, we only regard the
monitor configs with output_id set as relevant, as those are surely
configured for X11, but there
VDAgentMonitorsConfigV2 contains the output_id field.
TODO: Add a capability and check for the version of the message to use.
---
src/vdagent/vdagent.c| 2 +-
src/vdagent/x11-priv.h | 2 +-
src/vdagent/x11-randr.c | 32
src/vdagent/x11.h| 2 +-
If the output_id is set, it is the true xrandr guest ID to use for the
mouse motion event. If it's not present, keep relying on the wacky
sequence of IDs of channel_id + monitor_id.
---
src/spice-widget.c | 30 +-
1 file changed, 29 insertions(+), 1 deletion(-)
diff
The 3-state SpiceDisplayState enum is no longer needed, as there are no
items in the UNDEFINED state in the list of monitor_configs anymore.
---
src/channel-main.c | 10 --
src/map-file| 1 -
src/spice-glib-sym-file | 1 -
src/spice-session.c | 2 +-
Signed-off-by: Lukáš Hrázký
---
src/vdagent/x11-randr.c | 4
1 file changed, 4 insertions(+)
diff --git a/src/vdagent/x11-randr.c b/src/vdagent/x11-randr.c
index 803cf73..84c75f2 100644
--- a/src/vdagent/x11-randr.c
+++ b/src/vdagent/x11-randr.c
@@ -38,6 +38,10 @@
static int
Signed-off-by: Lukáš Hrázký
---
src/vdagent/vdagent.c | 2 ++
src/vdagent/x11-randr.c | 23 +++
src/vdagentd/uinput.c | 4 ++--
3 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/src/vdagent/vdagent.c b/src/vdagent/vdagent.c
index 3f8ef31..c5e5952 100644
We're now always sending the number monitors that we received from all
the display channels' monitors_configs, so this check no longer makes
sense.
---
src/channel-main.c | 22 +-
src/spice-session-priv.h | 3 +--
src/spice-session.c | 13 +
3 files
The version 2 of the message adds the output_id field.
Signed-off-by: Lukáš Hrázký
---
src/channel-main.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/channel-main.c b/src/channel-main.c
index 72cc070..8b2c031 100644
--- a/src/channel-main.c
+++ b
Use the new output_id field in the message from the client, store it in
the monitor_configs array in the session and pass it to the server and
subsequently vd_agent in the VDAgentMonitorsConfigV2 message.
Signed-off-by: Lukáš Hrázký
---
src/channel-display.c | 14 --
src/channel
1 - 100 of 581 matches
Mail list logo