Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH] vo and ao "exit" devices




> > > Someone mentioned that they wanted mplayer to exit if it failed to open their
> > > audio device, rather than continuing with no audio.  These (trivial but
> > > harmless) output devices allow this to happen by putting them at the end of
> > > the output chain (e.g., "-ao alsa,pulse,exit").  Apparently someone else
> > > suggested this approach as well, a while ago.  I will readily admit that this
> > > is silly, but it works.  I have no particular attachment to name, description,
> > > or approach.
> >
> > It seems slightly risky to me to call exit_player for an init function.
> > It tends to rely on some state that might not be set up correctly at
> > that point for example.
> > Also it will not exit if the AO is fine, but e.g. we cannot actually
> > connect to it since it doesn't support any format we can convert to
> > for example.
> > It might work better adding the code to reinit_audio_chain, in the
> > init_error label?
> > For video, the equivalent would be reinit_video_chain, and it behaves
> > quite similar.
> 
> Sorry, should have said: both these functions are in mplayer.c

I was just going based on the existing "alsa9" exit_player call in
init_best_audio_out (and similarly if init_audio_filters fails), but I don't
really know it works.  To do it at the end of reinit_*_chain it looks like
this would need to be a separate command line option, "-ensure-audio" or
something, rather than an output device.  Happy to do that instead if that's
preferable.
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng