[MPlayer-dev-eng] Chapter selection via libmenu
Alban Bedel
albeu at free.fr
Mon Dec 10 12:22:02 CET 2007
On Mon, 10 Dec 2007 11:06:23 +0100
Nico Sabbi <Nicola.Sabbi at poste.it> wrote:
> Il Monday 10 December 2007 11:03:50 Nico Sabbi ha scritto:
> > Il Monday 10 December 2007 10:56:35 Benjamin Zores ha scritto:
> > > On Dec 10, 2007 10:54 AM, Nico Sabbi <Nicola.Sabbi at poste.it>
> wrote:
> > > > unacceptable, rejected
> > >
> > > reason being ?
> > > that would help at lot fixing the patch i guess.
> >
> > dereferencing stream_priv and making the code stream-specific
> > is the recipe for very bad coding and for hitting on problems
> > in the future.
> > Chapters are handled at the demuxer layer (with the aid of the
> > stream layer) so use the DEMUXER_CTRL functions available or add
> > some if the existing ones are not sufficient
>
> as a general rule:
> - modular coding
> - *never* resort to shortcuts
> - don't touch structures that don't belong to you
I agree and I like to stress that code specific to a particular
demuxer/stream/whatever will NEVER be accepted in libmenu. There are
part of mplayer where such hacks are (sadly) tolerated, but libmenu is
not one of them. If there is no clean public API doing what is needed
then it must be written first.
Albeu
More information about the MPlayer-dev-eng
mailing list