libcdio-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-help] Some questions about the use of libcdio in a FUSE fs.


From: Rocky Bernstein
Subject: Re: [Libcdio-help] Some questions about the use of libcdio in a FUSE fs.
Date: Sun, 14 Aug 2011 15:56:13 -0400

On Fri, Aug 12, 2011 at 9:45 AM, Stef Bon <address@hidden> wrote:
Hi,

I've written a FUSE fs to read tracks on a cd, using licdio. I used to
work with cd-paranoia, till I've found libcdio.

More info about it you'll find here:

http://linux.bononline.nl/wiki/index.php/Fuse-cdfs

Basically in this fs there is one read to read the cdrom, and it
processes read requests (from the fuse fs read call) in a queue, and
calls

cdio_cddap_read()

to read the requested sectors.

Maybe you should try it.

(as you can read I'm not ready with it, but it works ) 
 
I just tried compiling from git sources.  I get 
    make: *** No rule to make target `cdfs-io-thread.h', needed by `cdfs.o'.  Stop.

And there is no C header file cdfs-io-thread.h. Perhaps you meant to add this to the git repository? (As I write this there is only one initial commit to the git repository.)

As far a the C coding style and organization, the code looks good!

Now I have some questions:

a. is there a way to identify the cd uniquely.
Right now it stores
cached files in

%cache_directory%/tracknr-xx.wav

Now when I unmount, I ant to be able to keep the cached file. I would
like to have an unique id per readable cdrom, like an uuid per
partition on a harddisk. Is there one?

A CD can have a ISRC also known as a MCN  (Media Catalog Number). In practice many CDs do not have this. If I wanted to ensure uniqueness, I'd probably create a SHA1 hash for each track and do something with combining that for each of the tracks to form a disk hash.

 

b. the command above just reads the sectors requested. Is there a
better way to read from a cdrom. Remember my fs caches everything, so
possibly "in between" results (which are not requested and thus
ignored in the final result) maybe used in my fs, as long as it's
clear which sector is read.

The libcdio call read_audio_sectors allows you to read a large number of sectors in one call. Depending on the CD-ROM driver this may wind up into several smaller calls. If the CD-ROM support MMC, then read_audio_sectors turns into a MMC READ_CD call. I don't know that one can be more direct than this.



Thanks in advance,


Stef

_______________________________________________
Libcdio-help mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/libcdio-help


reply via email to

[Prev in Thread] Current Thread [Next in Thread]