[MPlayer-dev-eng] [PATCH] libmenu subtitles selector

Alban Bedel albeu at free.fr
Wed May 9 01:17:01 CEST 2007


On Tue, 08 May 2007 23:35:36 +0200
Benjamin Zores <ben at geexbox.org> wrote:

> Alban Bedel a écrit :
> 
> > The basic idea (having a/v/sid selection) is fine, but to be honest it's
> > exactly the kind of implementation i wanted to avoid from the start.
> > It's too tied to the internal of the current track selection, partialy
> > duplicating code wich as Nico said is very messy.
> 
> I know but we (at GeeXboX) use libmenu OSD as the whole GUI for the 
> system and these feature needed to be provided by some way.
> Though, as you can see in the patch, there's no generic way to implement 
> the features (i mean we have code specific to mkv, to ogg, to dvd ...) 
> which isn't really nice but it was the only way to do (this code is more 
> than 3 years old but has been ported over time ...).
> Now with MPContext, things might change a bit.

It definitly changed quiet a lot with the property API. As you know
it is already possible to select a/v/s tracks from the menu. And w/o
using any specific code, just the property API in a generic way.
The only missing thing is a way to get all possible values of a property
at once. Then a simple generic track description can be used for all
a/v/s and a single menu is needed.

> > It so happend i was recently reviving an old patch of mine (audio
> > visualisation with goom :) and it got me back again in hacking
> > mplayer.
> 
> Have some code to share on that ?

Sure, i plan to post a RFC patch this week. Basicaly it is just a demuxer
(implemented outside of libmpdemux) using another demuxer as input and
outputing the decoded audio as both audio and video. The visuals is then
just a codec like any other.

> > One idea i had would be to allow menu generated from script and/or
> > loaded at runtime. Thus allowing frontends to do things like
> > autodetecting what media is in a drive (cdda, vcd, dvd, etc) and
> > then showing the right menu. Currently just an idea but i think
> > it might be worth exploring.
> 
> Aurel and myself started working on such a thing a long time ago (years)
> but it wasn't the best technical solution. It'll result in bloating even 
> more libmenu that it currently is.

The biggest pb imho would be to do it in a portable way. However just
allowing to load new menu definitions at run-time should be trivial.
Now if that would be really that useful is another question.

> > Another thing i had in mind was to perhaps add a basic mouse support.
> 
> That however might be interesting, maybe not that hard to do either, 
> considering that each menu item has a box. You just need to calculate if 
> the mise position belongs to one of these boxes (dvdnav already has 
> support for mouse movement iirc).

Yep, i'm planning on using the dvdnav commands. However, on a slightly
off topic note, this again make libvo dependent on libinput wich i have
always been against. The real solution would be to change the libvo API
a bit to use some event struct instead of just keycodes.

> > Currently i'm working on the metadata stuff wich is imho too limited.
> > What i'd like is a nice integration with the rest of the properties
> > API. I did a quick hack last night but it still need some work.
> 
> Please send even a rough patch when possible.

I expect to have something ready tomorrow.

> > Track selection shouldn't be a problem thanks to the recent work that
> > went in cleaning the player core. However chapter (and stream stuff
> > in general) is probably still not easy. The biggest obstacle is the
> > cache which make it near to impossible to reliably use control on the
> > stream at run time. There are solutions but they are either, hard to
> > implement in a nice and portable way (IPC), or are going to be hard to
> > get accepted by everybody (using threads for the cache).
> 
> What does cache has to do with that ?
> As long as the movie is started you have access to all of its 
> chapter/sid/aid/track/... info.

The cache use a fork, this mean the controls don't end-up at the stream
that is actually reading. So to just read stuff that is computed when
the stream is opened that's ok, but anything more advanced just can't
work.

	Albeu




More information about the MPlayer-dev-eng mailing list