[MPlayer-users] Feature request
Arpi
arpi at thot.banki.hu
Sun Nov 3 23:34:01 CET 2002
Hi,
> Would that mean to add a movieposition member to
> demux_t, and make the demuxers update this ?
not really, but it would still much better than the hacks you and the others
posted.
i meant (and will do once) is a control() function to the demuxer API (yes
no real demuxer API yet - this is the main problem) which can be used
similar way to ioctl()'s, to set/get various parameters, status etc from teh
demuers, like
- movie length (in bytes and/or time)
- current movie position (in bytes and/or time)
- whatever info you need
so if it's not implemented in a demuxer - you'll get NOTIMPL as answer,
instead of bad/uninitialized/zero value.
as for now, if you can't wait, then define this function in yoru favourite
demuxers:
int demux_XXX_control(demuxer_t *demux, int cmd, void* arg){
switch(cmd){
case DEMUXER_CTRL_GET_TIMEPOS:
*((float*)arg) = .... ;
return DEMUXER_CTRL_OK;
...
}
return DEMUXER_CTRL_NOTIMPL;
}
and add a common
int demux_control(demuxer_t *demux, int cmd, void* arg){
switch(demux->type){
case DEMUXER_TYPE_AVI:
return demux_avi_control(demux,cmd,arg);
...
}
return DEMUXER_CTRL_NOTIMPL;
}
to demuxer.c|h
then it's ok to call this func to print various info, via a more-or-less
generic slave-mode command, like:
demuxinfo timepos - print position in time or 'UNKNOWN'
demuxinfo timelength - print length of movie or 'UNKNOWN'
i can accept such patch, but never partially working hacks
A'rpi / Astral & ESP-team
--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
More information about the MPlayer-users
mailing list