[MPlayer-dev-eng] Chapter selection via libmenu

Andrew Calkin calkina at geexbox.org
Tue Dec 11 04:22:11 CET 2007


2007/12/10, Alban Bedel <albeu at free.fr>:
> 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.

Ok, thanks for the clarification Nico/Alban. I will keep that in mind
for future libmenu patches. I will use Ulion's improved approach as a
good lesson on how to approach the problem.

//Andrew



More information about the MPlayer-dev-eng mailing list