[MPlayer-dev-eng] [PATCH] Chapter support improvement

Ulion ulion2002 at gmail.com
Tue Dec 11 03:06:46 CET 2007


2007/12/11, Alban Bedel <albeu at free.fr>:
> On Mon, 10 Dec 2007 21:35:55 +0800
> Ulion <ulion2002 at gmail.com> wrote:
>
> > > > +chapter [N]
> > > > +    Seek to specific chapter. Here [N] is an integer.
> > > > +    If [N] is 0, will seek forward to next chapter (default).
> > > > +    If [N] larger than 0, seek to the [N]th chapter.
> > >
> > > Is this really usefull? There is already the seek_chapter command.
> > > If you just want an alias then use the same cmd id (and parameters
> > > evidently).
> >
> > Oh, I thought a property must have a command, that's not true, then I
> > will remove the chapter command. But the property still need a MP_CMD
> > id, should I use a new one MP_CMD_CHAPTER in current patch, or use the
> > existed one?
>
> No, properties don't need commands, they can be manipulated directly.
> However in most case commands are needed for the user interface to also
> display the new status on OSD for ex. But here there is already a
> command that is doing just what the new property do. So just bind
> MP_CMD_SEEK_CHAPTER to the chapter property.
>
> BTW in the menu you could directly use the property instead of going
> through the command.

That's very useful info for me. I just found the command2property can
be non-toogle then just operated as the old command 'seek_chapter'.
Then the old command handler for MP_CMD_SEEK_CHAPTER can be removed
now. but what should I name the chapter property, 'seek_chapter' or
'chapter', any idea?


-- 
Ulion



More information about the MPlayer-dev-eng mailing list