mirror of
https://github.com/mpv-player/mpv
synced 2024-12-18 12:55:16 +00:00
Provide DEMUXER_CTRL_GET_TIME_LENGTH and DEMUXER_CTRL_GET_PERCENT_POS.
Might need some more fine-tuning. together with rev. 1.318 of mencoder.c fixes bug #116 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16877 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
5ecff936b4
commit
9e15dfe7fc
@ -107,6 +107,19 @@ static void demux_close_demuxers(demuxer_t* demuxer) {
|
||||
}
|
||||
|
||||
|
||||
static int demux_demuxers_control(demuxer_t *demuxer,int cmd, void *arg){
|
||||
dd_priv_t* priv = demuxer->priv;
|
||||
switch (cmd) {
|
||||
case DEMUXER_CTRL_GET_TIME_LENGTH:
|
||||
*((double *)arg) = demuxer_get_time_length(priv->vd);
|
||||
return DEMUXER_CTRL_OK;
|
||||
case DEMUXER_CTRL_GET_PERCENT_POS:
|
||||
*((int *)arg) = demuxer_get_percent_pos(priv->vd);
|
||||
return DEMUXER_CTRL_OK;
|
||||
}
|
||||
return DEMUXER_CTRL_NOTIMPL;
|
||||
}
|
||||
|
||||
demuxer_desc_t demuxer_desc_demuxers = {
|
||||
"Demuxers demuxer",
|
||||
"", // Not selectable
|
||||
@ -120,5 +133,5 @@ demuxer_desc_t demuxer_desc_demuxers = {
|
||||
NULL,
|
||||
demux_close_demuxers,
|
||||
demux_demuxers_seek,
|
||||
NULL
|
||||
demux_demuxers_control
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user