-rw-r--r-- | doc/glossary.texi | 157 | ||||
-rw-r--r-- | doc/libcdio.texi | 193 |
diff --git a/doc/glossary.texi b/doc/glossary.texi index d3ea8f30..034c24e2 100644 --- a/doc/glossary.texi +++ b/doc/glossary.texi @@ -1,5 +1,5 @@ Thomas Schmitt has made significant contributions to this glossary. -See also @uref{http://www.dvdrhelp.com/glossary}. +See also @uref{https://www.videohelp.com/glossary}. @table @dfn @@ -18,7 +18,7 @@ provides a mechanism for transferring and executing SCSI CDBs on IDE CD Drives and DVD Drives. IDE (also called ATA) was originally designed for hard drives only, -but with help of ATAPI it is possible to connect other devices, in +but with the help of ATAPI, it is possible to connect other devices, in particular CD-ROMS to the IDE/EIDE connections. The ATAPI CD-ROM drives understand a subset of SCSI commands. In @@ -29,13 +29,13 @@ ATAPI devices. A CD-image format developed by Jeff Arnold for CDRWIN software on Microsoft Windows. Many other programs subsequently support using this -format. The @code{.CUE} file is a text file which contains CD format +format. The @code{.CUE} file is a text file that contains CD format and track layout information, while the @code{.BIN} file holds the actual data of each track. @item Blu-ray Disc (BD) @cindex Blu-ray Disc (BD) -Optical media with capacity of 25 GB as single layer and 50 GB as +Optical media with a capacity of 25 GB as a single layer and 50 GB as double layer. See also @pxref{models-profiles,,"Media models and profiles"}. @@ -48,7 +48,7 @@ Compact Disc. Capacity up to 900 MB. See also @item CD-DA @cindex CD-DA Compact Disc Digital Audio, described in the ``Red Book'' or IEC 60908 -(formerly IEC 908). This commonly referred to as an audio @acronym{CD} +(formerly IEC 908). This is commonly referred to as an audio @acronym{CD} and what most people think of when you play a @acronym{CD} as it was the first to use the @acronym{CD} medium. @@ -81,9 +81,9 @@ are CD-XA Bridge discs. @item CD-ROM @cindex CD-ROM -Compact Disc Read Only Memory or ``Yellow Book'' describe in Standards +Compact Disc Read Only Memory or ``Yellow Book'' described in Standards ISO/IEC 10149. The data stored on it can be either in the form of -audio, computer or video files. +audio, computer, or video files. @item CD-ROM Mode 1 and Mode2 @@ -97,13 +97,13 @@ both computer and audio/video to be mixed in the same track. @cindex CD Text CD Text is a technology developed by Sony Corporation and Philips -Electronics in 1996 that allows storing in an audio CD and its tracks +Electronics in 1996 that allowed storing in an audio CD and its tracks information such as artist name, title, songwriter, composer, or arranger. Commercially available audio CDs sometimes contain CD Text -information. +information. Information on how CD Text is stored can be found in in older MMC -standards. Specifically, try ``Annex J'' of ``mmc3r10g.pdf''. +standards. Specifically, try ``Annex J'' of ``mmc3r10g.pdf''. An ``Unofficial CD Text FAQ'' is at @url{http://web.ncf.ca/aa571/cdtext.htm} @@ -115,7 +115,7 @@ CD-ROM EXtended Architecture. A modification to the CD-ROM specification that defines two new types of sectors. CD-ROM XA was developed jointly by Sony, Philips, and Microsoft, and announced in August 1988. Its specifications were published in an extension to the -Yellow Book. CD-i, Photo CD, Video CD and CD-EXTRA have all +Yellow Book. CD-i, Photo CD, Video CD, and CD-EXTRA have all subsequently been based on CD-ROM XA. CD-XA defines another way of formatting sectors on a CD-ROM, including @@ -127,19 +127,19 @@ The data written on a CD-XA is consistent with and can be in ISO-9660 file system format and therefore be readable by ISO-9660 file system translators. But also a CD-I player can read CD-XA discs even if its own `Green Book' file system only resembles ISO 9660 and isn't -fully compatible. +fully compatible. @item DVD @cindex DVD -Digital Versatile Disc. Capacity up to 4.5 GB as single layer and 8.5 -GB as double layer media. See also @pxref{models-profiles,,"Media +Digital Versatile Disc. Capacity up to 4.5 GB as single-layer and 8.5 +GB as double-layer media. See also @pxref{models-profiles,,"Media models and profiles"}. @item Defect management @cindex Defect management A method to compensate small amounts of bad spots on media by replacing them out of a pool of reserve blocks and performing address translation. -The necessary checkreading slows down write performance by a factor of 2 or 3. +The necessary check reading slows down write performance by a factor of 2 or 3. Defect management applies by default to DVD-RAM and BD-RE. Optionally it can be formatted onto CD-RW and DVD+RW, where it has the name "Mount Rainier". Sequential BD-R can be formatted for defect management too. @@ -153,20 +153,21 @@ a SCSI Command Descriptor Block (CDB). @item ECMA-119 (ISO-9660) @cindex ECMA-119 -(@uref{http://www.ecma-international.org/publications/standards/Ecma-119.htm} -is a freely available specification which is technically identical to ISO 9660. +@uref{http://www.ecma-international.org/publications/standards/Ecma-119.htm} +is a freely available specification that is technically identical to ISO 9660. @item ECMA-167 (UDF) @cindex ECMA-167 -(@uref{http://www.ecma-international.org/publications/standards/Ecma-167.htm} +@uref{https://ecma-international.org/publications-and-standards/standards/ecma-167/} + is a freely available specification which is also approved as ISO 13346. -It serves as base for UDF. +It serves as the base for UDF. @item ECMA-168 @cindex ECMA-168 -(@uref{http://www.ecma-international.org/publications/standards/Ecma-168.htm} +@uref{https://ecma-international.org/publications-and-standards/standards/ecma-168/} is a freely available specification which is also approved as ISO 13490. @item FSF @@ -183,30 +184,30 @@ Free Software Foundation, @uref{http://www.fsf.org/} Integrated Drive Electronics. This is a commonly used interface for hard disk drives and CD-ROM drives. It is less expensive than SCSI, -but offers slightly less in terms of performance. +but offers slightly less performance. @item ISO @cindex ISO -International Standards Organization. +International Standards Organization. @item ISO 13346 @cindex ISO 13346 ISO 13346 / ECMA-167 is a filesystem framework for data exchange on -overwriteable or pseudo-overwriteable media. It serves as base of UDF. +overwriteable or pseudo-overwritable media. It serves as the base of UDF. @item ISO 13490 @cindex ISO 13490 -ISO 13490 / ECMA-168 is an attempt to replace ISO 9660 by a format that +ISO 13490 / ECMA-168 is an attempt to replace ISO 9660 with a format that allows finer write granularity and representation of typical disk file properties. It resembles ECMA-167 which led to UDF. @item ISO 9660 @cindex ISO 9660 -ISO 9660 / ECMA-119 is an operating-system independent filesystem format +ISO 9660 / ECMA-119 is an operating-system-independent filesystem format originally intended for CD-ROM media. It was standardized in 1988 and replaced the High Sierra standard for the logical format on CD-ROM media (ISO 9660 and High Sierra are identical in content, but the exact format is @@ -231,17 +232,17 @@ and Windows NT by Microsoft as an extension of ISO 9600 which allows the use of Unicode characters and supports file names up to 64 characters. -See @uref{http://bmrc.berkeley.edu/people/chaffee/jolspec.html} for +See @uref{https://pismotec.com/cfs/jolspec.html} for the Joliet Specification. -The name Joliet comes from the city in Illinois (U.S) that the +The name Joliet comes from the city in Illinois (U.S) where the standard was defined. @item LBA @cindex LBA Logical Block Addressing. Mapped integer numbers from CD Red Book -Addressing MSF. The starting sector is -150 and ending sector is +Addressing MSF. The starting sector is -150 and the ending sector is 449849, which correlates directly to MSF: 00:00:00 to 99:59:74. Because an LBA is a single number it is often easier to work with in programming than an MSF. @@ -267,7 +268,7 @@ the ATIP groove on the disk. For example: @cindex LSN Logical Sector Number. Mapped integer numbers from CD Red Book -Addressing MSF. The starting sector is 0 and ending sector is 449699, +Addressing MSF. The starting sector is 0 and the ending sector is 449699, which correlates to MSF: 00:00:00 to 99:59:74. Because an LSN is a single number it is often easier to work with in programming than an MSF. Because it starts at 0 rather than -150 as is the case of an LBA @@ -276,16 +277,16 @@ it can be represented as an unsigned value. @item MCN @cindex MCN -Media Catalog Number. A identification number on an audio CD. Also +Media Catalog Number. An identification number on an audio CD. Also called a UPC. Another identification number is ISRC. @item @anchor{MMC}MMC @cindex MMC (Multimedia Commands) -MMC (Multimedia Commands). +MMC (Multimedia Commands). MMC are raw commands for communicating with CDROM drives, -CD-Rewriters, DVD-Rewriters, etc. The are subset of the larger SCSI +CD-Rewriters, DVD-Rewriters, etc. They are a subset of the larger SCSI command set. See also @pxref{SCSI,,@acronym{SCSI}}. Many manufacturers have adopted this standard and it also applies to @@ -293,8 +294,8 @@ ATAPI versions of their drives. The documents @code{libcdio} makes use of are described in the Multi-Media Commands standard (MMC). This document generally has a -numeric level number appended. For example MMC-5 refers to -``Multi-Media Commands - 5. +numeric level number appended. For example, MMC-6 refers to +``Multi-Media Commands - 6. @item @anchor{models-profiles}Media models and profiles @cindex Media models and profiles @@ -347,10 +348,10 @@ They can assume three states: @item "Appendable" is readable and after the readable part still writeable @item "Closed" is only readable @end table -CD-RW and DVD-RW can be brought back to blank state, -or they can be formatted to become overwriteable. +CD-RW and DVD-RW can be brought back to a blank state, +or they can be formatted to become overwritable. -Overwriteable profiles allow random read-write access with a +Overwritable profiles allow random read-write access with a granularity of 2 kB or 32 kB. One can hope for having read-write access via the normal POSIX operations lseek(), read(), write() of the operating system. @@ -363,26 +364,26 @@ POSIX operations lseek(), read(), write() of the operating system. @item BD-RE 0x43 (single or double layer) @end table BD-R profile 0x42 is defined by MMC but not implemented by the consumer -priced Blu-ray burners as of year 2010. +priced Blu-ray burners as of the year 2010. @item Mixed Mode CD @cindex Mixed Mode CD A Mixed Mode is a CD that contains tracks of differing CD-ROM Mode -formats. In particular the first track may contain both computer data +formats. In particular, the first track may contain both computer data (Yellow Book) CD ROM data while the remaining tracks are audio or -video data. Video CD's can be Mixed Mode CDs. +video data. Video CD's can be Mixed Mode CDs. -@item Multisession -@cindex Multisession +@item Multisession +@cindex Multisession -A way of writing to a CD , DVD or Blu-ray Disc that allows more data to be +A way of writing to a CD, DVD, or Blu-ray Disc that allows more data to be added to readable discs at a later time. The media must not have been closed -by the previous write session. This applies originally to unformatted CD-R, +by the previous writing session. This applies originally to unformatted CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, and sequential BD-R which all can record more -than one session. They hold a table-of-content with sessions and tracks. +than one session. They hold a table of contents with sessions and tracks. Formatted CD-RW, DVD-RAM, DVD+RW, DVD-RW, and BD-RE have only one track. -Multisession on these media needs help by the recorded data formats. +Multisession on these media needs help from the recorded data formats. Multisession can be used to add a changeset to an existing ISO 9660 filesystem. Typically the add-on session contains a whole new filesystem tree @@ -390,40 +391,40 @@ with old and new files. It also contains the data blocks of the newly introduced or freshly overwritten files. The convention for mounting multisession ISO 9660 images is to load the superblock from the start of the first track in the last session as listed -in the media table-of-content. Formatted media are assumed to have a single +in the media table of contents. Formatted media are assumed to have a single track starting at block 0. So ISO 9660 multisession on formatted media has to overwrite the volume descriptors at block 16 ff. with every new session. A chain of recognizable sessions can be achieved by starting the first -ISO 9660 image at block 32 so that its descriptors get not overwritten later. +ISO 9660 image at block 32 so that its descriptors are not overwritten later. @item Nero NRG format file @cindex Nero NRG, CD-Image format -A proprietary CD image file format use by a popular program for +A proprietary CD image file format used by a popular program for Microsoft Windows, Ahead Nero. The specification of this format is -not to our knowledge published. +not to our knowledge published. @item Rock Ridge Extensions @cindex Rock Ridge extensions An extension to the ISO-9660 standard which adds POSIX information to files. It allows long file names, owner, group, access permissions @code{ugo+-rwx}, -inode numbers, hard-link count, file types other than directory or regular +inode numbers, hard-link count, and file types other than directory or regular file. Rock Ridge is described by unapproved standard IEEE P1282 / RRIP-1.12 and based on unapproved IEEE P1281 / SUSP-1.10. It has become a de-facto standard on X/Open systems like GNU/Linux, FreeBSD, Solaris, et.\ al. -@item @anchor{SCSI}SCSI -@cindex SCSI +@item @anchor{SCSI}SCSI +@cindex SCSI Small Computer System Interface. A set of ANSI standard electronic interfaces (originally developed at Apple Computer) that allow personal computers to communicate with peripheral hardware such as CD-ROM drives, disk drives, printers, etc. -Although the original hardware is outdated since years, the SCSI command +Although the original hardware has been outdated for years, the SCSI command set nowadays controls most storage devices including all optical disc drives. -The contemporary electronic technologies which transport SCSI commands +The contemporary electronic technologies that transport SCSI commands to optical drives are P-ATA, SATA, and USB. A SCSI programming specification made by the SCSI committee T10 @@ -432,16 +433,16 @@ organization @url{http://www.t10.org/}. The documents @code{libcdio} makes use of are described in SCSI standards documents SCSI Primary Commands (SPC), SCSI Block Commands (SBC), and Multi-Media Commands (MMC). These documents generally have -a numeric level number appended. For example SPC-3 refers to +a numeric level number appended. For example, SPC-3 refers to ``SCSI Primary Commands - 3'. -In year 2010 the current versions were SPC-3, SBC-2, MMC-5. +In year 2025, the current versions were SPC-7 (@url{https://www.t10.org/members/w_spc7.htm}), SBC-5 (@url{https://www.t10.org/members/w_sbc5.htm}), MMC-6 (@url{https://t10.org/members/w_mmc6.htm}). @item SCSI CDB @cindex SCSI CDB SCSI Command Descriptor Block. The data structure that is used to -issue a SCSI command. +issue a SCSI command. @item SCSI Pass Through Interface. @cindex SCSI Pass Through Interface. @@ -449,7 +450,7 @@ issue a SCSI command. Yet another way of issuing MMC commands for accessing a CD-ROM. As with MMC or ASPI, the CD-ROM doesn't necessarily have to be a SCSI-attached drive. See also @pxref{MMC,,@acronym{MMC}} and -@pxref{MMC,,@acronym{ASPI}}. +@pxref{ASPI,,@acronym{ASPI}}. @item Session @@ -460,7 +461,7 @@ data sessions. @item SVCD @cindex Super VCD (SVCD) -Super @acronym{VCD} +Super @acronym{VCD} An improvement of Video CD 2.0 specification which includes most notably a switch from @acronym{MPEG}-1 (constant bit rate encoding) to @@ -471,36 +472,36 @@ graphics and text (@dfn{OGT}) sub-channels for user switchable subtitle displaying, closed caption text, and command lists for controlling the @acronym{SVCD} virtual machine. -See @uref{http://www.dvdrhelp.com/svcd} +See @uref{https://www.videohelp.com/glossary?S#SVCD} @item TOC @cindex TOC (CD Table of Contents) (Compact Disc) Table of Contents. The TOC contains a list of sessions and their tracks. For sessions, it records the starting track -number and the last track number. For tracks it records starting time +number and the last track number. For tracks, it records starting time block address, size, copy protection, linear audio preemphasis, track format (CDDA or data) in that order. -Session and track information is also available on sequential DVD and +Session and track information is also available on sequential DVDs and Blu-ray Discs. Several track properties are fixed to equivalents of CD data. -@item Track +@item Track @cindex track A unit of data of a CD. The size of a track can vary; it can occupy the entire contents of the CD. Most CD standards however require that tracks have a 150 frame (or ``2 second'') lead-in gap. -An abstraction of tracks for CD, DVD and Blu-ray Discs is the Logical Track -as of MMC specs. Overwriteable media have a single logical track, sequential +An abstraction of tracks for CD, DVD, and Blu-ray Discs is the Logical Track +as of MMC specs. Overwritable media have a single logical track, sequential media can have one or more logical tracks which they describe in their TOC. @item UDF @cindex UDF -Universal Disc Format was designed as successor of ISO 9660. It allows -to record long file names and advanced file properties. Although intended -as format for data exchange its main importance is with DVD video players. +Universal Disc Format was designed as the successor of ISO 9660. It allows recording +long file names and advanced file properties. Although intended +as a format for data exchange its main importance is with DVD video players. Video DVDs have to bear a simple UDF filesystem with a prescribed set of files. @@ -510,8 +511,8 @@ of files. The Video Compact Disc (@dfn{Video CD} or @dfn{VCD}) is a standardized digital video storage format. It is based on the commonly available Compact Disc technology, which allows for low-cost video authoring. -Video CD's can be played in most @acronym{DVD} standalone player, -dedicated VCD players and finally, modern Personal Computers with +Video CD's can be played in most @acronym{DVD} standalone players, +dedicated VCD players, and finally, modern Personal Computers with multimedia support. A Video CD is made up of @acronym{CD-ROM XA} sectors, @@ -526,24 +527,26 @@ sectors have a 2336 byte user data area, but parts of it are used for error codes and headers when using the mode 2 form 1 or form 2 configurations.} -@uref{http://www.dvdrhelp.com/vcd} +@uref{https://www.videohelp.com/glossary?V#VCD} @item Win32 ASPI @cindex ASPI -The ASPI interface specification was developed by Adaptec for +The ASPI interface specification was developed by Adaptec for sending commands to a SCSI host adapter (such as those controlling CD -and DVD drives) and used on Window 9x/NT and later. Emulation for -ATAPI drives was added so that the same sets of commands worked those +and DVD drives) and used on Windows 9x/NT and later. Emulation for +ATAPI drives was added so that the same sets of commands worked in those even though the drives might not be SCSI nor might there even be a SCSI controller attached. -However in Windows NT/2K/XP, Microsoft provides their Win32 ioctl -interface, and has take steps to make using ASPI more inaccessible +However, in Windows NT/2K/XP, Microsoft provides their Win32 ioctl +interface, and has taken steps to make using ASPI more inaccessible (e.g. requiring administrative access to use ASPI). See also @pxref{MMC,,@acronym{MMC}}. +@uref{https://www.videohelp.com/glossary?A#ASPI} + @item Win32 ioctl driver Ioctl (Input Output ConTroLs). A Win32 function, implemented in all diff --git a/doc/libcdio.texi b/doc/libcdio.texi index 008402a7..27dc1b09 100644 --- a/doc/libcdio.texi +++ b/doc/libcdio.texi @@ -15,7 +15,7 @@ This manual documents @code{libcdio}, the GNU CD Input, Output, and Control Library. -Copyright @copyright{} 2003-2008, 2010, 2012-2014 Rocky +Copyright @copyright{} 2003-2008, 2010, 2012-2014, 2025 Rocky Bernstein and Herbert Valerio Riedel. @quotation @@ -93,11 +93,11 @@ I became aware of Video CD's (VCD's). Video CD's are not subject to the DMCA and therefore enjoy the protection afforded by copyright but no more. But in order for VCD's to be competitive with DVD's, good tools -- including GPL tools -- are needed for authoring and playing -them. And so through VCD's I became aware of the excellent Video CD +them. And so through VCD's, I became aware of the excellent Video CD tools by Herbert Valerio Riedel which form the @kbd{vcdimager} package. -Although vcdimager is great for authoring, examining and extracting +Although vcdimager is great for authoring, examining, and extracting parts of a Video CD, it is not a VCD player. And when I looked at the state of Video CD handling in existing VCD players: @code{xine}, @code{MPlayer}, and @code{vlc}, I was a bit disappointed. None handled @@ -195,14 +195,14 @@ a uniform ASCII representation and send that to a printer, for MMC although there are common internal structures defined, there is no common syntax for representing the structures or an OS-independent library or API for issuing MMC-commands which a programmer would need -to use. Instead each Operating System has its own interface. For +to use. Instead, each Operating System has its own interface. For example Adaptec's ASPI or Microsoft's DeviceIoControl on Microsoft Windows, or IOKit for Apple's OS/X, or FreeBSD's CAM. I've been positively awed at how many different variations and differing levels -of complexity there are for doing basically the same thing. How easy -it is to issue an MMC command from a program varies from easy to very +of complexity, there are for doing basically the same thing. The ease +with which one can issue an MMC command from a program varies from easy to very difficult. And mastering the boilerplate code to issue an MMC command -on one OS really doesn't help much in figuring out how to do it on +on one OS doesn't help much in figuring out how to do it on another OS. So in @value{libcdio} we provide a common (and hopefully simple) API to issue MMC commands. @@ -280,47 +280,55 @@ performs low-level block reading of a CD or CD image @item @code{iso-info} -displays ISO-9660 information from an ISO-9660 image. Below is some -sample output +displays ISO-9660 information from an ISO-9660 image. Below is a sample invocation and output. @smallexample -iso-info version 0.82 x86_64-unknown-linux-gnu -Copyright (c) 2003, 2004, 2005, 2007, 2008 R. Bernstein +$ iso-info -l test/data/joliet.iso +iso-info version 2.1.1 x86_64-pc-linux-gnu +Copyright (c) 2003-2005, 2007-2008, 2011-2015, 2017, 2025 R. Bernstein This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ -ISO 9660 image: ../test/joliet.iso -Application: K3B THE CD KREATOR VERSION 0.11.12 (C) 2003 SEBASTIAN TRUEG AND... -Preparer : K3b - Version 0.11.12 -Publisher : Rocky Bernstein -System : LINUX -Volume : K3b data project -Volume Set : +ISO 9660 image: test/data/joliet.iso +Application : K3B THE CD KREATOR VERSION 0.11.12 (C) 2003 SEBASTIAN TRUEG AND THE K3B TEAM +Preparer : K3b - Version 0.11.12 +Publisher : Rocky Bernstein +System : LINUX +Volume : K3b data project +Joliet Level: 3 __________________________________ ISO-9660 Information /: - Oct 22 2004 19:44 . - Oct 22 2004 19:44 .. - Oct 22 2004 19:44 libcdio + d [LSN 31] 2048 Oct 22 2004 18:44:59 . + d [LSN 31] 2048 Oct 22 2004 18:44:59 .. + d [LSN 32] 2048 Oct 22 2004 18:44:59 libcdio /libcdio/: - Oct 22 2004 19:44 . - Oct 22 2004 19:44 .. - Mar 12 2004 02:18 COPYING - Jun 26 2004 07:01 README - Aug 12 2004 06:22 README.libcdio - Oct 22 2004 19:44 test + d [LSN 32] 2048 Oct 22 2004 18:44:59 . + d [LSN 31] 2048 Oct 22 2004 18:44:59 .. + - [LSN 34] 17992 Mar 12 2004 02:18:03 COPYING + - [LSN 43] 2156 Jun 26 2004 06:01:09 README + - [LSN 45] 2849 Aug 12 2004 05:22:23 README.libcdio + d [LSN 33] 2048 Oct 22 2004 18:44:59 test /libcdio/test/: - Oct 22 2004 19:44 . - Oct 22 2004 19:44 .. - Jul 25 2004 06:52 isofs-m1.cue + d [LSN 33] 2048 Oct 22 2004 18:44:59 . + d [LSN 32] 2048 Oct 22 2004 18:44:59 .. + - [LSN 47] 74 Jul 25 2004 05:52:32 isofs-m1.cue @end smallexample @item @code{iso-read} -extracts files from an ISO-9660 image. +Extracts files from an ISO-9660 image. + +Below is a sample invocation and output. + +@smallexample +$ iso-read -i test/data/joliet.iso -e libcdio/README -o /tmp/README +$ ls -l /tmp/README +-rw-rw-r-- 1 rocky rocky 2156 Jan 4 10:30 /tmp/README +@end smallexample @item @code{mmc-tool} @@ -453,18 +461,18 @@ later use when the Internet is not available; people tend request the same information since they via programs play the same music. Obtaining CD meta information when none is encoded in an audio CD is -useful in media players or making ones own compilations from audio +useful in media players or making one's own compilations from audio CDs. There are currently two popular CDDB services on the Internet. The -original database has been renamed Gracenote and is a profit making +original database has been renamed Gracenote and is a profit-making entity. GnuDB (@url{https://gnudb.org} is an open source CD information resource that is free for developers and the public to use. As there already is an excellent library for handling CDDB libcddb (@url{http://libcddb.sourceforge.net} we suggest using that. Our -utility program @command{cd-info} will make use it if it is available +utility program @command{cd-info} will make use of it if it is available and it's what we use in our applications that need it. @node Yellow Book @@ -500,7 +508,7 @@ data storage formats using this specification, resulting in incompatible data CDs. To prevent this, representatives of major manufacturers met at the High Sierra Hotel and Casino in Lake Tahoe, NV, in 1985, to define a standard for storing data on CDs. This format -was nicknamed High Sierra Format. In a slightly modified form it was +was nicknamed High Sierra Format. In a slightly modified form, it was later adopted as ISO the ISO 9660 standard. This standard is further broken down into 3 "levels", the higher the level, the more permissive. @@ -526,9 +534,9 @@ usable on some systems, notably MS-DOS. Level 3 ISO-9660 allows non-contiguous files, useful if the file was written in multiple packets with packet-writing software. -There have been a number of extensions to the ISO 9660 CD-ROM file +There have been extensions to the ISO 9660 CD-ROM file format. One extension is Microsoft's Joliet specification, designed to -resolve a number of deficiencies in the original ISO 9660 Level 1 file +resolve a deficiencies in the original ISO 9660 Level 1 file system, and in particular to support the long file names used in Windows 95 and subsequent versions of Windows. @@ -545,11 +553,11 @@ specification that removes the limitation initially put in to deal with the limited filename conventions found in Microsoft DOS OS. In particular, the Joliet specification allows for long filenames and allows for UCS-BE (BigEndian Unicode) encoding of filenames which -include mixed case letter, accented characters spaces and various +include mixed case letters, accented characters, spaces, and various symbols. The way all of this is encoded is by adding a second directory and -filesystem structure in addition to or in parallels to original ISO +filesystem structure in addition to or in parallel to the original ISO 9600 filesystem. The root node of the ISO 9660 filesystem is found via the @term{Primary Volume Descriptor} or @term{PVD}. The root of the Joliet-encode filesystem is found in a Supplementary Volume @@ -561,14 +569,14 @@ fields getting used and with the filename encoding changed to UCS-BE. @subsubsection Rock Ridge Extensions @cindex Rock Ridge extensions -Using the Joliet Extension one overcome the limitedness of the +Using the Joliet Extension one overcomes the limitedness of the original ISO-9660 naming scheme. But another and probably better method is to use the Rock Ridge Extension. Not only can one store a filename as one does in a POSIX OS, but the other file attributes, such as the various timestamps (creation, modification, access), file attributes (user, group, file mode permissions, device type, symbolic links) can be stored. This is much as one would do in XA attributes; -however the two are not completely interchangeable in the information +however, the two are not completely interchangeable in the information they store: XA does @emph{not} address filename limitations, and the Rock Ridge extensions don't indicate if a sector is in Mode 1 or Mode 2 format. @@ -579,13 +587,13 @@ of the ISO 9660 standard. @node Mode 1 @subsection Mode 1 (2048 data bytes per sector) @cindex Mode 1 -Mode 1 is the data storage mode used by to store computer data. There +Mode 1 is the data storage mode used to store computer data. There are 3 layers of error correction. A Compact Disc using only this format can hold at most 650 MB. The data is laid out in basically the same way as -in and audio CD format, except that the 2,352 bytes of data in each +in an audio CD format, except that the 2,352 bytes of data in each block are broken down further. 2,048 of these bytes are for ``real'' -data. The other 304 bytes are used for an additional level of error -detecting and correcting code. This is necessary because data CDs +data. The other 304 bytes are used for an additional level of error-detecting +and correcting code. This is necessary because data CDs cannot tolerate the loss of a handful of bits now and then, the way audio CDs can. @@ -596,17 +604,17 @@ sector you call the @code{cdio_read_mode1_sector()} or @node Mode 2 @subsection Mode 2 (2336 data bytes per sector) @cindex Mode 2 -Mode 2 data CDs are the same as mode 1 CDs except that the error -detecting and correcting codes are omitted. So still there are 2 +Mode 2 data CDs are the same as mode 1 CDs except that the error-detecting +and correcting codes are omitted. So still there are 2 layers of error correction. A Compact Disc using only this mode can thus hold at most 742 MB. Similar to audio CDs, the mode 2 format provides a more flexible vehicle for storing types of data that do not require high data integrity: for example, graphics and video can use this format. But in contrast to the Red Book standard, different modes -can be mixed together; this is the basis for the extensions to the +can be mixed; this is the basis for the extensions to the original data CD standards known as CD-ROM Extended Architecture, or CD-ROM XA. CD-ROM XA formats currently in use are CD-I Bridge -formats, Photo CD and Video CD plus Sony's Playstation. +formats, Photo CD, Video CD, and Sony's PlayStation. In @value{libcdio} when you you want to read a mode1 sector you call the @code{cdio_read_mode2_sector()} or @@ -617,15 +625,15 @@ sector you call the @code{cdio_read_mode2_sector()} or @cindex Green Book This was a CD-ROM format developed by Philips for CD-i (an obsolete -embedded CD-ROM application allowing limited user user interaction -with films, games and educational applications). The format is ISO +embedded CD-ROM application allowing limited user interaction +with films, games, and educational applications). The format is ISO 9660 compliant and introduced mode 2 form 2 addressing. It also contains XA (Extended Architecture) attributes. -Although some Green Book discs contain CD-i applications which can +Although some Green Book discs contain CD-i applications that can only be played on a CD-i player, others have films or music videos. Video CDs in Green-Book format are labeled "Digital Video on -CD." The Green Book for video is largely superseded by White book +CD." The Green Book for video is largely superseded by the White book CD-ROM which draws on this specification. @@ -641,7 +649,7 @@ A Video CD contains one data track recorded in CD-ROM XA Mode 2 Form 2. It is always the first track on the disc (Track 1). The ISO-9660 file structure and a CD-i application program are recorded in this track, as well as the Video CD Information Area which gives general -information about the Video Compact Disc. After the data track, video +information about the Video Compact Disc. After the data track, the video is written in one or more subsequent tracks within the same session. These tracks are also recorded in Mode 2 Form 2. @@ -660,7 +668,7 @@ sector you call the @code{cdio_read_mode2_sector()} or In both the @command{cdrdao} and bin/cue formats there is one meta-file with extensions @code{.toc} or @code{.cue} respectively and one or more -files (often with the extension @code{.bin}) which contains the +files (often with the extension @code{.bin}) which contain the content of tracks. The format of the track data is often interchangeable between the two formats. For example, in @value{libcdio}'s regression tests we make use of this to reduce the @@ -669,9 +677,9 @@ size of the test data and just provide alternate meta-data files In contrast to the first two formats, the NRG format consists of a single file. This has the advantage of being a self-contained -unit: in the other two formats it is possible for the meta file to -refer to a file that can't be found. A disadvantage of the NRG format -is that the meta data can't be easily viewed or modified say in a text +unit: in the other two formats the meta file can refer +to a file that can't be found. A disadvantage of the NRG format +is that the metadata can't be easily viewed or modified say in a text file as it can be with the first two formats. In conjunction with this disadvantage is another disadvantage that the format is not documented, so how @value{libcdio} interprets an NRG image is based on @@ -688,8 +696,8 @@ in @value{libcdio} as the BIN/CUE format.) The @emph{toc}-file describes what data is written to the media in the @acronym{CD-ROM}; it allows control over track/index positions, -pre-gaps and sub-channel information. It is a text file, so a text -editor can be used to create, view or modify it. +pre-gaps, and sub-channel information. It is a text file, so a text +editor can be used to create, view, or modify it. The @cite{cdrdao(1) manual page}, contains more information about this format. @@ -879,7 +887,7 @@ editor. @cindex track @cindex gaps -In this section we describe CD properties and terms that we make use +In this section, we describe CD properties and terms that we make use of in @value{libcdio}. A CD is formatted into a number of @term{tracks}, and a CD can hold at @@ -898,14 +906,14 @@ second'' lead-in gap and there is supposed to be another ``2 second'' @term{lead-out} gap at the end (or outer edge) of the CD. People have discovered that they can put useful data in the @term{lead-in} -and @term{lead-out} gaps, and their equipment can read this, violating +and @term{lead-out} gaps and their equipment can read this, violating the standards but allowing a CD to store more data. -In order to determine the number of tracks on a CD and where they +To determine the number of tracks on a CD and where they start, commands are used to get this table-of-contents or @term{TOC} information. Asking about the start of the @term{lead-out track} gives the amount of data stored on the Compact Disk. To make it easy -to specify this leadout track, special constant 0xAA (decimal 170) is +to specify this leadout track, a special constant 0xAA (decimal 170) is used to indicate it. This is safe since this is higher than the largest legal track position. In @value{libcdio}, @code{CDIO_CDROM_LEADOUT_TRACK} is defined to be this special value. @@ -918,22 +926,22 @@ largest legal track position. In @value{libcdio}, @cindex sectors @cindex frames -A track is broken up into a number of 2352-byte @emph{blocks} which we +A track is broken up into several 2352-byte @emph{blocks} which we sometimes call @emph{sectors} or @emph{frames}. Whereas tracks may have a gap between them, a block or sector does not. (In @value{libcdio} the block size constant is defined using @code{CDIO_CD_FRAMESIZE_RAW}). A Compact Disc has a limit on the number of blocks or sectors. This -values is defined by constant @code{CDIO_CD_MAX_LSN} in +value is defined by constant @code{CDIO_CD_MAX_LSN} in @file{cdio/sector.h}. -One can addressing a block in one of three formats. The oldest format -is by it's minute/second/frame number, also referred to as @term{MSF} +One can address a block in one of three formats. The oldest format +is by its minute/second/frame number, also referred to as @term{MSF} and written in time-like format MM:SS:FF (e.g. 30:01:40). It is best suited in audio (Red Book) applications. In @value{libcdio}, the type @code{msf_t} can be used to declare variables to hold such -values. Minute, second and frame values are one byte @emph{and stored +values. Minute, second, and frame values are one byte @emph{and stored BCD notation}.@footnote{Perhaps this is a @value{libcdio} design flaw. It was originally done I guess because it was convenient for VCDs.} There are @value{libcdio} conversion routines @@ -951,27 +959,27 @@ confusing. A frame is also sometimes called a sector, analogous to hard-disk terminology. Even more confusing is using this time-like notation for an address or -for a length. Too often people confuse the MSF notation this with an +a length. Too often people confuse the MSF notation with an amount of time. A ``second'' (or @code{CDIO_CD_FRAMES_PER_SEC} blocks) in this notation is only a second of playing time for something encoded as CD-DA. It does @emph{not} necessarily represent the amount -time that it will take to play a of Video CD---usually you need more +of time that it will take to play a Video CD---usually, you need more blocks than this. Nor does it represent the amount of data used to play a second of an MP3---usually you need fewer blocks than this. It is also not the amount of time your CD-ROM will take to read a ``second'' of data off a Compact Disc: for example a 12x CD player will read 12x @code{CDIO_CD_FRAMES_PER_SEC} -@code{CDIO_CD_FRAMSIZE_RAW}-byte blocks in a one second of time. +@code{CDIO_CD_FRAMSIZE_RAW}-byte blocks in one second. When programming, unless one is working with a CD-DA (and even here, only in a time-like fashion), is generally more cumbersome to use an -MSF rather than a LBA or LSN described below, since subtraction of two -MSF's has the awkwardness akin to subtraction using Roman Numerals. +MSF rather than an LBA or LSN described below, since the subtraction of two +MSF's have an awkwardness akin to subtraction using Roman Numerals. A simpler way to address a block is to use a ``Logical Sector Number'' -(@term{LSN}) or a ``Logical Block Address (@term{LBA}). In the MMC-5 -glossary these are synonymous terms. However historically it has been -used differently. In libcdio, to convert a LBA into an LSN you just +(@term{LSN}) or a ``Logical Block Address (@term{LBA}). In the MMC-6 +glossary, these are synonymous terms. However, historically it has been +used differently. In libcdio, to convert an LBA into an LSN you subtract 150. Both LBA's and LSN's can be negative. @node Pre-gaps @@ -999,13 +1007,13 @@ performer may seamlessly move from one piece of the performance to the next, it would be unnatural for the disc to contain silence between the two pieces. Instead, the track number updates with no interruption in the performance. This allows the listener to either -hear the entire performance without unnatural interruptions, or to +hear the entire performance without unnatural interruptions or to conveniently skip to certain pieces of the performance. Finally, some @acronym{CD-DA} discs--whose behavior will be described below--lack track @term{pre-gap}s altogether although they must still include the @term{lead-in} and @term{lead-out} gaps. -In order to understand the track @term{pre-gap}s that occur between +To understand the track @term{pre-gap}s that occur between audio tracks, it is necessary to understand how CD players display the track number and time. Embedded in each block of audio data is non-audio information known as the @term{Q sub-channel}. The @@ -1013,7 +1021,7 @@ non-audio information known as the @term{Q sub-channel}. The it should display while it is playing the block of audio data in which the @term{Q sub-channel} data is embedded. Near the end of some tracks, the @term{Q sub-channel} may instruct the CD player to update -the track number to the next track, and display a count down to the +the track number to the next track and display a count down to the next track, often starting at -2 seconds and proceeding to zero. This is known as an audio track @term{pre-gap}. It may either contain silence, or as previously discussed--in the case of live @@ -1112,12 +1120,12 @@ contributed by Robert William Fuller (@email{hydrologiccycle@@gmail.com}). @node How to use @chapter How to use -The @value{libcdio} package comes with a number of small example +The @value{libcdio} package comes with several small example programs in the directory @file{example} which demonstrate different aspects of the library and show how to use the library. The source -code to all of the examples here are contained on the package. +code for all of the examples here is contained in the package. -Other sources for examples would be the larger utility programs +Other sources for example would be the larger utility programs @command{cd-drive}, @command{cd-info}, @command{cd-read}, @command{iso-info}, and @command{iso-read} which are all in the @file{src} directory of the @value{libcdio} package. See also @@ -1224,17 +1232,17 @@ distribution as @file{example/tracks.c}. 9: track_t i_tracks = cdio_get_num_tracks(p_cdio); 10: int j, i=first_track_num; 11: -12: printf("CD-ROM Track List (%i - %i)\n", first_track_num, i_tracks); +12: printf("CD-ROM Track List (%i - %i)\n", first_track_num, i_first_track+i_tracks-1); 13 14: printf(" #: LSN\n"); 15: 16: for (j = 0; j < i_tracks; i++, j++) @{ 17: lsn_t lsn = cdio_get_track_lsn(p_cdio, i); 18: if (CDIO_INVALID_LSN != lsn) -19: printf("%3d: %06d\n", (int) i, lsn); +19: printf("%3d: %06d\n", (int) i, (long unsigned int) lsn); 20: @} 21: printf("%3X: %06d leadout\n", CDIO_CDROM_LEADOUT_TRACK, -22: cdio_get_track_lsn(p_cdio, CDIO_CDROM_LEADOUT_TRACK)); +22: (long unsigned int) cdio_get_track_lsn(p_cdio, CDIO_CDROM_LEADOUT_TRACK)); 23: cdio_destroy(p_cdio); 24: return 0; 25: @} @@ -1290,7 +1298,7 @@ and 9. For each track, we call a cdio routine to get the logical sector number, @code{cdio_get_track_lsn()} on line 17 and print the track -number and LSN value. Finally we print out the ``lead-out track'' +number and LSN value. Finally, we print out the ``lead-out track'' information and we finally call @code{cdio_destroy()} in line 23 to indicate we're done with the CD. @@ -2288,6 +2296,7 @@ One of the problems with MMC is that there are so many different @item MMC 3 --- @url{ftp://ftp.t10.org/t10/drafts/mmc3/} @item MMC 4 --- @url{ftp://ftp.t10.org/t10/drafts/mmc4/} @item MMC 5 --- @url{ftp://ftp.t10.org/t10/drafts/mmc5/} +@item MMC 6 --- @url{ftp://ftp.t10.org/t10/drafts/mmc6/} @end itemize along with the several ``drafts'' of these. @@ -2328,12 +2337,12 @@ commands instead of other OS-specific mechanisms. @node Access Modes @section Access Modes -There are serveral ways that you can open a CD-ROM drive for +There are several ways that you can open a CD-ROM drive for subsequent use. Each way is called an @emph{access mode}. Historically libcdio only supported a reading kind of access. -Adding the abilty to writing to a drive for ``burning'' is being added +Adding the ability to writing to a drive for ``burning'' is being added by Thomas Schmitt, and this is accomplished by opening the drive in a read-write mode. Currently writing modes are only supported via the MMC command interface. Under this, one can get exclusive read-write @@ -2378,7 +2387,7 @@ and some things via MMC. GNU/Linux has a rather nice and complete ioctl mechanism. On the other hand, the MMC mechanism is more universal. There are other ``access modes'' listed which are not really access modes and should probably be redone/rethought. They are -just different ways to run the read command. But for completeness +just different ways to run the read command. But for completeness, These are ``READ_CD'' and ``READ_10''. Writing/burning to a drive is supported via access modes @@ -2393,12 +2402,12 @@ ioctl and ASPI. The ASPI interface specification was developed by Adaptec for sending commands to a SCSI host adapter (such as those controlling CD and DVD drives) and used on Window 9x/NT and later. Emulation for ATAPI drives -was added so that the same sets of commands worked those even though +was added so that the same sets of commands worked, even though the drives might not be SCSI nor might there even be a SCSI controller attached. The DLL is not part of Microsoft Windows and has to be downloaded and installed separately. -However in Windows NT/2K/XP, Microsoft provides their Win32 ioctl +However, in Windows NT/2K/XP, Microsoft provides their Win32 ioctl interface, and has taken steps to make using ASPI more inaccessible (e.g. requiring administrative access to use ASPI). |