[MPlayer-dev-eng] cue file patch

Arpi arpi at thot.banki.hu
Mon Dec 23 02:14:51 CET 2002


Hi,

> I'm new to this list, so I don't know if its the right way, anyway a friend 
> (Justus Schwartz <hekacyr at web dot de> ) and I mad a patch for mplayer 
> which enables it to playe cue/bin files. I know that mplayer can already play 
> bin files, but the stuff with -sb 100000 isn't cool ;-)
> 
> with our patch its possible to use cue/bin just like (s)vcd's.  the 
> commandline looks like this:
> 
> mplayer -vcd 2 -cuefile tcf-tuxb.cue
> 
> which will play the second track

nice work. anyway i have some problems with the patch.
now it's arch dependant, which is bad. reading a file should be possible on
every arch, and there is no reason to depend on any OS cdrom headers.

you could (and should) define your own struct to keep the per-track data,
instead of using linux's struct cdrom_tocentry.
this way your patch could work even on systems with no VCD support by OS at
all. also, the bin/cue support code should be out of #ifdef HAVE_VCD,
using its own streamtype.

the other approach is combining your code with the current VCD code.
in this approach, there shouldn't be a separate vcd_read_bincue.h with full
vcd functions duplicate/emulation, but the vcd_read.h patched to check for
cuefile available and use it instead of doing ioctl()'s on the device.
also, use normal read() instead of special ioctl() to read the sectors.
you shouldn't define new streamtype, but use the VCD one.
it results simplified code, but limited to the archs supported by vcd_read.h
(linux, sun & bsdi only).

i prefer the former approach. what do you think?


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