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

Balatoni Denes pnis at coder.hu
Sun Nov 10 12:40:39 CET 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

> 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
Well, not too much in deed :)



> > +	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?
I will remove that.


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

> >          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)
Ok, than this too. 



> > +	case DEMUXER_CTRL_GET_PERCENT_POS:
> > +	    if (demuxer->movi_end==demuxer->movi_start) *((int *)arg)=0;
>
> why not _DONTKNOW ?
I will change this.

> > +    	    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
This is from xine's mpg_demux. I don't know why it is done that way. Not good?

bye
Denes



- -- 
"Use the source Luke !"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9zkW3aQToeq3jgogRApo7AJsHxubaixHY/VZNRhdP0GLyLy3VBQCeIuTS
15A9o4K/pcpmU1o5mQE/5+o=
=Iq4M
-----END PGP SIGNATURE-----



More information about the MPlayer-dev-eng mailing list