Re: [Spice-devel] [PATCH spice-gtk v2] Move src/keycodemapdb -> subprojects/keycodemapdb

2019-02-15 Thread Marc-André Lureau
Hi

On Fri, Feb 15, 2019 at 6:21 PM Frediano Ziglio  wrote:
> Looking at http://mesonbuild.com/Subprojects.html looks like
> subprojects should be Meson project too.
> While spice-common is now a Meson project keycodemapdb is not
> so it does not seem that great to declare it as subproject.

Ok, it's a bit silly imho. Let's make one then:
https://gitlab.com/keycodemap/keycodemapdb/merge_requests/7

-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk v2] Move src/keycodemapdb -> subprojects/keycodemapdb

2019-02-15 Thread Frediano Ziglio
> Hi
> 
> On Fri, Feb 15, 2019 at 5:21 PM Frediano Ziglio  wrote:
> >
> > > Hi
> > >
> > > On Fri, Feb 15, 2019 at 4:04 PM Frediano Ziglio 
> > > wrote:
> > > >
> > > > >
> > > > > From: Marc-André Lureau 
> > > > >
> > > > > Follow meson build system conventions.
> > > > >
> > > > > This will allow meson to handle it as a subproject.
> > > > >
> > > > > Signed-off-by: Marc-André Lureau 
> > > > > ---
> > > > > Changes since v1:
> > > > > - rebase;
> > > > > - support still Autoconf.
> > > > > ---
> > > > >  .gitmodules   |  4 ++--
> > > > >  meson.build   |  6 +-
> > > > >  src/Makefile.am   | 20 ++--
> > > > >  src/meson.build   |  2 --
> > > > >  {src => subprojects}/keycodemapdb |  0
> > > > >  5 files changed, 17 insertions(+), 15 deletions(-)
> > > > >  rename {src => subprojects}/keycodemapdb (100%)
> > > > >
> > > > > diff --git a/.gitmodules b/.gitmodules
> > > > > index 6938cd0c..a7804e6f 100644
> > > > > --- a/.gitmodules
> > > > > +++ b/.gitmodules
> > > > > @@ -1,6 +1,6 @@
> > > > >  [submodule "spice-common"]
> > > > >   path = subprojects/spice-common
> > > > >   url = ../spice-common.git
> > > > > -[submodule "src/keycodemapdb"]
> > > > > - path = src/keycodemapdb
> > > > > +[submodule "subprojects/keycodemapdb"]
> >
> > Why don't we call it just "keycodemapdb", is not necessary to
> > follow the path (also would be coherent with "spice-common").
> 
> Tbh, I don't care.
> 
> >
> > > > > + path = subprojects/keycodemapdb
> > > > >   url = https://gitlab.com/keycodemap/keycodemapdb.git
> > > > > diff --git a/meson.build b/meson.build
> > > > > index 1276fb95..9fa94fc4 100644
> > > > > --- a/meson.build
> > > > > +++ b/meson.build
> > > > > @@ -38,12 +38,16 @@ spice_gtk_deps = []
> > > > >  spice_acl_deps = []
> > > > >
> > > > >  #
> > > > > -# Spice common subproject
> > > > > +# Set up subprojects
> > > > >  #
> > > > >  spice_common = subproject('spice-common', default_options :
> > > > >  ['generate-code=client'])
> > > > >  
> > > > > spice_gtk_config_data.merge_from(spice_common.get_variable('spice_common_config_data'))
> > > > >  spice_glib_deps +=
> > > > >  spice_common.get_variable('spice_common_client_dep')
> > > > >
> > > > > +subproject('keycodemapdb', required : false)
> > > >
> > > > Why required is false? I don't think spice-gtk will compile
> > > > without it.
> > >
> > > I don't remember adding that, please remove if you commit.
> > >
> >
> > Not a nice idea. Meson is expecting a meson.build inside it and
> > fails.
> 
> Ah that rings a bell :)
> 
> thanks for checking
> 

Looking at http://mesonbuild.com/Subprojects.html looks like
subprojects should be Meson project too.
While spice-common is now a Meson project keycodemapdb is not
so it does not seem that great to declare it as subproject.

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk v2] Move src/keycodemapdb -> subprojects/keycodemapdb

2019-02-15 Thread Marc-André Lureau
Hi

On Fri, Feb 15, 2019 at 5:21 PM Frediano Ziglio  wrote:
>
> > Hi
> >
> > On Fri, Feb 15, 2019 at 4:04 PM Frediano Ziglio  wrote:
> > >
> > > >
> > > > From: Marc-André Lureau 
> > > >
> > > > Follow meson build system conventions.
> > > >
> > > > This will allow meson to handle it as a subproject.
> > > >
> > > > Signed-off-by: Marc-André Lureau 
> > > > ---
> > > > Changes since v1:
> > > > - rebase;
> > > > - support still Autoconf.
> > > > ---
> > > >  .gitmodules   |  4 ++--
> > > >  meson.build   |  6 +-
> > > >  src/Makefile.am   | 20 ++--
> > > >  src/meson.build   |  2 --
> > > >  {src => subprojects}/keycodemapdb |  0
> > > >  5 files changed, 17 insertions(+), 15 deletions(-)
> > > >  rename {src => subprojects}/keycodemapdb (100%)
> > > >
> > > > diff --git a/.gitmodules b/.gitmodules
> > > > index 6938cd0c..a7804e6f 100644
> > > > --- a/.gitmodules
> > > > +++ b/.gitmodules
> > > > @@ -1,6 +1,6 @@
> > > >  [submodule "spice-common"]
> > > >   path = subprojects/spice-common
> > > >   url = ../spice-common.git
> > > > -[submodule "src/keycodemapdb"]
> > > > - path = src/keycodemapdb
> > > > +[submodule "subprojects/keycodemapdb"]
>
> Why don't we call it just "keycodemapdb", is not necessary to
> follow the path (also would be coherent with "spice-common").

Tbh, I don't care.

>
> > > > + path = subprojects/keycodemapdb
> > > >   url = https://gitlab.com/keycodemap/keycodemapdb.git
> > > > diff --git a/meson.build b/meson.build
> > > > index 1276fb95..9fa94fc4 100644
> > > > --- a/meson.build
> > > > +++ b/meson.build
> > > > @@ -38,12 +38,16 @@ spice_gtk_deps = []
> > > >  spice_acl_deps = []
> > > >
> > > >  #
> > > > -# Spice common subproject
> > > > +# Set up subprojects
> > > >  #
> > > >  spice_common = subproject('spice-common', default_options :
> > > >  ['generate-code=client'])
> > > >  
> > > > spice_gtk_config_data.merge_from(spice_common.get_variable('spice_common_config_data'))
> > > >  spice_glib_deps += spice_common.get_variable('spice_common_client_dep')
> > > >
> > > > +subproject('keycodemapdb', required : false)
> > >
> > > Why required is false? I don't think spice-gtk will compile
> > > without it.
> >
> > I don't remember adding that, please remove if you commit.
> >
>
> Not a nice idea. Meson is expecting a meson.build inside it and
> fails.

Ah that rings a bell :)

thanks for checking


-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk 08/12] meson: remove our own submodule update

2019-02-15 Thread Marc-André Lureau
Hi

On Fri, Feb 15, 2019 at 5:19 PM Frediano Ziglio  wrote:
>
> > Hi
> >
> > On Fri, Feb 15, 2019 at 3:57 PM Frediano Ziglio  wrote:
> > >
> > > > From: Marc-André Lureau 
> > > >
> > > > Our own handling was limited, since it checked only spice-common.
> > > >
> > > > This is handled by meson since v0.40 for subprojects.
> > > >
> > > > Signed-off-by: Marc-André Lureau 
> > > > ---
> > > >  build-aux/meson/check-spice-common | 5 -
> > > >  meson.build| 3 ---
> > > >  2 files changed, 8 deletions(-)
> > > >  delete mode 100755 build-aux/meson/check-spice-common
> > > >
> > > > diff --git a/build-aux/meson/check-spice-common
> > > > b/build-aux/meson/check-spice-common
> > > > deleted file mode 100755
> > > > index a0d03a6..000
> > > > --- a/build-aux/meson/check-spice-common
> > > > +++ /dev/null
> > > > @@ -1,5 +0,0 @@
> > > > -#!/bin/sh
> > > > -set -e
> > > > -if git ls-files --error-unmatch
> > > > ${MESON_SOURCE_ROOT}/subprojects/spice-common > /dev/null 2>&1; then
> > > > -git --git-dir="${MESON_SOURCE_ROOT}/.git" submodule update --init
> > > > --recursive
> > > > -fi
> > > > diff --git a/meson.build b/meson.build
> > > > index 29d5fed..c5dc438 100644
> > > > --- a/meson.build
> > > > +++ b/meson.build
> > > > @@ -6,9 +6,6 @@ project('spice-gtk', 'c',
> > > >   license : 'LGPLv2.1',
> > > >   meson_version : '>= 0.49')
> > > >
> > > > -message('Updating submodules')
> > > > -run_command('build-aux/meson/check-spice-common', check : true)
> > > > -
> > > >  #
> > > >  # global C defines
> > > >  #
> > >
> > > Without this patch Meson does not sync the submodules automatically.
> >
> >
> > Hmm weird, what error do you get?
> >
> > (obviously it requires "Move src/keycodemapdb ->
> > subprojects/keycodemapdb" before)
> >
>
> If I checkout an old spice-common it does not update it and
> give error that cannot find meson.build.

I don't understand what you are trying to do.

All the build-sys should do wrt submodule handling is initial checkout.

If you modify the submodule later, it shouldn't re-sync it on configure/build.


-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk v2] Move src/keycodemapdb -> subprojects/keycodemapdb

2019-02-15 Thread Frediano Ziglio
> Hi
> 
> On Fri, Feb 15, 2019 at 4:04 PM Frediano Ziglio  wrote:
> >
> > >
> > > From: Marc-André Lureau 
> > >
> > > Follow meson build system conventions.
> > >
> > > This will allow meson to handle it as a subproject.
> > >
> > > Signed-off-by: Marc-André Lureau 
> > > ---
> > > Changes since v1:
> > > - rebase;
> > > - support still Autoconf.
> > > ---
> > >  .gitmodules   |  4 ++--
> > >  meson.build   |  6 +-
> > >  src/Makefile.am   | 20 ++--
> > >  src/meson.build   |  2 --
> > >  {src => subprojects}/keycodemapdb |  0
> > >  5 files changed, 17 insertions(+), 15 deletions(-)
> > >  rename {src => subprojects}/keycodemapdb (100%)
> > >
> > > diff --git a/.gitmodules b/.gitmodules
> > > index 6938cd0c..a7804e6f 100644
> > > --- a/.gitmodules
> > > +++ b/.gitmodules
> > > @@ -1,6 +1,6 @@
> > >  [submodule "spice-common"]
> > >   path = subprojects/spice-common
> > >   url = ../spice-common.git
> > > -[submodule "src/keycodemapdb"]
> > > - path = src/keycodemapdb
> > > +[submodule "subprojects/keycodemapdb"]

Why don't we call it just "keycodemapdb", is not necessary to
follow the path (also would be coherent with "spice-common").

> > > + path = subprojects/keycodemapdb
> > >   url = https://gitlab.com/keycodemap/keycodemapdb.git
> > > diff --git a/meson.build b/meson.build
> > > index 1276fb95..9fa94fc4 100644
> > > --- a/meson.build
> > > +++ b/meson.build
> > > @@ -38,12 +38,16 @@ spice_gtk_deps = []
> > >  spice_acl_deps = []
> > >
> > >  #
> > > -# Spice common subproject
> > > +# Set up subprojects
> > >  #
> > >  spice_common = subproject('spice-common', default_options :
> > >  ['generate-code=client'])
> > >  
> > > spice_gtk_config_data.merge_from(spice_common.get_variable('spice_common_config_data'))
> > >  spice_glib_deps += spice_common.get_variable('spice_common_client_dep')
> > >
> > > +subproject('keycodemapdb', required : false)
> >
> > Why required is false? I don't think spice-gtk will compile
> > without it.
> 
> I don't remember adding that, please remove if you commit.
> 

Not a nice idea. Meson is expecting a meson.build inside it and
fails.

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk 08/12] meson: remove our own submodule update

2019-02-15 Thread Frediano Ziglio
> Hi
> 
> On Fri, Feb 15, 2019 at 3:57 PM Frediano Ziglio  wrote:
> >
> > > From: Marc-André Lureau 
> > >
> > > Our own handling was limited, since it checked only spice-common.
> > >
> > > This is handled by meson since v0.40 for subprojects.
> > >
> > > Signed-off-by: Marc-André Lureau 
> > > ---
> > >  build-aux/meson/check-spice-common | 5 -
> > >  meson.build| 3 ---
> > >  2 files changed, 8 deletions(-)
> > >  delete mode 100755 build-aux/meson/check-spice-common
> > >
> > > diff --git a/build-aux/meson/check-spice-common
> > > b/build-aux/meson/check-spice-common
> > > deleted file mode 100755
> > > index a0d03a6..000
> > > --- a/build-aux/meson/check-spice-common
> > > +++ /dev/null
> > > @@ -1,5 +0,0 @@
> > > -#!/bin/sh
> > > -set -e
> > > -if git ls-files --error-unmatch
> > > ${MESON_SOURCE_ROOT}/subprojects/spice-common > /dev/null 2>&1; then
> > > -git --git-dir="${MESON_SOURCE_ROOT}/.git" submodule update --init
> > > --recursive
> > > -fi
> > > diff --git a/meson.build b/meson.build
> > > index 29d5fed..c5dc438 100644
> > > --- a/meson.build
> > > +++ b/meson.build
> > > @@ -6,9 +6,6 @@ project('spice-gtk', 'c',
> > >   license : 'LGPLv2.1',
> > >   meson_version : '>= 0.49')
> > >
> > > -message('Updating submodules')
> > > -run_command('build-aux/meson/check-spice-common', check : true)
> > > -
> > >  #
> > >  # global C defines
> > >  #
> >
> > Without this patch Meson does not sync the submodules automatically.
> 
> 
> Hmm weird, what error do you get?
> 
> (obviously it requires "Move src/keycodemapdb ->
> subprojects/keycodemapdb" before)
> 

If I checkout an old spice-common it does not update it and
give error that cannot find meson.build.

These lines were here to do a similar job of autogen.sh updating
the modules.

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk v2] Move src/keycodemapdb -> subprojects/keycodemapdb

2019-02-15 Thread Marc-André Lureau
On Fri, Feb 15, 2019 at 4:54 PM Frediano Ziglio  wrote:
>
> > Hi
> >
> > On Fri, Feb 15, 2019 at 4:04 PM Frediano Ziglio  wrote:
> > >
> > > >
> > > > From: Marc-André Lureau 
> > > >
> > > > Follow meson build system conventions.
> > > >
> > > > This will allow meson to handle it as a subproject.
> > > >
> > > > Signed-off-by: Marc-André Lureau 
> > > > ---
> > > > Changes since v1:
> > > > - rebase;
> > > > - support still Autoconf.
> > > > ---
> > > >  .gitmodules   |  4 ++--
> > > >  meson.build   |  6 +-
> > > >  src/Makefile.am   | 20 ++--
> > > >  src/meson.build   |  2 --
> > > >  {src => subprojects}/keycodemapdb |  0
> > > >  5 files changed, 17 insertions(+), 15 deletions(-)
> > > >  rename {src => subprojects}/keycodemapdb (100%)
> > > >
> > > > diff --git a/.gitmodules b/.gitmodules
> > > > index 6938cd0c..a7804e6f 100644
> > > > --- a/.gitmodules
> > > > +++ b/.gitmodules
> > > > @@ -1,6 +1,6 @@
> > > >  [submodule "spice-common"]
> > > >   path = subprojects/spice-common
> > > >   url = ../spice-common.git
> > > > -[submodule "src/keycodemapdb"]
> > > > - path = src/keycodemapdb
> > > > +[submodule "subprojects/keycodemapdb"]
> > > > + path = subprojects/keycodemapdb
> > > >   url = https://gitlab.com/keycodemap/keycodemapdb.git
> > > > diff --git a/meson.build b/meson.build
> > > > index 1276fb95..9fa94fc4 100644
> > > > --- a/meson.build
> > > > +++ b/meson.build
> > > > @@ -38,12 +38,16 @@ spice_gtk_deps = []
> > > >  spice_acl_deps = []
> > > >
> > > >  #
> > > > -# Spice common subproject
> > > > +# Set up subprojects
> > > >  #
> > > >  spice_common = subproject('spice-common', default_options :
> > > >  ['generate-code=client'])
> > > >  
> > > > spice_gtk_config_data.merge_from(spice_common.get_variable('spice_common_config_data'))
> > > >  spice_glib_deps += spice_common.get_variable('spice_common_client_dep')
> > > >
> > > > +subproject('keycodemapdb', required : false)
> > >
> > > Why required is false? I don't think spice-gtk will compile
> > > without it.
> >
> > I don't remember adding that, please remove if you commit.
> >
>
> I can do it. Are you fine with the Autoconf addition? Do you ack?

ack


thanks



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk v2] Move src/keycodemapdb -> subprojects/keycodemapdb

2019-02-15 Thread Frediano Ziglio
> Hi
> 
> On Fri, Feb 15, 2019 at 4:04 PM Frediano Ziglio  wrote:
> >
> > >
> > > From: Marc-André Lureau 
> > >
> > > Follow meson build system conventions.
> > >
> > > This will allow meson to handle it as a subproject.
> > >
> > > Signed-off-by: Marc-André Lureau 
> > > ---
> > > Changes since v1:
> > > - rebase;
> > > - support still Autoconf.
> > > ---
> > >  .gitmodules   |  4 ++--
> > >  meson.build   |  6 +-
> > >  src/Makefile.am   | 20 ++--
> > >  src/meson.build   |  2 --
> > >  {src => subprojects}/keycodemapdb |  0
> > >  5 files changed, 17 insertions(+), 15 deletions(-)
> > >  rename {src => subprojects}/keycodemapdb (100%)
> > >
> > > diff --git a/.gitmodules b/.gitmodules
> > > index 6938cd0c..a7804e6f 100644
> > > --- a/.gitmodules
> > > +++ b/.gitmodules
> > > @@ -1,6 +1,6 @@
> > >  [submodule "spice-common"]
> > >   path = subprojects/spice-common
> > >   url = ../spice-common.git
> > > -[submodule "src/keycodemapdb"]
> > > - path = src/keycodemapdb
> > > +[submodule "subprojects/keycodemapdb"]
> > > + path = subprojects/keycodemapdb
> > >   url = https://gitlab.com/keycodemap/keycodemapdb.git
> > > diff --git a/meson.build b/meson.build
> > > index 1276fb95..9fa94fc4 100644
> > > --- a/meson.build
> > > +++ b/meson.build
> > > @@ -38,12 +38,16 @@ spice_gtk_deps = []
> > >  spice_acl_deps = []
> > >
> > >  #
> > > -# Spice common subproject
> > > +# Set up subprojects
> > >  #
> > >  spice_common = subproject('spice-common', default_options :
> > >  ['generate-code=client'])
> > >  
> > > spice_gtk_config_data.merge_from(spice_common.get_variable('spice_common_config_data'))
> > >  spice_glib_deps += spice_common.get_variable('spice_common_client_dep')
> > >
> > > +subproject('keycodemapdb', required : false)
> >
> > Why required is false? I don't think spice-gtk will compile
> > without it.
> 
> I don't remember adding that, please remove if you commit.
> 

I can do it. Are you fine with the Autoconf addition? Do you ack?

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk 05/12] meson: add vcs_tag to session init debug log

2019-02-15 Thread Marc-André Lureau
Hi

On Fri, Feb 15, 2019 at 3:57 PM Frediano Ziglio  wrote:
>
> >
> > From: Marc-André Lureau 
> >
> > Use the trick recommended here to generate a vcs_tag.h at build-time:
> > https://github.com/mesonbuild/meson/issues/3903
> >
> > Hopefully, meson will learn to generate project version from git:
> > https://github.com/mesonbuild/meson/issues/688
> >
> > Signed-off-by: Marc-André Lureau 
> > ---
> >  src/meson.build | 12 
> >  src/spice-session.c |  3 ++-
> >  src/vcs_tag.h.in|  1 +
> >  3 files changed, 15 insertions(+), 1 deletion(-)
> >  create mode 100644 src/vcs_tag.h.in
> >
> > diff --git a/src/meson.build b/src/meson.build
> > index c55db44..e580429 100644
> > --- a/src/meson.build
> > +++ b/src/meson.build
> > @@ -82,9 +82,21 @@ spice_client_glib_introspection_sources = [
> >'usb-device-manager.c',
> >  ]
> >
> > +vcs_conf = configuration_data()
> > +vcs_conf.set('VCS_TAG', '@VCS_TAG@')
> > +vcs_tag_h = vcs_tag(
> > +  input : configure_file(
> > +input : 'vcs_tag.h.in',
> > +output : 'vcs_tag.h.in',
> > +configuration: vcs_conf,
> > +  ),
> > +  output : 'vcs_tag.h',
> > +)
> > +
> >  spice_client_glib_sources = [
> >spice_marshals,
> >spice_client_glib_introspection_sources,
> > +  vcs_tag_h,
> >'bio-gio.c',
> >'bio-gio.h',
> >'channel-base.c',
> > diff --git a/src/spice-session.c b/src/spice-session.c
> > index 5609c9b..d9825e3 100644
> > --- a/src/spice-session.c
> > +++ b/src/spice-session.c
> > @@ -32,6 +32,7 @@
> >  #include "spice-uri-priv.h"
> >  #include "channel-playback-priv.h"
> >  #include "spice-audio-priv.h"
> > +#include "vcs_tag.h"
> >
> >  #define IMAGES_CACHE_SIZE_DEFAULT (1024 * 1024 * 80)
> >  #define MIN_GLZ_WINDOW_SIZE_DEFAULT (1024 * 1024 * 12)
> > @@ -277,7 +278,7 @@ static void spice_session_init(SpiceSession *session)
> >  SpiceSessionPrivate *s;
> >  gchar *channels;
> >
> > -SPICE_DEBUG("New session (compiled from package " PACKAGE_STRING ")");
> > +SPICE_DEBUG("New session (package version: " VCS_TAG ")");
> >  s = session->priv = spice_session_get_instance_private(session);
> >
> >  channels = spice_channel_supported_string();
>
> Why is this patch needed? Meson already generates PACKAGE_STRING in config.h
>

It is no longer needed now that you made git-version-gen work again
(so the git version is included in PACKAGE_STRING)

We might need to revisit this patch depending on how meson finally solves !688

> > diff --git a/src/vcs_tag.h.in b/src/vcs_tag.h.in
> > new file mode 100644
> > index 000..5d8985d
> > --- /dev/null
> > +++ b/src/vcs_tag.h.in
> > @@ -0,0 +1 @@
> > +#define VCS_TAG "@VCS_TAG@"
>
> Frediano
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk v2] Move src/keycodemapdb -> subprojects/keycodemapdb

2019-02-15 Thread Marc-André Lureau
Hi

On Fri, Feb 15, 2019 at 4:04 PM Frediano Ziglio  wrote:
>
> >
> > From: Marc-André Lureau 
> >
> > Follow meson build system conventions.
> >
> > This will allow meson to handle it as a subproject.
> >
> > Signed-off-by: Marc-André Lureau 
> > ---
> > Changes since v1:
> > - rebase;
> > - support still Autoconf.
> > ---
> >  .gitmodules   |  4 ++--
> >  meson.build   |  6 +-
> >  src/Makefile.am   | 20 ++--
> >  src/meson.build   |  2 --
> >  {src => subprojects}/keycodemapdb |  0
> >  5 files changed, 17 insertions(+), 15 deletions(-)
> >  rename {src => subprojects}/keycodemapdb (100%)
> >
> > diff --git a/.gitmodules b/.gitmodules
> > index 6938cd0c..a7804e6f 100644
> > --- a/.gitmodules
> > +++ b/.gitmodules
> > @@ -1,6 +1,6 @@
> >  [submodule "spice-common"]
> >   path = subprojects/spice-common
> >   url = ../spice-common.git
> > -[submodule "src/keycodemapdb"]
> > - path = src/keycodemapdb
> > +[submodule "subprojects/keycodemapdb"]
> > + path = subprojects/keycodemapdb
> >   url = https://gitlab.com/keycodemap/keycodemapdb.git
> > diff --git a/meson.build b/meson.build
> > index 1276fb95..9fa94fc4 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -38,12 +38,16 @@ spice_gtk_deps = []
> >  spice_acl_deps = []
> >
> >  #
> > -# Spice common subproject
> > +# Set up subprojects
> >  #
> >  spice_common = subproject('spice-common', default_options :
> >  ['generate-code=client'])
> >  
> > spice_gtk_config_data.merge_from(spice_common.get_variable('spice_common_config_data'))
> >  spice_glib_deps += spice_common.get_variable('spice_common_client_dep')
> >
> > +subproject('keycodemapdb', required : false)
>
> Why required is false? I don't think spice-gtk will compile
> without it.

I don't remember adding that, please remove if you commit.



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk 08/12] meson: remove our own submodule update

2019-02-15 Thread Marc-André Lureau
Hi

On Fri, Feb 15, 2019 at 3:57 PM Frediano Ziglio  wrote:
>
> > From: Marc-André Lureau 
> >
> > Our own handling was limited, since it checked only spice-common.
> >
> > This is handled by meson since v0.40 for subprojects.
> >
> > Signed-off-by: Marc-André Lureau 
> > ---
> >  build-aux/meson/check-spice-common | 5 -
> >  meson.build| 3 ---
> >  2 files changed, 8 deletions(-)
> >  delete mode 100755 build-aux/meson/check-spice-common
> >
> > diff --git a/build-aux/meson/check-spice-common
> > b/build-aux/meson/check-spice-common
> > deleted file mode 100755
> > index a0d03a6..000
> > --- a/build-aux/meson/check-spice-common
> > +++ /dev/null
> > @@ -1,5 +0,0 @@
> > -#!/bin/sh
> > -set -e
> > -if git ls-files --error-unmatch
> > ${MESON_SOURCE_ROOT}/subprojects/spice-common > /dev/null 2>&1; then
> > -git --git-dir="${MESON_SOURCE_ROOT}/.git" submodule update --init
> > --recursive
> > -fi
> > diff --git a/meson.build b/meson.build
> > index 29d5fed..c5dc438 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -6,9 +6,6 @@ project('spice-gtk', 'c',
> >   license : 'LGPLv2.1',
> >   meson_version : '>= 0.49')
> >
> > -message('Updating submodules')
> > -run_command('build-aux/meson/check-spice-common', check : true)
> > -
> >  #
> >  # global C defines
> >  #
>
> Without this patch Meson does not sync the submodules automatically.


Hmm weird, what error do you get?

(obviously it requires "Move src/keycodemapdb ->
subprojects/keycodemapdb" before)



>
> Frediano
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk] desktop-integration: Avoid empty private structure

2019-02-15 Thread Marc-André Lureau
On Fri, Feb 15, 2019 at 3:57 PM Frediano Ziglio  wrote:
>
> This causes a critical warning as private structures should not
> be empty.
>
> Signed-off-by: Frediano Ziglio 

ack

> ---
>  src/desktop-integration.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/desktop-integration.c b/src/desktop-integration.c
> index 8458efaa..6f569ae2 100644
> --- a/src/desktop-integration.c
> +++ b/src/desktop-integration.c
> @@ -38,6 +38,9 @@ struct _SpiceDesktopIntegrationPrivate {
>  #ifdef WITH_GNOME
>  GDBusProxy *gnome_session_proxy;
>  guint gnome_automount_inhibit_cookie;
> +#else
> +/* private structures cannot be empty in GLib */
> +int dummy;
>  #endif
>  };
>
> --
> 2.20.1
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH v5] spice: set device address and device display ID in QXL interface

2019-02-15 Thread Lukáš Hrázký
Calls the new SPICE QXL interface function spice_qxl_set_device_info to
set the hardware address of the graphics device represented by the QXL
interface (e.g. a PCI path) and the device display IDs (the IDs of the
device's monitors that belong to this QXL interface).

Also stops using the deprecated spice_qxl_set_max_monitors, the new
interface function replaces it.

Signed-off-by: Lukáš Hrázký 
---
Hi,

sorry about the noise, v4 still isn't passing the check. I didn't know
the check script is in the git tree. This one should pass.

Changes since v4:
* Really fix comments according to the check script.

Cheers,
Lukas


 hw/display/qxl.c   | 14 ++-
 include/ui/spice-display.h |  4 +++
 ui/spice-core.c| 51 ++
 ui/spice-display.c | 11 
 4 files changed, 79 insertions(+), 1 deletion(-)

diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index da8fd5a40a..c8ce5781e0 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -276,7 +276,8 @@ static void qxl_spice_monitors_config_async(PCIQXLDevice 
*qxl, int replay)
 QXL_COOKIE_TYPE_POST_LOAD_MONITORS_CONFIG,
 0));
 } else {
-#if SPICE_SERVER_VERSION >= 0x000c06 /* release 0.12.6 */
+/* >= release 0.12.6, < release 0.14.2 */
+#if SPICE_SERVER_VERSION >= 0x000c06 && SPICE_SERVER_VERSION < 0x000e02
 if (qxl->max_outputs) {
 spice_qxl_set_max_monitors(>ssd.qxl, qxl->max_outputs);
 }
@@ -2188,6 +2189,17 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Error 
**errp)
SPICE_INTERFACE_QXL_MAJOR, SPICE_INTERFACE_QXL_MINOR);
 return;
 }
+
+#if SPICE_SERVER_VERSION >= 0x000e02 /* release 0.14.2 */
+char device_address[256] = "";
+if (qemu_spice_fill_device_address(qxl->vga.con, device_address, 256)) {
+spice_qxl_set_device_info(>ssd.qxl,
+  device_address,
+  0,
+  qxl->max_outputs);
+}
+#endif
+
 qemu_add_vm_change_state_handler(qxl_vm_change_state_handler, qxl);
 
 qxl->update_irq = qemu_bh_new(qxl_update_irq_bh, qxl);
diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h
index 87a84a59d4..53c3612c32 100644
--- a/include/ui/spice-display.h
+++ b/include/ui/spice-display.h
@@ -179,3 +179,7 @@ void qemu_spice_wakeup(SimpleSpiceDisplay *ssd);
 void qemu_spice_display_start(void);
 void qemu_spice_display_stop(void);
 int qemu_spice_display_is_running(SimpleSpiceDisplay *ssd);
+
+bool qemu_spice_fill_device_address(QemuConsole *con,
+char *device_address,
+size_t size);
diff --git a/ui/spice-core.c b/ui/spice-core.c
index a40fb2c00d..37fae3c424 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -34,6 +34,7 @@
 #include "qemu/option.h"
 #include "migration/misc.h"
 #include "hw/hw.h"
+#include "hw/pci/pci_bus.h"
 #include "ui/spice-display.h"
 
 /* core bits */
@@ -863,6 +864,56 @@ bool qemu_spice_have_display_interface(QemuConsole *con)
 return false;
 }
 
+/*
+ * Recursively (in reverse order) appends addresses of PCI devices as it moves
+ * up in the PCI hierarchy.
+ *
+ * @returns true on success, false when the buffer wasn't large enough
+ */
+static bool append_pci_address(char *buf, size_t buf_size, const PCIDevice 
*pci)
+{
+PCIBus *bus = pci_get_bus(pci);
+/*
+ * equivalent to if (!pci_bus_is_root(bus)), but the function is not built
+ * with PCI_CONFIG=n, avoid using an #ifdef by checking directly
+ */
+if (bus->parent_dev != NULL) {
+append_pci_address(buf, buf_size, bus->parent_dev);
+}
+
+size_t len = strlen(buf);
+ssize_t written = snprintf(buf + len, buf_size - len, "/%02x.%x",
+PCI_SLOT(pci->devfn), PCI_FUNC(pci->devfn));
+
+return written > 0 && written < buf_size - len;
+}
+
+bool qemu_spice_fill_device_address(QemuConsole *con,
+char *device_address,
+size_t size)
+{
+DeviceState *dev = DEVICE(object_property_get_link(OBJECT(con),
+   "device",
+   _abort));
+PCIDevice *pci = (PCIDevice *) object_dynamic_cast(OBJECT(dev),
+   TYPE_PCI_DEVICE);
+
+if (pci == NULL) {
+warn_report("Setting device address of a display device to SPICE: "
+"Not a PCI device.");
+return false;
+}
+
+strncpy(device_address, "pci/", size);
+if (!append_pci_address(device_address, size, pci)) {
+warn_report("Setting device address of a display device to SPICE: "
+"Too many PCI devices in the chain.");
+return false;
+}
+
+return true;
+}
+
 int qemu_spice_add_display_interface(QXLInstance *qxlin, QemuConsole 

Re: [Spice-devel] [PATCH spice-gtk v2] Move src/keycodemapdb -> subprojects/keycodemapdb

2019-02-15 Thread Frediano Ziglio
> 
> From: Marc-André Lureau 
> 
> Follow meson build system conventions.
> 
> This will allow meson to handle it as a subproject.
> 
> Signed-off-by: Marc-André Lureau 
> ---
> Changes since v1:
> - rebase;
> - support still Autoconf.
> ---
>  .gitmodules   |  4 ++--
>  meson.build   |  6 +-
>  src/Makefile.am   | 20 ++--
>  src/meson.build   |  2 --
>  {src => subprojects}/keycodemapdb |  0
>  5 files changed, 17 insertions(+), 15 deletions(-)
>  rename {src => subprojects}/keycodemapdb (100%)
> 
> diff --git a/.gitmodules b/.gitmodules
> index 6938cd0c..a7804e6f 100644
> --- a/.gitmodules
> +++ b/.gitmodules
> @@ -1,6 +1,6 @@
>  [submodule "spice-common"]
>   path = subprojects/spice-common
>   url = ../spice-common.git
> -[submodule "src/keycodemapdb"]
> - path = src/keycodemapdb
> +[submodule "subprojects/keycodemapdb"]
> + path = subprojects/keycodemapdb
>   url = https://gitlab.com/keycodemap/keycodemapdb.git
> diff --git a/meson.build b/meson.build
> index 1276fb95..9fa94fc4 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -38,12 +38,16 @@ spice_gtk_deps = []
>  spice_acl_deps = []
>  
>  #
> -# Spice common subproject
> +# Set up subprojects
>  #
>  spice_common = subproject('spice-common', default_options :
>  ['generate-code=client'])
>  
> spice_gtk_config_data.merge_from(spice_common.get_variable('spice_common_config_data'))
>  spice_glib_deps += spice_common.get_variable('spice_common_client_dep')
>  
> +subproject('keycodemapdb', required : false)

Why required is false? I don't think spice-gtk will compile
without it.

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk 05/12] meson: add vcs_tag to session init debug log

2019-02-15 Thread Frediano Ziglio
> 
> From: Marc-André Lureau 
> 
> Use the trick recommended here to generate a vcs_tag.h at build-time:
> https://github.com/mesonbuild/meson/issues/3903
> 
> Hopefully, meson will learn to generate project version from git:
> https://github.com/mesonbuild/meson/issues/688
> 
> Signed-off-by: Marc-André Lureau 
> ---
>  src/meson.build | 12 
>  src/spice-session.c |  3 ++-
>  src/vcs_tag.h.in|  1 +
>  3 files changed, 15 insertions(+), 1 deletion(-)
>  create mode 100644 src/vcs_tag.h.in
> 
> diff --git a/src/meson.build b/src/meson.build
> index c55db44..e580429 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -82,9 +82,21 @@ spice_client_glib_introspection_sources = [
>'usb-device-manager.c',
>  ]
>  
> +vcs_conf = configuration_data()
> +vcs_conf.set('VCS_TAG', '@VCS_TAG@')
> +vcs_tag_h = vcs_tag(
> +  input : configure_file(
> +input : 'vcs_tag.h.in',
> +output : 'vcs_tag.h.in',
> +configuration: vcs_conf,
> +  ),
> +  output : 'vcs_tag.h',
> +)
> +
>  spice_client_glib_sources = [
>spice_marshals,
>spice_client_glib_introspection_sources,
> +  vcs_tag_h,
>'bio-gio.c',
>'bio-gio.h',
>'channel-base.c',
> diff --git a/src/spice-session.c b/src/spice-session.c
> index 5609c9b..d9825e3 100644
> --- a/src/spice-session.c
> +++ b/src/spice-session.c
> @@ -32,6 +32,7 @@
>  #include "spice-uri-priv.h"
>  #include "channel-playback-priv.h"
>  #include "spice-audio-priv.h"
> +#include "vcs_tag.h"
>  
>  #define IMAGES_CACHE_SIZE_DEFAULT (1024 * 1024 * 80)
>  #define MIN_GLZ_WINDOW_SIZE_DEFAULT (1024 * 1024 * 12)
> @@ -277,7 +278,7 @@ static void spice_session_init(SpiceSession *session)
>  SpiceSessionPrivate *s;
>  gchar *channels;
>  
> -SPICE_DEBUG("New session (compiled from package " PACKAGE_STRING ")");
> +SPICE_DEBUG("New session (package version: " VCS_TAG ")");
>  s = session->priv = spice_session_get_instance_private(session);
>  
>  channels = spice_channel_supported_string();

Why is this patch needed? Meson already generates PACKAGE_STRING in config.h

> diff --git a/src/vcs_tag.h.in b/src/vcs_tag.h.in
> new file mode 100644
> index 000..5d8985d
> --- /dev/null
> +++ b/src/vcs_tag.h.in
> @@ -0,0 +1 @@
> +#define VCS_TAG "@VCS_TAG@"

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH v4] spice: set device address and device display ID in QXL interface

2019-02-15 Thread Lukáš Hrázký
Calls the new SPICE QXL interface function spice_qxl_set_device_info to
set the hardware address of the graphics device represented by the QXL
interface (e.g. a PCI path) and the device display IDs (the IDs of the
device's monitors that belong to this QXL interface).

Also stops using the deprecated spice_qxl_set_max_monitors, the new
interface function replaces it.

Signed-off-by: Lukáš Hrázký 
---
Hi,

Changes since v3:
* Fix comments according to patchew check script.

Cheers,
Lukas


 hw/display/qxl.c   | 14 ++-
 include/ui/spice-display.h |  4 
 ui/spice-core.c| 49 ++
 ui/spice-display.c | 11 +
 4 files changed, 77 insertions(+), 1 deletion(-)

diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index da8fd5a40a..c8ce5781e0 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -276,7 +276,8 @@ static void qxl_spice_monitors_config_async(PCIQXLDevice 
*qxl, int replay)
 QXL_COOKIE_TYPE_POST_LOAD_MONITORS_CONFIG,
 0));
 } else {
-#if SPICE_SERVER_VERSION >= 0x000c06 /* release 0.12.6 */
+/* >= release 0.12.6, < release 0.14.2 */
+#if SPICE_SERVER_VERSION >= 0x000c06 && SPICE_SERVER_VERSION < 0x000e02
 if (qxl->max_outputs) {
 spice_qxl_set_max_monitors(>ssd.qxl, qxl->max_outputs);
 }
@@ -2188,6 +2189,17 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Error 
**errp)
SPICE_INTERFACE_QXL_MAJOR, SPICE_INTERFACE_QXL_MINOR);
 return;
 }
+
+#if SPICE_SERVER_VERSION >= 0x000e02 /* release 0.14.2 */
+char device_address[256] = "";
+if (qemu_spice_fill_device_address(qxl->vga.con, device_address, 256)) {
+spice_qxl_set_device_info(>ssd.qxl,
+  device_address,
+  0,
+  qxl->max_outputs);
+}
+#endif
+
 qemu_add_vm_change_state_handler(qxl_vm_change_state_handler, qxl);
 
 qxl->update_irq = qemu_bh_new(qxl_update_irq_bh, qxl);
diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h
index 87a84a59d4..53c3612c32 100644
--- a/include/ui/spice-display.h
+++ b/include/ui/spice-display.h
@@ -179,3 +179,7 @@ void qemu_spice_wakeup(SimpleSpiceDisplay *ssd);
 void qemu_spice_display_start(void);
 void qemu_spice_display_stop(void);
 int qemu_spice_display_is_running(SimpleSpiceDisplay *ssd);
+
+bool qemu_spice_fill_device_address(QemuConsole *con,
+char *device_address,
+size_t size);
diff --git a/ui/spice-core.c b/ui/spice-core.c
index a40fb2c00d..4b501d485e 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -34,6 +34,7 @@
 #include "qemu/option.h"
 #include "migration/misc.h"
 #include "hw/hw.h"
+#include "hw/pci/pci_bus.h"
 #include "ui/spice-display.h"
 
 /* core bits */
@@ -863,6 +864,54 @@ bool qemu_spice_have_display_interface(QemuConsole *con)
 return false;
 }
 
+/*
+ * Recursively (in reverse order) appends addresses of PCI devices as it moves
+ * up in the PCI hierarchy.
+ *
+ * @returns true on success, false when the buffer wasn't large enough
+ */
+static bool append_pci_address(char *buf, size_t buf_size, const PCIDevice 
*pci)
+{
+PCIBus *bus = pci_get_bus(pci);
+/* equivalent to if (!pci_bus_is_root(bus)), but the function is not built
+   with PCI_CONFIG=n, avoid using an #ifdef by checking directly */
+if (bus->parent_dev != NULL) {
+append_pci_address(buf, buf_size, bus->parent_dev);
+}
+
+size_t len = strlen(buf);
+ssize_t written = snprintf(buf + len, buf_size - len, "/%02x.%x",
+PCI_SLOT(pci->devfn), PCI_FUNC(pci->devfn));
+
+return written > 0 && written < buf_size - len;
+}
+
+bool qemu_spice_fill_device_address(QemuConsole *con,
+char *device_address,
+size_t size)
+{
+DeviceState *dev = DEVICE(object_property_get_link(OBJECT(con),
+   "device",
+   _abort));
+PCIDevice *pci = (PCIDevice *) object_dynamic_cast(OBJECT(dev),
+   TYPE_PCI_DEVICE);
+
+if (pci == NULL) {
+warn_report("Setting device address of a display device to SPICE: "
+"Not a PCI device.");
+return false;
+}
+
+strncpy(device_address, "pci/", size);
+if (!append_pci_address(device_address, size, pci)) {
+warn_report("Setting device address of a display device to SPICE: "
+"Too many PCI devices in the chain.");
+return false;
+}
+
+return true;
+}
+
 int qemu_spice_add_display_interface(QXLInstance *qxlin, QemuConsole *con)
 {
 if (g_slist_find(spice_consoles, con)) {
diff --git a/ui/spice-display.c b/ui/spice-display.c
index aea6f6ebce..a5e26479a8 100644
--- 

Re: [Spice-devel] [PATCH spice-html5 2/3] Fix the console toggle in the new ES6 environment.

2019-02-15 Thread Cedric Bosdonnat
On Thu, 2019-02-14 at 12:55 -0600, Jeremy White wrote:
> Signed-off-by: Jeremy White 
> ---
>  spice.html | 9 ++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/spice.html b/spice.html
> index f9e1af4..d744ef9 100644
> --- a/spice.html
> +++ b/spice.html
> @@ -146,8 +146,10 @@
>  m.style.display = 'none';
>  }
>  
> -window.addEventListener('resize', handle_resize);
> -SpiceHtml5.resize_helper(sc);
> +window.addEventListener('resize',
> SpiceHtml5.handle_resize);
> +if (sc) {
> +SpiceHtml5.resize_helper(sc);
> +}
>  }
>  /* SPICE port event listeners
>  window.addEventListener('spice-port-data',
> function(event) {
> @@ -162,6 +164,7 @@
>  */
>  
>  document.getElementById('connectButton').onclick =
> connect;
> +document.getElementById('show_console').onchange =
> toggle_console;
>  
>  
>  
> @@ -173,7 +176,7 @@
>  Host:  id='host' value='localhost'> 
>  Port:  id='port' value='5959'>
>  Password:  type='password' id='password' value=''>
> -Show console  type="checkbox" id="show_console" value="1"
> onchange="toggle_console()" checked>
> +Show console  type="checkbox" id="show_console" value="1"" checked>
>  Start
>  
>  
ACK

--
Cedric

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH spice-gtk v2] Move src/keycodemapdb -> subprojects/keycodemapdb

2019-02-15 Thread Frediano Ziglio
From: Marc-André Lureau 

Follow meson build system conventions.

This will allow meson to handle it as a subproject.

Signed-off-by: Marc-André Lureau 
---
Changes since v1:
- rebase;
- support still Autoconf.
---
 .gitmodules   |  4 ++--
 meson.build   |  6 +-
 src/Makefile.am   | 20 ++--
 src/meson.build   |  2 --
 {src => subprojects}/keycodemapdb |  0
 5 files changed, 17 insertions(+), 15 deletions(-)
 rename {src => subprojects}/keycodemapdb (100%)

diff --git a/.gitmodules b/.gitmodules
index 6938cd0c..a7804e6f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,6 @@
 [submodule "spice-common"]
path = subprojects/spice-common
url = ../spice-common.git
-[submodule "src/keycodemapdb"]
-   path = src/keycodemapdb
+[submodule "subprojects/keycodemapdb"]
+   path = subprojects/keycodemapdb
url = https://gitlab.com/keycodemap/keycodemapdb.git
diff --git a/meson.build b/meson.build
index 1276fb95..9fa94fc4 100644
--- a/meson.build
+++ b/meson.build
@@ -38,12 +38,16 @@ spice_gtk_deps = []
 spice_acl_deps = []
 
 #
-# Spice common subproject
+# Set up subprojects
 #
 spice_common = subproject('spice-common', default_options : 
['generate-code=client'])
 
spice_gtk_config_data.merge_from(spice_common.get_variable('spice_common_config_data'))
 spice_glib_deps += spice_common.get_variable('spice_common_client_dep')
 
+subproject('keycodemapdb', required : false)
+keymapgen = files('subprojects/keycodemapdb/tools/keymap-gen')
+keymapcsv = files('subprojects/keycodemapdb/data/keymaps.csv')
+
 #
 # check for system headers
 #
diff --git a/src/Makefile.am b/src/Makefile.am
index a9617d47..cdc4d288 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -63,8 +63,8 @@ GTK_SYMBOLS_LDFLAGS = -export-symbols 
${srcdir}/spice-gtk-sym-file
 GTK_SYMBOLS_FILE = spice-gtk-sym-file
 endif
 
-KEYMAP_GEN = keycodemapdb/tools/keymap-gen
-KEYMAP_CSV = keycodemapdb/data/keymaps.csv
+KEYMAP_GEN = $(top_srcdir)/subprojects/keycodemapdb/tools/keymap-gen
+KEYMAP_CSV = $(top_srcdir)/subprojects/keycodemapdb/data/keymaps.csv
 
 SPICE_COMMON_CPPFLAGS =\
-DSPICE_COMPILATION \
@@ -471,28 +471,28 @@ spice-widget-enums.h: spice-widget.h
 
 
 vncdisplaykeymap.c: $(KEYMAPS)
-$(KEYMAPS): $(srcdir)/$(KEYMAP_GEN) $(srcdir)/$(KEYMAP_CSV)
+$(KEYMAPS): $(KEYMAP_GEN) $(KEYMAP_CSV)
 
 vncdisplaykeymap_xorgevdev2xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgevdev2xtkbd code-map $(srcdir)/$(KEYMAP_CSV) xorgevdev xtkbd > $@ || 
rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgevdev2xtkbd code-map $(KEYMAP_CSV) xorgevdev xtkbd > $@ || rm $@
 
 vncdisplaykeymap_xorgkbd2xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgkbd2xtkbd code-map $(srcdir)/$(KEYMAP_CSV) xorgkbd xtkbd > $@ || rm 
$@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgkbd2xtkbd code-map $(KEYMAP_CSV) xorgkbd xtkbd > $@ || rm $@
 
 vncdisplaykeymap_xorgxquartz2xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgxquartz2xtkbd code-map $(srcdir)/$(KEYMAP_CSV) xorgxquartz xtkbd > 
$@ || rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgxquartz2xtkbd code-map $(KEYMAP_CSV) xorgxquartz xtkbd > $@ || rm $@
 
 vncdisplaykeymap_xorgxwin2xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgxwin2xtkbd code-map $(srcdir)/$(KEYMAP_CSV) xorgxwin xtkbd > $@ || 
rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgxwin2xtkbd code-map $(KEYMAP_CSV) xorgxwin xtkbd > $@ || rm $@
 
 vncdisplaykeymap_osx2xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_osx2xtkbd code-map $(srcdir)/$(KEYMAP_CSV) osx xtkbd > $@ || rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_osx2xtkbd code-map $(KEYMAP_CSV) osx xtkbd > $@ || rm $@
 
 vncdisplaykeymap_win322xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_win322xtkbd code-map $(srcdir)/$(KEYMAP_CSV) win32 xtkbd > $@ || rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_win322xtkbd code-map $(KEYMAP_CSV) win32 xtkbd > $@ || rm $@
 
 vncdisplaykeymap_x112xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_x112xtkbd code-map $(srcdir)/$(KEYMAP_CSV) x11 xtkbd > $@ || rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_x112xtkbd code-map $(KEYMAP_CSV) x11 xtkbd > $@ || rm $@
 
 -include $(INTROSPECTION_MAKEFILE)
 
diff --git a/src/meson.build b/src/meson.build
index 92179553..5365f054 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ 

[Spice-devel] [PATCH spice-gtk] desktop-integration: Avoid empty private structure

2019-02-15 Thread Frediano Ziglio
This causes a critical warning as private structures should not
be empty.

Signed-off-by: Frediano Ziglio 
---
 src/desktop-integration.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/desktop-integration.c b/src/desktop-integration.c
index 8458efaa..6f569ae2 100644
--- a/src/desktop-integration.c
+++ b/src/desktop-integration.c
@@ -38,6 +38,9 @@ struct _SpiceDesktopIntegrationPrivate {
 #ifdef WITH_GNOME
 GDBusProxy *gnome_session_proxy;
 guint gnome_automount_inhibit_cookie;
+#else
+/* private structures cannot be empty in GLib */
+int dummy;
 #endif
 };
 
-- 
2.20.1

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Spice-devel] [PATCH spice-gtk v2] Move src/keycodemapdb -> subprojects/keycodemapdb

2019-02-15 Thread Frediano Ziglio
From: Marc-André Lureau 

Follow meson build system conventions.

This will allow meson to handle it as a subproject.

Signed-off-by: Marc-André Lureau 
---
Changes since v1:
- rebase;
- support still Autoconf.
---
 .gitmodules   |  4 ++--
 meson.build   |  6 +-
 src/Makefile.am   | 20 ++--
 src/meson.build   |  2 --
 {src => subprojects}/keycodemapdb |  0
 5 files changed, 17 insertions(+), 15 deletions(-)
 rename {src => subprojects}/keycodemapdb (100%)

diff --git a/.gitmodules b/.gitmodules
index 6938cd0c..a7804e6f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,6 @@
 [submodule "spice-common"]
path = subprojects/spice-common
url = ../spice-common.git
-[submodule "src/keycodemapdb"]
-   path = src/keycodemapdb
+[submodule "subprojects/keycodemapdb"]
+   path = subprojects/keycodemapdb
url = https://gitlab.com/keycodemap/keycodemapdb.git
diff --git a/meson.build b/meson.build
index 1276fb95..9fa94fc4 100644
--- a/meson.build
+++ b/meson.build
@@ -38,12 +38,16 @@ spice_gtk_deps = []
 spice_acl_deps = []
 
 #
-# Spice common subproject
+# Set up subprojects
 #
 spice_common = subproject('spice-common', default_options : 
['generate-code=client'])
 
spice_gtk_config_data.merge_from(spice_common.get_variable('spice_common_config_data'))
 spice_glib_deps += spice_common.get_variable('spice_common_client_dep')
 
+subproject('keycodemapdb', required : false)
+keymapgen = files('subprojects/keycodemapdb/tools/keymap-gen')
+keymapcsv = files('subprojects/keycodemapdb/data/keymaps.csv')
+
 #
 # check for system headers
 #
diff --git a/src/Makefile.am b/src/Makefile.am
index a9617d47..cdc4d288 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -63,8 +63,8 @@ GTK_SYMBOLS_LDFLAGS = -export-symbols 
${srcdir}/spice-gtk-sym-file
 GTK_SYMBOLS_FILE = spice-gtk-sym-file
 endif
 
-KEYMAP_GEN = keycodemapdb/tools/keymap-gen
-KEYMAP_CSV = keycodemapdb/data/keymaps.csv
+KEYMAP_GEN = $(top_srcdir)/subprojects/keycodemapdb/tools/keymap-gen
+KEYMAP_CSV = $(top_srcdir)/subprojects/keycodemapdb/data/keymaps.csv
 
 SPICE_COMMON_CPPFLAGS =\
-DSPICE_COMPILATION \
@@ -471,28 +471,28 @@ spice-widget-enums.h: spice-widget.h
 
 
 vncdisplaykeymap.c: $(KEYMAPS)
-$(KEYMAPS): $(srcdir)/$(KEYMAP_GEN) $(srcdir)/$(KEYMAP_CSV)
+$(KEYMAPS): $(KEYMAP_GEN) $(KEYMAP_CSV)
 
 vncdisplaykeymap_xorgevdev2xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgevdev2xtkbd code-map $(srcdir)/$(KEYMAP_CSV) xorgevdev xtkbd > $@ || 
rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgevdev2xtkbd code-map $(KEYMAP_CSV) xorgevdev xtkbd > $@ || rm $@
 
 vncdisplaykeymap_xorgkbd2xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgkbd2xtkbd code-map $(srcdir)/$(KEYMAP_CSV) xorgkbd xtkbd > $@ || rm 
$@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgkbd2xtkbd code-map $(KEYMAP_CSV) xorgkbd xtkbd > $@ || rm $@
 
 vncdisplaykeymap_xorgxquartz2xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgxquartz2xtkbd code-map $(srcdir)/$(KEYMAP_CSV) xorgxquartz xtkbd > 
$@ || rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgxquartz2xtkbd code-map $(KEYMAP_CSV) xorgxquartz xtkbd > $@ || rm $@
 
 vncdisplaykeymap_xorgxwin2xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgxwin2xtkbd code-map $(srcdir)/$(KEYMAP_CSV) xorgxwin xtkbd > $@ || 
rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_xorgxwin2xtkbd code-map $(KEYMAP_CSV) xorgxwin xtkbd > $@ || rm $@
 
 vncdisplaykeymap_osx2xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_osx2xtkbd code-map $(srcdir)/$(KEYMAP_CSV) osx xtkbd > $@ || rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_osx2xtkbd code-map $(KEYMAP_CSV) osx xtkbd > $@ || rm $@
 
 vncdisplaykeymap_win322xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_win322xtkbd code-map $(srcdir)/$(KEYMAP_CSV) win32 xtkbd > $@ || rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_win322xtkbd code-map $(KEYMAP_CSV) win32 xtkbd > $@ || rm $@
 
 vncdisplaykeymap_x112xtkbd.h:
-   $(AM_V_GEN)$(PYTHON) $(srcdir)/$(KEYMAP_GEN) --lang glib2 --varname 
keymap_x112xtkbd code-map $(srcdir)/$(KEYMAP_CSV) x11 xtkbd > $@ || rm $@
+   $(AM_V_GEN)$(PYTHON) $(KEYMAP_GEN) --lang glib2 --varname 
keymap_x112xtkbd code-map $(KEYMAP_CSV) x11 xtkbd > $@ || rm $@
 
 -include $(INTROSPECTION_MAKEFILE)
 
diff --git a/src/meson.build b/src/meson.build
index 92179553..5365f054 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ 

Re: [Spice-devel] [PATCH spice-html5 1/3] Generate package.json from the Makefile.

2019-02-15 Thread Cedric Bosdonnat
On Thu, 2019-02-14 at 12:55 -0600, Jeremy White wrote:
> Signed-off-by: Jeremy White 
> ---
>  .gitignore  |  1 +
>  Makefile| 30 +-
>  package.json => package.json.in |  2 +-
>  3 files changed, 23 insertions(+), 10 deletions(-)
>  rename package.json => package.json.in (95%)
> 
> diff --git a/.gitignore b/.gitignore
> index 33491a5..695d1d0 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -1 +1,2 @@
>  spice-html5.spec
> +package.json
> diff --git a/Makefile b/Makefile
> index add307f..161a14a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -26,23 +26,35 @@ endif
>  
>  source_for_rpm = $(HOME)/rpmbuild/SOURCES/spice-html5-
> $(version).tar.gz
>  
> -.PHONY: usage spice-html5.spec rpm tar gittar local git install
> +.PHONY: usage spice-html5.spec package.json rpm tar gittar local git
> install
>  
>  usage:
>   @echo "This project does not normally need to be built.  See
> the README."
>   @echo " "
> - @echo "This Makefile is mostly used for creating RPM packages,
> which you"
> - @echo "can do by invoking 'make local' to use the current
> working directory,"
> - @echo "or 'make git' to use the latest git HEAD."
> - @echo "You can specify an alternate source tarball like this:"
> - @echo "  make source=/my/alternate/source local"
> - @echo "You can specifcy a specific git tag like this:"
> - @echo "  make tag=my_specific_tag git"
> - @echo "Results generally go in ~/rpmbuild"
> + @echo "This Makefile is used for creating RPM packages and the
> package.json file used by npm."
> + @echo " "
> + @echo "Building an rpm: "
> + @echo "  Invoke 'make local' to make an rpm with the current
> working directory,"
> + @echo "  or 'make git' to make an rpm with the latest git
> HEAD."
> + @echo "  You can specify an alternate source tarball like
> this:"
> + @echo "make source=/my/alternate/source local"
> + @echo "  You can specify a specific git tag like this:"
> + @echo "make tag=my_specific_tag git"
> + @echo "  Results generally go in ~/rpmbuild"
> + @echo " "
> + @echo "Preparing for an npm publish:"
> + @echo "make package.json"
> + @echo "  where you can specify"
> + @echo "make tag=my_specific_tag package.json"
> + @echo "  to prepare a particular release."
> +
>  
>  spice-html5.spec:
>   sed -e "s/VERSION/$(version)/" < spice-html5.spec.in > spice-
> html5.spec
>  
> +package.json:
> + sed -e "s/VERSION/$(version)/" < package.json.in > package.json
> +
>  tar:
>   if [ "$(source)x" = "x" ] ; then \
>   tar -czf $(source_for_rpm) --exclude=.git --
> transform='s!^!spice-html5-$(version)/!' * ; \
> diff --git a/package.json b/package.json.in
> similarity index 95%
> rename from package.json
> rename to package.json.in
> index c77a0e8..ca56078 100644
> --- a/package.json
> +++ b/package.json.in
> @@ -1,6 +1,6 @@
>  {
>"name": "spice-html5",
> -  "version": "0.1.8",
> +  "version": "VERSION",
>"description": "Spice Javascript client",
>"main": "src/main.js",
>"scripts": {

ACK
--
Cedric

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk 08/12] meson: remove our own submodule update

2019-02-15 Thread Frediano Ziglio
> From: Marc-André Lureau 
> 
> Our own handling was limited, since it checked only spice-common.
> 
> This is handled by meson since v0.40 for subprojects.
> 
> Signed-off-by: Marc-André Lureau 
> ---
>  build-aux/meson/check-spice-common | 5 -
>  meson.build| 3 ---
>  2 files changed, 8 deletions(-)
>  delete mode 100755 build-aux/meson/check-spice-common
> 
> diff --git a/build-aux/meson/check-spice-common
> b/build-aux/meson/check-spice-common
> deleted file mode 100755
> index a0d03a6..000
> --- a/build-aux/meson/check-spice-common
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -#!/bin/sh
> -set -e
> -if git ls-files --error-unmatch
> ${MESON_SOURCE_ROOT}/subprojects/spice-common > /dev/null 2>&1; then
> -git --git-dir="${MESON_SOURCE_ROOT}/.git" submodule update --init
> --recursive
> -fi
> diff --git a/meson.build b/meson.build
> index 29d5fed..c5dc438 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -6,9 +6,6 @@ project('spice-gtk', 'c',
>   license : 'LGPLv2.1',
>   meson_version : '>= 0.49')
>  
> -message('Updating submodules')
> -run_command('build-aux/meson/check-spice-common', check : true)
> -
>  #
>  # global C defines
>  #

Without this patch Meson does not sync the submodules automatically.

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-gtk 03/12] meson: fix po generation

2019-02-15 Thread Frediano Ziglio
> Hi
> On Tue, Feb 12, 2019 at 12:35 PM Frediano Ziglio  wrote:
> >
> >
> > > From: Marc-André Lureau 
> > >
> > > Use glib preset (from meson v0.37) to catch all our translatable
> > > strings and use good default settings.
> > >

Comparing with Autoconf they catch a bit less strings,
I'll send them a patch.

There are also some differences like
  --copyright-holder=Copyright (C) 2010-2017 Red Hat, Inc.
  --package-version=0.36.33-8990-dirty
  --msgid-bugs-address=spice-devel@lists.freedesktop.org
First 2 seems to have no difference, third do not fill the
"Report-Msgid-Bugs-To" entry in the .po files.

> > > While at it, remove the needless directory argument.
> > >
> > > Signed-off-by: Marc-André Lureau 
> >
> > With or without this patch Meson seems to do nothing in the po/
> > directory, .gmo files are not generated.
> > I cannot see any warning in Meson output about i18n.
> >
> 
> For some reasons, meson doesn't build everything at build time by
> default, some things are delayed at install time (such as doc).
> 
> Try:
> ninja meson-spice-gtk-gmo
> 

In this case better

ninja meson-spice-gtk-update-po

> >
> > > ---
> > >  po/meson.build | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/po/meson.build b/po/meson.build
> > > index 60c27a7..fb3c395 100644
> > > --- a/po/meson.build
> > > +++ b/po/meson.build
> > > @@ -1,3 +1,3 @@
> > >  i18n = import('i18n')
> > >  i18n.gettext(meson.project_name(),
> > > - args : '--directory=@0@'.format(meson.source_root()))
> > > + preset : 'glib')

Acked-by: Frediano Ziglio 

Frediano
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH spice-html5 3/3] Hide the message console by default.

2019-02-15 Thread Cedric Bosdonnat
On Thu, 2019-02-14 at 12:55 -0600, Jeremy White wrote:
> Signed-off-by: Jeremy White 
> ---
>  spice.css  | 2 ++
>  spice.html | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/spice.css b/spice.css
> index 4c61cb3..968ba16 100644
> --- a/spice.css
> +++ b/spice.css
> @@ -103,6 +103,8 @@ body
>  -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
>  -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
>  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
> +/* We default the message box to hidden. */
> +display: none;
>  }
>  .spice-message p {
>  margin-bottom: 0em;
> diff --git a/spice.html b/spice.html
> index d744ef9..177cfc2 100644
> --- a/spice.html
> +++ b/spice.html
> @@ -176,7 +176,7 @@
>  Host:  id='host' value='localhost'> 
>  Port:  id='port' value='5959'>
>  Password:  type='password' id='password' value=''>
> -Show console  type="checkbox" id="show_console" value="1"" checked>
> +Show console  type="checkbox" id="show_console" value="1"">
>  Start
>  
>  
ACK

--
Cedric

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] Why does spice server keep sending streaming data while video is not being played?

2019-02-15 Thread 陈炤

Thanks for your answer! I changed to another player and the issus was gone.






At 2019-02-14 17:44:46, "Uri Lublin"  wrote:
>On 2/14/19 4:40 AM, 陈炤 wrote:
>> Hi,
>> 
>> My spice server is 0.14.1 and gtk is master in the repository.
>> 
>> I was testing video stream. I set video-streaming to "filter" and played 
>> a .mp4 file. The CPU usage of the gtk is about 180%. When I pause the 
>> video, theoretically the stream should be destroyed and no data sould be 
>> sent, but the server still sending streaming data, and the gtk CPU usage 
>> was still 180%.
>> 
>> I added log to spice server and found video_stream_maintenance was 
>> always called to attach drawable to stream, then sent to the client.
>> 
>> Is that a bug? Souldn't the server destroy the stream when the video is 
>> paused so there is no data to be sent?
>> 
>Hi,
>
>Likely, even when the video is paused, the guest keeps sending
>images to spice-server (probably the same one).
>
>What application is used to play the mp4 file ?
>Can you try to play with a different application ?
>Try for example playing a movie on youtube.
>
>Uri.
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] Why does spice server keep sending streaming data while video is not being played?

2019-02-15 Thread 陈炤


Yes, my player cause this. I changed my player to another one and the issue was 
gone. Thanks a lot!




At 2019-02-14 17:36:26, "Frediano Ziglio"  wrote:



Hi,


My spice server is 0.14.1 and gtk is master in the repository.


I was testing video stream. I set video-streaming to "filter" and played a .mp4 
file. The CPU usage of the gtk is about 180%. When I pause the video, 
theoretically the stream should be destroyed and no data sould be sent, but the 
server still sending streaming data, and the gtk CPU usage was still 180%.


I added log to spice server and found video_stream_maintenance was always 
called to attach drawable to stream, then sent to the client.


Is that a bug? Souuldn't the server destroy the stream when the video is paused 
so there is no data to be sent?
Probably of your player that keeps drawing the last frame, spice-server don't 
craft frames, video_stream_maintainance is called when new frames arrive.

BR,
Don
Frediano___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel