[Spice-devel] [PATCH spice-server 13/15] Rename StreamAgent to VideoStreamAgent

2017-10-20 Thread Jonathon Jongsma
Just to avoid confusion between different uses of the word Stream (e.g. RedStream) clarify that it's related to video streams Signed-off-by: Jonathon Jongsma --- server/dcc-private.h | 2 +- server/dcc-send.c | 14 -- server/dcc.c | 42 +

[Spice-devel] [PATCH spice-server 05/15] Move RedStreamClipItem to dcc.c

2017-10-20 Thread Jonathon Jongsma
This is only used by the channel client, so move it out of stream.h into dcc.c. --- server/dcc.c| 23 +++ server/dcc.h| 7 +++ server/stream.c | 23 --- server/stream.h | 9 - 4 files changed, 30 insertions(+), 32 deletions(-) diff --g

[Spice-devel] [PATCH spice-server 02/15] RedStream: make some functions static

2017-10-20 Thread Jonathon Jongsma
These were not used outside of red-stream.c, so make them static and remove them from the header. Acked-by: Frediano Ziglio Signed-off-by: Jonathon Jongsma --- server/red-stream.c | 6 +++--- server/red-stream.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/server/red-

[Spice-devel] [PATCH spice-server 11/15] Rename Stream to VideoStream

2017-10-20 Thread Jonathon Jongsma
To prevent confusion between Stream (a video stream) and RedStream (a generic data stream between client and server), change the name to VideoStream to be more explicit about what it is. Signed-off-by: Jonathon Jongsma --- server/Makefile.am | 4 ++-- server/dcc-private.h

[Spice-devel] [PATCH spice-server 07/15] Move StreamCreateDestroyItem to dcc

2017-10-20 Thread Jonathon Jongsma
Start moving some channel client stuff out of stream.[ch] Signed-off-by: Jonathon Jongsma --- server/dcc.c| 28 server/dcc.h| 7 +++ server/stream.c | 29 - server/stream.h | 5 - 4 files changed, 35 insertions(+), 34 del

[Spice-devel] [PATCH spice-server 04/15] Stream: store channel in stream

2017-10-20 Thread Jonathon Jongsma
This allows us to unref the stream directly rather than needing to pass the associated DisplayChannel to stream_unref(). The same is also true for stream_agent_unref, since the only reason that stream_agent_unref() required a DisplayChannel parameter was to pass it to stream_unref(). This also resu

[Spice-devel] [PATCH spice-server 12/15] Rename VideoStream methods

2017-10-20 Thread Jonathon Jongsma
Use video_stream_ prefix instead of plain stream_ prefix since the type was renamed. Signed-off-by: Jonathon Jongsma --- server/display-channel.c | 22 - server/red-worker.c | 4 +- server/video-stream.c| 116 --- server/video-strea

[Spice-devel] [PATCH spice-server 10/15] Factor out dcc_attach_stream()

2017-10-20 Thread Jonathon Jongsma
Separate the channel code from the channel client code and move the latter into a new function. Signed-off-by: Jonathon Jongsma --- server/dcc.c| 23 +++ server/dcc.h| 1 + server/stream.c | 20 +--- 3 files changed, 25 insertions(+), 19 deletions(-)

[Spice-devel] [PATCH spice-server 15/15] Move display_channel_create_video_stream()

2017-10-20 Thread Jonathon Jongsma
Like the previous commit, this function deals with how the DisplayChannel allocates and manages the video streams, so it belongs with the implementation of DisplayChannel. Signed-off-by: Jonathon Jongsma --- server/display-channel.c | 61 server/d

[Spice-devel] [PATCH spice-server 14/15] Move display_channel_init_video_streams()

2017-10-20 Thread Jonathon Jongsma
Move this function into display-channel.c since it deals with how the DisplayChannel allocates and manages the video streams, rather than implementation of VideoStream. Also move some helper functions that are DisplayChannel-specific. --- server/display-channel.c | 26 ++ s

[Spice-devel] [PATCH spice-server 01/15] Use standard "Red" namespace

2017-10-20 Thread Jonathon Jongsma
The objects RedsStream and RedsSASL are currently using the namespace "Reds" rather than the standard "Red" namespace used throughout the rest of the project. Change these to be consistent. This also means changing method names and some related enumeration types. The files were also renamed to ref

[Spice-devel] [PATCH spice-server 06/15] Move dcc_update-streams_max_latency to dcc.c

2017-10-20 Thread Jonathon Jongsma
Start moving some stuff out of stream.c since it's currently a mix of channel and channel client stuff Signed-off-by: Jonathon Jongsma --- server/dcc.c| 26 ++ server/dcc.h| 1 + server/stream.c | 25 - 3 files changed, 27 insertions(+), 2

[Spice-devel] [PATCH spice-server 08/15] Move dcc_create_stream() to dcc

2017-10-20 Thread Jonathon Jongsma
The declaration is already in dcc.h. Also move helper functions. Signed-off-by: Jonathon Jongsma --- server/dcc.c| 186 server/stream.c | 186 2 files changed, 186 insertions(+),

[Spice-devel] [PATCH spice-server 00/15] A bunch of stream cleanups

2017-10-20 Thread Jonathon Jongsma
I sent two of these patches earlier (one ACKed by Frediano), but decided to do a little more cleanup here. There are a couple of basic issues related to the Stream stuff: 1. The word Stream is used in a couple of ways within the spice-server codebase. The first is a generic data stream between

[Spice-devel] [PATCH spice-server 09/15] Factor out dcc_stream_stop()

2017-10-20 Thread Jonathon Jongsma
Separate the channel code from the channel client code. Move the channel client code to a new function. Signed-off-by: Jonathon Jongsma --- server/dcc.c| 54 ++ server/dcc.h| 1 + server/stream.c | 56 +++---

[Spice-devel] [PATCH spice-server 03/15] Move stream agent manipulation to dcc

2017-10-20 Thread Jonathon Jongsma
Rather than having the DisplayChannel responsible for retrieving the stream agent from the channel client and then maniuplating it, move that into the channel client for improved encapsulation. --- server/dcc.c | 12 server/dcc.h | 3 +++ server/display-channe

Re: [Spice-devel] [PATCH v4 6/8] vdagent: Incapsulate iteration state into a VDAgent structure

2017-10-20 Thread Jakub Janků
On Mon, Oct 16, 2017 at 4:38 PM, Frediano Ziglio wrote: > Related to ongoing work to use GMainLoop and GTK integration > > Based on work from Victor Toso Acked-by: Jakub Janků > --- > src/vdagent/vdagent.c | 121 > ++ > 1 file changed, 72 inser

Re: [Spice-devel] [PATCH v5 1/8] Bump GLib version to 2.34

2017-10-20 Thread Frediano Ziglio
> On Fri, Oct 20, 2017, 1:40 PM Frediano Ziglio < fzig...@redhat.com > wrote: > > > > > > > This is required for the following GMainLoop integration, > > > > which utilizes some of the new functions/definitions, namely: > > > > > > > > [definition][GLib version] > > > > g_clear_pointer() 2.34

[Spice-devel] [PATCH spice-streaming-server] Update copyright license to Apache 2

2017-10-20 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- COPYING | 203 +- LICENSE | 9 -- spice-streaming-agent.spec.in | 4 +- 3 files changed, 204 insertions(+), 12 deletions(-) delete mode 100644 LICENSE diff --git a/COPYING

Re: [Spice-devel] [PATCH v5 1/8] Bump GLib version to 2.34

2017-10-20 Thread Jakub Janků
On Fri, Oct 20, 2017, 1:40 PM Frediano Ziglio wrote: > > > > This is required for the following GMainLoop integration, > > which utilizes some of the new functions/definitions, namely: > > > > [definition][GLib version] > > g_clear_pointer() 2.34 > > G_SOURCE_REMOVE 2.32 > > G_SOURCE_CONTIN

Re: [Spice-devel] [PATCH spice-gtk v2] spicy: Add call of gst_deinit at program exit

2017-10-20 Thread Frediano Ziglio
> > Hi > > - Original Message - > > From: Christophe de Dinechin > > > > This is useful for some instrumentation, e.g. the leaks tracer, > > that perform some of their operations within gst_deinit. > > > > Without this patch, if you run spicy with > > GST_DEBUG="GST_TRACER:7" GST_T

Re: [Spice-devel] [spice-server v3 2/2] channel: Introduce logging helpers

2017-10-20 Thread Frediano Ziglio
> > This commit adds red_channel_{debug,warning,printerr}() helpers which > will prepend the log message with "channel-name:id (%p)". It also > changes various locations which were doing this manually. > --- > Changes since v2: > - added red_channel_log_generic macro to limit the amount of copy an

Re: [Spice-devel] [PATCH v5 1/8] Bump GLib version to 2.34

2017-10-20 Thread Frediano Ziglio
> > This is required for the following GMainLoop integration, > which utilizes some of the new functions/definitions, namely: > > [definition][GLib version] > g_clear_pointer() 2.34 > G_SOURCE_REMOVE 2.32 > G_SOURCE_CONTINUE 2.32 > g_unix_signal_add() 2.30 > > GLib version accross distri

Re: [Spice-devel] [spice-server v3 1/2] utils: Introduce helpers to map channel types to names

2017-10-20 Thread Frediano Ziglio
> > spice_server_set_channel_security() is already mostly doing that. We can > make its code more generic, and introduce a red_channel_get_name() > method. This method will then be used to make debug messages more > readable by showing the actual channel name rather than its type as > an int. > --

Re: [Spice-devel] [spice-server v2 2/2] channel: Introduce logging helpers

2017-10-20 Thread Christophe Fergeau
Hey, On Wed, Oct 18, 2017 at 07:40:47AM -0400, Frediano Ziglio wrote: > About g_warning and g_debug I remember there's still a pending discussion > on calling these directly. I would stick to spice_debug/spice_warning until > the discussion is closed. I did not change this in v3 (but there can al

[Spice-devel] [spice-server v3 2/2] channel: Introduce logging helpers

2017-10-20 Thread Christophe Fergeau
This commit adds red_channel_{debug,warning,printerr}() helpers which will prepend the log message with "channel-name:id (%p)". It also changes various locations which were doing this manually. --- Changes since v2: - added red_channel_log_generic macro to limit the amount of copy and paste - onl

[Spice-devel] [spice-server v3 1/2] utils: Introduce helpers to map channel types to names

2017-10-20 Thread Christophe Fergeau
spice_server_set_channel_security() is already mostly doing that. We can make its code more generic, and introduce a red_channel_get_name() method. This method will then be used to make debug messages more readable by showing the actual channel name rather than its type as an int. --- No changes si