[MPlayer-dev-eng] [PATCH] rff - demux_control patch v1.1

Arpi arpi at thot.banki.hu
Sun Nov 10 11:23:51 CET 2002


Hi,

> +    switch(cmd) {
> +	case DEMUXER_CTRL_GET_PERCENT_LENGTH:
> +	    *((unsigned long *)arg)=100;
> +	    return DEMUXER_CTRL_OK;

i still no see any sense of this

> +	case DEMUXER_CTRL_GET_PERCENT_POS:
> +	    if (demuxer->movi_end==demuxer->movi_start) {
> +		*((unsigned long *)arg)=0; 
> +		return DEMUXER_CTRL_DONTKNOW;
why to set it if dontknow?

> +	    }
> +    	    else *((int *)arg)=(int)(demuxer->filepos/((demuxer
why 'else' ?

>          if(!sh_video->i_bps) // unspecified or VBR
> -          newpos+=2324*75*rel_seek_secs; // 174.3 kbyte/sec
> +          newpos+=2324*20*rel_seek_secs; // 46.4 kbyte/sec

WHY ???

the std. vcd/svcd rate is 75 sectors/sec (2324*75 bytes/sec)

> +	case DEMUXER_CTRL_GET_PERCENT_POS:
> +	    if (demuxer->movi_end==demuxer->movi_start) *((int *)arg)=0;

why not _DONTKNOW ?

> +    	    else *((int *)arg)=(int)(demuxer->filepos/((demuxer
> ->movi_end-demuxer->movi_start)/100));	    
> +	    return DEMUXER_CTRL_OK;

> -    picture->bitrate = (buffer[4]<<10)|(buffer[5]<<2)|(buffer[6]>>6);
> +    picture->bitrate = ((buffer[4]&0x7f)<<10)|(buffer[5]<<2)|(buffer[6]>>6);
hmm


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list