[MPlayer-dev-eng] [PATCH] detecting audio cd

Arpi arpi at thot.banki.hu
Tue Oct 22 17:21:56 CEST 2002


Hi,

> -I'm vorking on vcd and while making some test i found something funny :
> have you already tried vcd with an audio cd on tray ??? mplayer scan for
> tracks, all right, and start reading audio data...

and why is it a problem?
it could even play the audio cd with -vcd <track> and forcing the raw audio
demuxer. (but cdda:// is better - but available only if there is
libcdparanoia)

> +
> +#if	defined(linux)
> +#include <linux/cdrom.h>
> +#elif	defined(sun)
> +#include <sys/cdio.h>
> +#elif	defined(__bsdi__)
> +#include <dvd.h>
> +#endif

this seem sto be messy, there are detection of rthese includes in ./configure
also, there are platforms with no VCD support at all.
i feel so many possible portability issues here.

> +  // check if media in cdrom could be a vcd ( != no media, audio... )
> +  {
> +		int media_type = CDS_NO_INFO;
> +		switch( ( media_type = ioctl(f, CDROM_DISC_STATUS) ) )
> +		{
> +			case CDS_NO_INFO :
> +				mp_msg(MSGT_OPEN,MSGL_WARN,"VCD : cannot get media type info\n");
> +				break;

and what is if i create vcd with cdrecord, wihtout specifying any special
media type? imho it'll be either no_info or data.

also, are you sure these CDS_xxx defines exists on all platforms?

again, i see no reason (advantage) of having such check.


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