Re: [spice-protocol PATCH] add volume syncronizatin to protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey,

On Wed, Mar 18, 2015 at 01:33:16PM -0400, Marc-André Lureau wrote:
>
>
> ----- Original Message -----
> > ---
> >  spice/vd_agent.h | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >
> > diff --git a/spice/vd_agent.h b/spice/vd_agent.h
> > index 7464661..1747735 100644
> > --- a/spice/vd_agent.h
> > +++ b/spice/vd_agent.h
> > @@ -77,6 +77,7 @@ enum {
> >      VD_AGENT_FILE_XFER_DATA,
> >      VD_AGENT_CLIENT_DISCONNECTED,
> >      VD_AGENT_MAX_CLIPBOARD,
> > +    VD_AGENT_AUDIO_VOLUME_SYNC,
> >      VD_AGENT_END_MESSAGE,
> >  };
> >
> > @@ -207,6 +208,18 @@ typedef struct SPICE_ATTR_PACKED VDAgentMaxClipboard {
> >  } VDAgentMaxClipboard;
> >
> >  enum {
> > +    VD_AGENT_AUDIO_VOLUME_SYNC_FLAG_IS_PLAYBACK = (1 << 0),
> > +    VD_AGENT_AUDIO_VOLUME_SYNC_FLAG_IS_RECORD = (1 << 1),
> > +    VD_AGENT_AUDIO_VOLUME_SYNC_FLAG_IS_MUTE = (1 << 2),
> > +};
>
> That looks reasonable. I am not so fond of flags :) It's not like sending this struct all the time. mute could be a seperate bool, and playback/record are mutually exclusive anyway.
>
> Further extension of the protocol can be added by extending the struct.
>
> But flags are quite fine too here.

My thought was with the size of the struct but as you said, the client
does not send this all the time.

I'll change it to `bool is_playback` and `bool is_mute` (and send with
v3 of spice-gtk patches)

> > +
> > +typedef struct SPICE_ATTR_PACKED VDAgentAudioVolumeSync {
> > +    uint8_t flags;
> > +    uint8_t nchannels;
> > +    uint16_t volume[0];
> > +} VDAgentAudioVolumeSync;
> > +
> > +enum {
> >      VD_AGENT_CAP_MOUSE_STATE = 0,
> >      VD_AGENT_CAP_MONITORS_CONFIG,
> >      VD_AGENT_CAP_REPLY,
> > @@ -218,6 +231,7 @@ enum {
> >      VD_AGENT_CAP_GUEST_LINEEND_LF,
> >      VD_AGENT_CAP_GUEST_LINEEND_CRLF,
> >      VD_AGENT_CAP_MAX_CLIPBOARD,
> > +    VD_AGENT_CAP_AUDIO_VOLUME_SYNC,
> >      VD_AGENT_END_CAP,
> >  };
> >  
> > --
> > 2.1.0
> > 
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
> > 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]