[MPlayer-G2-dev] core API - was G2 CLI/GUI
Balatoni Denes
pnis at coder.hu
Mon May 12 22:15:56 CEST 2003
Hi!
> > Hi!
> >
> > I hope this isn't a stupid question, but why would there be a config
> > parser/playtree code in mplayer-g2 ? Or that is part of the reference-ui
> > ?
>
> you have to define the options in the filters, ao/vo plugins, demuxers,
> so the external (G)UI will know what kind of parameters and how it can pass
> to the layers.
>
> in g2 core it only means a struct definition and such struct filled with
> data inside the modules/plugins.
That sounds good indeed.
To summarize (for myself at least) all plugins should have functions like this
(perhaps trough control() fn or just function pointers or whatever you are
thinking):
parameters * get_available_parameters_and_their_defaults()
instance* new_plugin_instance(parameters*)
int put_parameters_and_reinit_(instance*, parameters*)
int message_to_plugin(instance*, int message id, void * parameters)
int do_stuff_the_plugin_is_for(instance* )
+functions specific to plugin type
----------------------------------
And g2 core would have functions roughly like this:
mplayer_init()
plugin** get_available_plugins_and_parameters()
/*** stuff for playback ***/
/* returns title, author, length, suggested demuxer, audio/video codec +
parameters, suggested vo ao, filterchains */
info* mplayer_get_info_about_medium(URL)
/* URL, demuxer wanted , different filterchainf + filter's parameters, vo ao
*/
medium* mplayer_open_medium(info * )
/* decode to selected ao+vo with the options set*/
int mplayer_decode_n_frames(medium* , frame number)
/* some usefull functions needed during playback by an ui */
int mplayer_seek(medium*)
int mplayer_get_playback_status(medium*) /* time,pos etc */
int mplayer_send_message(plugin*, messageid, msg_parameter*) /* if ui eg.
wants to put something on the OSD, or move the subtitle down */
/*** stuff for customizing info structure ***/
/* manipulate (append, insert, remove, check, set filter/options)
audio/video/osd/whatever filterchain or separate plugin(if not in any chain)
for an opened medium */
mplayer_fuck_with_filterchain(info * , chain_id )
mplayer_fuck_with_plugin(info *, A_PLUGIN_THAT_IS_NOT_IN_ANY_CHAIN)
Is this what you have in mind roughly? I am curios what the plans are for
the toplevel API of the core, if it is already known to some degree.
> the rest is UI problem, but it would be nice to have a cfg parser in the
> core, usable by all UIs.
you are right, a helper library would be usefull (a'la libxmms in some way)
> A'rpi / Astral & ESP-team
best regards
Denes
More information about the MPlayer-G2-dev
mailing list