[vlc-devel] [PATCH 1/4] mmdevice: be informative about device state changes

Thomas Guillem thomas at gllm.fr
Wed May 25 09:08:35 CEST 2016



On Tue, May 24, 2016, at 18:59, Rémi Denis-Courmont wrote:
> On Monday 23 May 2016 09:39:22 Thomas Guillem wrote:
> > From: Sean McGovern <gseanmcg at gmail.com>
> > 
> > Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> > ---
> >  modules/audio_output/mmdevice.c | 20 ++++++++++++++++++--
> >  1 file changed, 18 insertions(+), 2 deletions(-)
> > 
> > diff --git a/modules/audio_output/mmdevice.c
> > b/modules/audio_output/mmdevice.c index 286bc9d..a58b7dc 100644
> > --- a/modules/audio_output/mmdevice.c
> > +++ b/modules/audio_output/mmdevice.c
> > @@ -613,8 +613,24 @@
> > vlc_MMNotificationClient_OnDeviceStateChanged(IMMNotificationClient *this,
> > aout_sys_t *sys = vlc_MMNotificationClient_sys(this);
> >      audio_output_t *aout = sys->aout;
> > 
> > -    /* TODO: show device state / ignore missing devices */
> > -    msg_Dbg(aout, "device %ls state changed %08lx", wid, state);
> > +    switch (state) {
> > +        case DEVICE_STATE_UNPLUGGED:
> > +            msg_Warn(aout, "device %ls was unplugged", wid);
> 
> Dbg and no verbs.

ok

> 
> > +            break;
> > +        case DEVICE_STATE_ACTIVE:
> > +            msg_Warn(aout, "device %ls became active", wid);
> > +            break;
> > +        case DEVICE_STATE_DISABLED:
> > +            msg_Warn(aout, "device %ls was disabled", wid);
> > +            break;
> > +        case DEVICE_STATE_NOTPRESENT:
> > +            msg_Warn(aout, "device %ls is not present anymore", wid);
> > +            break;
> > +        default:
> > +            msg_Warn(aout, "device %ls: unknown state %08lx", wid, state);
> > +            break;
> > +    }
> > +
> >      return S_OK;
> >  }
> 
> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list