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

Ulion ulion2002 at gmail.com
Thu Dec 13 13:51:17 CET 2007


2007/12/12, Ulion <ulion2002 at gmail.com>:
> 2007/12/11, Ulion <ulion2002 at gmail.com>:
> > 2007/12/11, Ulion <ulion2002 at gmail.com>:
> > > 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?
> >
> > By now I keep the property named 'chapter', it make me feel better.
> > About what you said in the menu directly use chapter property, using
> > property is a little complex than directly use the seek_chapter
> > command, so I keep to use the command.
> >
> > Here's the updated patches:
> > demuxer: add a functiond demuxer_chapter_time to get chapter start and
> > end time if available. And a little chapter name format adjust.
> > property & command: property chapter use same cmd id with command
> > seek_chapter and handle all requests to command seek_chapter, old
> > command handler for MP_CMD_SEEK_CHAPTER removed.
> > libmenu: add a keybinding entry for chapsel in menu.conf. support
> > display start time info in chapter menu and little custom format
> > supported.
>
> If there's no objection, I will apply the demuxer functions patch
> tomorrow, the chapter property patch and the libmenu chapter patch in
> 2 days.
>
> Here's lastest libmenu patch updated because of svn updates.
>
> It's possible get chapter start time from dvd or dvdnav, but it need
> do some more work with current api and it's a little low performance,
> then may implement it in the future.

demuxer chapter functions commited, tomorrow I will apply chapter
property patch and

-- 
Ulion



More information about the MPlayer-dev-eng mailing list