[MPlayer-dev-eng] [PATCH] cddb://
Frederick Bruckman
fredb at immanent.net
Wed Jan 15 16:54:42 CET 2003
On Wed, 15 Jan 2003, Bertrand Baudet wrote:
> mplayer cdda:// ?
> or
> mplayer -cdda:generic-dev /dev/mycdrom cdda:// ?
>
> By removing the lines:
>
> +#if defined(__NetBSD__)
> + generic_dev = dev;
> +#endif
>
> You should be able to play a CD audio by using:
>
> mplayer -cdrom-device /dev/mycdrom cdda://
I have /dev/cdrom a symlink to "/dev/rcd0d". Without my patch, this
works:
mplayer -cache 2048 -cdda generic-dev=/dev/rcd0d cdda://
but it seems wierd to me to have to do that. Without "generic-dev":
# mplayer -cache 2048 cdda://
MPlayer CVS-030109-21:04-2.95.3 (C) 2000-2003 Arpad Gereoffy (see
DOCS)
CPU: Advanced Micro Devices K6-2 (Family: 5, Stepping: 12)
Detected cache-line size is 32 bytes
CPUflags: MMX: 1 MMX2: 0 3DNow: 1 3DNow2: 0 SSE: 0 SSE2: 0
Compiled for x86 CPU with extensions: MMX 3DNow
Reading config file /usr/local/etc/mplayer/mplayer.conf: No such file
or directory
Reading config file /u/fredb/.mplayer/config
Reading /u/fredb/.mplayer/codecs.conf: 49 audio & 129 video codecs
Font /u/fredb/.mplayer/font/font.desc loaded successfully! (206 chars)
Using usleep() timing
Input config file /u/fredb/.mplayer/input.conf parsed : 50 binds
Playing cdda://
Can't open cdda device
Exiting... (End of file)
> I don't really understand why you need to do a
>
> generic_dev = dev;
Here's the commit message from ITOH Yasufumi's NetBSD port of
cdparanoia:
An attempt to port cdparanoia-III-alpha9.7.
CD-DA extraction tool with excessive data corrections,
such as jitter, loss of data, etc.
This will soon be obsoleted by cdparanoia IV, I hope....
Most SCSI/ATAPI CD-ROM drives should work fine.
However, the ATAPI stuff is totally untested, and
if it happened to work, it was a miracle. :-)
Currently,
- the feature to search for CD-ROM device is not
implemented and the -g option is required,
- the libraries are not installed.
The package is at alpha9.8 now, and the libraries are installed, but
the part about generic_dev hasn't changed. For the "cdparanoia"
program, "-g" isn't required, but that's because generic_dev is
calculated and filled in on NetBSD, similarly to the patches I
submitted; cdda_identify() doesn't work. Actually, what he does is
calculate the raw device of the first CDROM to be the first argument
to cdda_identify_scsi(), which on i386 is "/dev/rcd0d", but I don't
know if that's such a good idea, as I'm not sure then what happens if
the second argument is "/dev/rcd1d". (I don't have two CDROM drives.)
On second thought, I think we should allow the user to override
generic_dev, in case he has a reason to. (Patch attached.)
Frederick
-------------- next part --------------
Index: libmpdemux/cdda.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/cdda.c,v
retrieving revision 1.7
diff -u -r1.7 cdda.c
--- libmpdemux/cdda.c 28 Dec 2002 14:04:54 -0000 1.7
+++ libmpdemux/cdda.c 15 Jan 2003 15:46:23 -0000
@@ -12,11 +12,7 @@
static int speed = -1;
static int paranoia_mode = 1;
-#if defined(__NetBSD__)
-static char* generic_dev = "/dev/cdrom";
-#else
static char* generic_dev = NULL;
-#endif
static int sector_size = 0;
static int search_overlap = -1;
static int toc_bias = 0;
@@ -72,7 +68,11 @@
if(generic_dev)
cdd = cdda_identify_scsi(generic_dev,dev,0,NULL);
else
+#if defined(__NetBSD__)
+ cdd = cdda_identify_scsi(dev,dev,0,NULL);
+#else
cdd = cdda_identify(dev,0,NULL);
+#endif
if(!cdd) {
mp_msg(MSGT_OPEN,MSGL_ERR,"Can't open cdda device\n");
More information about the MPlayer-dev-eng
mailing list