From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bdeae27ce2508af5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-15 07:53:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!62.154.176.138!not-for-mail From: Steffen Huber Newsgroups: comp.lang.ada Subject: Re: Retrieve CD-R TOC Date: Mon, 15 Jul 2002 16:47:16 +0200 Organization: private Message-ID: <3D32E074.B336CDDE@gmx.de> References: Reply-To: steffen.huber@gmx.de NNTP-Posting-Host: 62.154.176.138 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: fu-berlin.de 1026744808 25823352 62.154.176.138 (16 [82308]) X-Mailer: Mozilla 4.7 [de] (WinNT; I) X-Accept-Language: de Xref: archiver1.google.com comp.lang.ada:27109 Date: 2002-07-15T16:47:16+02:00 List-Id: Filoux wrote: > Hello!! Hi, > I'd like to know if it's possible to retrieve the table of content > (TOC) of a CD with ADA. Nearly everything is possible with Ada ;-) > I'm currently running linux and I need to get > some information (like cd content, size of files, etc...). Hmmmm...size of files? Unless I completely misunderstand you, you won't be able to get the size of files out of a CD's TOC. The TOC has only information about the start and the type (audio, data...) of a CD track (and indexes and possibly CD Text and if it is 2 or 4 channel stereo and if it is a multisession disc...). The TOC does not know anything about files - you would have to examine the data blocks on a CD and decode the ISO9660 (or Joliet or RockRidge) directory information. > I don't want to do it by executing a system call like (du -ah) but > I'd like to do it by accessing the TOC of the CD (or DVD). I would suggest that you look at the cdrecord sources and create some bindings to the SCSI transportation layer that cdrecord uses. For information about the Read TOC SCSI/IDE command, look at the ATAPI and SCSI-II (and probably MMC) specs. I have written a nice library to do things like that (and much more, like e.g. writing CDs), but it is only usable for the RISC OS operating system, and it is all inside a commercial CD writing package ;-) Steffen -- steffen.huber@gmx.de steffen@huber-net.de GCC for RISC OS - http://www.arcsite.de/hp/gcc/ Private homepage - http://www.huber-net.de/