-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibcdio.html
More file actions
5710 lines (5361 loc) · 295 KB
/
Copy pathlibcdio.html
File metadata and controls
5710 lines (5361 loc) · 295 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- This manual documents libcdio, the GNU CD Input, Output, and Control
Library.
Copyright C 2003-2008, 2010, 2012-2014, 2025-2026 Rocky
Bernstein and Herbert Valerio Riedel.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled
"GNU Free Documentation License".
-->
<!-- Created on August 22, 2026 by texi2html 1.82
texi2html was written by:
Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>GNU libcdio: Compact Disc Input, Output, and Control Library</title>
<meta name="description" content="GNU libcdio: Compact Disc Input, Output, and Control Library">
<meta name="keywords" content="GNU libcdio: Compact Disc Input, Output, and Control Library">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Top"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="GNU-libcdio"></a>
<h1 class="settitle">GNU <code>libcdio</code></h1>
<p>This manual documents <code>libcdio</code>, the GNU CD Input, Output, and Control
Library.
</p>
<p>Copyright © 2003-2008, 2010, 2012-2014, 2025-2026 Rocky
Bernstein and Herbert Valerio Riedel.
</p>
<blockquote><p>Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled
“GNU Free Documentation License”.
</p></blockquote>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#History">1. History</a></td><td> </td><td align="left" valign="top"> How this came about
</td></tr>
<tr><td align="left" valign="top"><a href="#Previous-Work">2. The problem and previous work</a></td><td> </td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#Purpose">3. What is in this package (and what’s not)</a></td><td> </td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#CD-Formats">4. CD Formats</a></td><td> </td><td align="left" valign="top"> A tour through the CD-specification spectrum
</td></tr>
<tr><td align="left" valign="top"><a href="#CD-Image-Formats">5. CD Image Formats</a></td><td> </td><td align="left" valign="top"> A tour through various CD-image formats
</td></tr>
<tr><td align="left" valign="top"><a href="#CD-Units">6. The units that make up a CD</a></td><td> </td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#How-to-use">7. How to use</a></td><td> </td><td align="left" valign="top"> Okay enough babble, lemme at the library!
</td></tr>
<tr><td align="left" valign="top"><a href="#Utility-Programs">8. Diagnostic programs: <code>cd-drive</code>, <code>cd-info</code>, <code>cd-read</code>, <code>iso-info</code>, <code>iso-read</code></a></td><td> </td><td align="left" valign="top"> Diagnostic programs that come with this library
</td></tr>
<tr><td align="left" valign="top"><a href="#CD_002dROM-Access-and-Drivers">9. CD-ROM Access and Drivers</a></td><td> </td><td align="left" valign="top"> CD-ROM access and drivers
</td></tr>
<tr><td align="left" valign="top"><a href="#Internal-Program-Organization">10. Internal Program Organization</a></td><td> </td><td align="left" valign="top"> Looking under the hood
</td></tr>
<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
Appendices
</pre></th></tr><tr><td align="left" valign="top"><a href="#ISO_002d9660-Character-Sets">A. ISO-9660 Character Sets</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Glossary">B. Glossary</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#GNU-Free-Documentation-License">C. GNU Free Documentation License</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
Indices
</pre></th></tr><tr><td align="left" valign="top"><a href="#General-Index">General Index</a></td><td> </td><td align="left" valign="top"> Overall index
</td></tr>
</table>
<hr size="1">
<a name="History"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Top" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Previous-Work" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Previous-Work" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="History-1"></a>
<h1 class="chapter">1. History</h1>
<p>As a result of the repressive Digital Millennium Copyright Act, DMCA,
I became aware of Video CD’s (VCD’s). Video CDs 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 DVDs, good
tools – including GPL tools – are needed for authoring and playing
them. And so through VCDs, I became aware of the excellent Video CD
tools by Herbert Valerio Riedel which form the <kbd>vcdimager</kbd>
package.
</p>
<p>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>,
<code>MPlayer</code>, and <code>vlc</code>, I was a bit disappointed. None handled
playback control, menu selections, or playing still frames and
segments from track 1.
</p>
<p>Version 0.7.12 of vcdimager was very impressive; however, it lacked
exportable libraries that could be used in other projects. So with the
blessing and encouragement of Herbert Valerio Riedel, I took to
extract and create libraries from this code base. The result was two
libraries: one to extract information from a VCD, which I called
libvcdinfo, and another to do the reading and control of a VCD. Well,
actually, at this point I should say that a Video CD is really just
Video put on a existing well-established Compact Disc or CD format. So
the library for this is called <code>libcdio</code> rather than
<kbd>libvcdio</kbd>.
</p>
<p>While on the topic of the name <code>libcdio</code>, I should also explain that
the library really doesn’t handle writing or output (the final "o" in
the name). However it was felt that if I put <code>libcdi</code> that might be
confused with a particular CD format called CD-I.
</p>
<p>Later on, the ISO-9660 filesystem handling component from
<kbd>vcdimager</kbd> was extracted, expanded and made a separate
library. Next the ability to add MMC commands was added, and then
CD paranoia support. And from there, the rest is history.
</p>
<hr size="6">
<a name="Previous-Work"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#History" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Purpose" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#History" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Purpose" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="The-problem-and-previous-work"></a>
<h1 class="chapter">2. The problem and previous work</h1>
<p>If around the year 2002 you were to look at the code for a number of
free software CD or media players that work on several platforms such as
vlc, MPlayer, xine, or xmms to name but a few, you’d find the code to
read a CD sprinkled with conditional compilation for this or that
platform. That is there was <em>no</em> OS-independent programmer
library for CD reading and control even though the technology was over
10 years old; yet there are media players which strive for OS
independence.
</p>
<p>One early CD player, <kbd>xmcd</kbd> by Ti Kan, was I think a bit better
than most in that it tried to <em>encapsulate</em> the kinds of CD
control mechanisms, e.g.\ SCSI, Linux ioctl, Toshiba, in a "CD Audio
Device Interface Library" called <code>libdi</code>. However this library is for
Audio CD’s only and I don’t believe this library has been used outside
of xmcd.
</p>
<p>Another project, Simple DirectMedia Layer also encapsulates CD
reading.
</p>
<blockquote><p>SDL is a library that allows you portable low-level access to a video
framebuffer, audio output, mouse, and keyboard. With SDL, it is easy
to write portable games which run on ...
</p></blockquote>
<p>Many of the media players mentioned above can, in fact, make use of
the SDL library but for <em>video</em> output only. Because the encapsulation
is over <em>many</em> kinds of I/O (video, joysticks, mice, as well as CDs),
I believe that the level of control provided for CD is a little bit
limited. (However, to be fair, it may have only been intended for games
and may be suitable for that). Applications that just want the CD
reading and control portion, I think, will find quite a bit of overhead.
</p>
<p>Another related project is Jörg Schilling’s SCSI library. You can
use that to make a non-SCSI CD-ROM act like one that understands SCSI
MMC commands, which is a neat thing to do. However, it is a little weird
to have to install drivers just so you can run a particular user-level
program. Installing drivers often requires special privileges and
permissions, and it is pervasive on a system. It is a little sad that
along the way to creating such a SCSI library, a library similar to
<code>libcdio</code> wasn’t created which could be used. Were that the
case, this library certainly never would have been written.
</p>
<p>At the OS level, there is the “A Linux CD-ROM Standard” by David van
Leeuwen from around 1999. This defines a set of definitions and
ioctl’s that mask hardware differences of various Compact Disc
hardware. It is a great idea; however, this “standard” lacked
adoption on OS’s other than GNU/Linux. Or maybe it’s the case that the
standard on other OS’s lacked adoption on GNU/Linux. For example on
FreeBSD there is a “Common Access Method” (CAM) used for all SCSI
access which seems not to be adopted in GNU/Linux.<a name="DOCF1" href="#FOOT1">(1)</a>
</p>
<p>Finally, at the hardware level where a similar chaos exists, there has
been an attempt to do something similar with the MMC (multimedia
commands). This attempts to provide a uniform command set for CD
devices like PostScript does for printer commands.<a name="DOCF2" href="#FOOT2">(2)</a> In contrast to
PostScript where there one in theory can write a PostScript program in
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
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. 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 doesn’t help much in figuring out how to do it on
another OS. So in <code>libcdio</code> we provide a common (and hopefully
simple) API to issue MMC commands.
</p>
<hr size="6">
<a name="Purpose"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Previous-Work" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Previous-Work" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="What-is-in-this-package-_0028and-what_0027s-not_0029"></a>
<h1 class="chapter">3. What is in this package (and what’s not)</h1>
<p>The library, <code>libcdio</code>, encapsulates CD-ROM reading and
control. Applications wishing to be oblivious of the OS- and
device-dependent properties of a CD-ROM can use this library.
</p>
<p>Also included is a library, <code>libiso9660</code>, for working with
ISO-9660 filesystems.
</p>
<p>Some support for disk-image types like cdrdao’s TOC, CDRWIN’s BIN/CUE
and Ahead Nero’s NRG format is available, so applications that use this
library also can read disc images as though they were
CDs.
</p>
<p><code>libcdio</code> also provides a way to issue SCSI “Multimedia
Commands”, MMC. MMC is supported by many hardware CD-ROM
manufacturers; and in some cases where a CD-ROM doesn’t understand MMC
directly, some Operating Systems (such as GNU/Linux, Solaris, or
FreeBSD or Microsoft Windows ASPI to name a few) provide the MMC
emulation.<a name="DOCF3" href="#FOOT3">(3)</a>
</p>
<p>As a separate package under a separate GPL2 license are
<code>libcdio_paranoia</code>, and <code>libcdio_cdda</code> libraries for
applications which want to use cdparanoia’s error-correction and
jitter detection.
</p>
<p>The first use of the library in this package are the Video CD
authoring and ripping tools, VCDImager
(<a href="http://vcdimager.org">http://vcdimager.org</a>). See
<a href="http://www.gnu.org/software/libcdio/projects.html">http://www.gnu.org/software/libcdio/projects.html</a> for a list of
projects using <code>libcdio</code>.
</p>
<p>A version of the CD-DA extraction tool cdparanoia,
<a href="http://www.xiph.org/paranoia">http://www.xiph.org/paranoia</a>, and its library which corrects
for CD-ROM jitter are part of the distribution.
</p>
<p>Also included in the libcdio package is a utility program
<code>cd-info</code> which displays CD information: number of tracks,
CD-format and if possible basic information about the format. If
libcddb (<a href="http://libcddb.sourceforge.net">http://libcddb.sourceforge.net</a>) is available, the
<code>cd-info</code> program will display CDDB matches on CD-DA
discs. And if a new enough version of libvcdinfo is available from
the vcdimager project, then <code>cd-info</code> shows basic VCD
information.
</p>
<p>Other utility programs in the libcdio package are:
</p>
<dl compact="compact">
<dt> <code><code>cdda-player</code></code></dt>
<dd>
<p>shows off <code>libcdio</code> audio and CD-ROM control commands. It can
play a track, eject or load media and show the the status of a CD-DA
that is might be currently played via the audio control commands. It
can be run in batch mode or has a simple curses-based interface.
</p>
<p>If libcddb is available or a CD has CD-Text and your CD-ROM drive
supports CD-Text, track/album information about the CD can be shown.
</p>
</dd>
<dt> <code><code>cd-drive</code></code></dt>
<dd>
<p>shows what drivers are available and some basic properties of
cd-drives attached to the system. Media may have to be inserted
in order to get this info. The program also lists out drive capabilities
</p>
</dd>
<dt> <code>cd-read</code></dt>
<dd><p>performs low-level block reading of a CD or CD image
</p>
</dd>
<dt> <code><code>iso-info</code></code></dt>
<dd>
<p>displays ISO-9660 information from an ISO-9660 image. Below is a sample invocation and output.
</p>
<table><tr><td> </td><td><pre class="smallexample">$ 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/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
/:
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/:
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/:
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
</pre></td></tr></table>
</dd>
<dt> <code><code>iso-read</code></code></dt>
<dd>
<p>Extracts files from an ISO-9660 image.
</p>
<p>Below is a sample invocation and output.
</p>
<table><tr><td> </td><td><pre class="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
</pre></td></tr></table>
</dd>
<dt> <code><code>mmc-tool</code></code></dt>
<dd>
<p>a program for issuing some MMC commands
</p>
</dd>
</dl>
<p>Historically, <code>libcdio</code> did not support write access to
drives. In conjunction with additional work in a separate project
<code>libburn</code>, Thomas Schmitt has modified <code>libcdio</code> to enable
sending SCSI write commands on some of the drivers. This enables other
programs like <code>libburn</code> to write to CDs, DVDs and Blu-Ray
discs.
</p>
<p>For the OS drivers which are lacking write access, volunteers are
welcome.
</p>
<hr size="6">
<a name="CD-Formats"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Purpose" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Red-Book" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Purpose" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="CD-Formats-1"></a>
<h1 class="chapter">4. CD Formats</h1>
<p>Much of what I write in this section can be found elsewhere. See for
example <a href="http://www.pctechguide.com/08cd-rom.htm">http://www.pctechguide.com/08cd-rom.htm</a> or
<a href="http://www.pcguide.com/ref/cd/format.htm">http://www.pcguide.com/ref/cd/format.htm</a>
</p>
<p>We give just enough background here to cover Compact Discs and Compact
Disc formats that are handled by this library.
</p>
<p>The Sony and Philips Corporations invented the Compact Disc (CD) in
the early 1980s. The specifications for the layout are often referred
to by the color of the cover on the specification.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Red-Book">4.1 Red Book (CD-DA)</a></td><td> </td><td align="left" valign="top"> Red Book (CD-DA) CD Text, CDDB
</td></tr>
<tr><td align="left" valign="top"><a href="#Yellow-Book">4.2 Yellow Book (CD-ROM Digital Data)</a></td><td> </td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#Green-Book">4.3 Green Book (CD-i)</a></td><td> </td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#White-Book">4.4 White Book (DV, Video CD)</a></td><td> </td><td align="left" valign="top"></td></tr>
</table>
<hr size="6">
<a name="Red-Book"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#CD-Formats" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Text" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Red-Book-_0028CD_002dDA_0029"></a>
<h2 class="section">4.1 Red Book (CD-DA)</h2>
<a name="index-Red-Book"></a>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#CD-Text">4.1.1 CD Text, CD+G</a></td><td> </td><td align="left" valign="top"> CD Text and CD+G
</td></tr>
<tr><td align="left" valign="top"><a href="#CDDB">4.1.2 Internet CD Database (CDDB)</a></td><td> </td><td align="left" valign="top"></td></tr>
</table>
<p>The first type of CD that was produced was the Compact Disc Digital
Audio (CD-DA) or just plain “audio CD”. The specification, ICE 60908
(formerly IEC 908) is commonly called the “Red Book”,
<cite><a href="http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard)">http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard)</a></cite>. Music
CD’s are recorded in this format, which basically allows for around 74
minutes of audio per disc and for that information to be split up into
tracks. Tracks are broken up into "sectors," and each sector contains
up to 2,352 bytes. To play one 44.1 kHz CD-DA sampled audio second, 75
sectors are used.
</p>
<p>The minute/second/frame numbering of sectors or MSF format is based on
the fact that 75 sectors are used in a second of playing of
sound. (And for almost every other CD format and application the MSF
format doesn’t make that much sense).
</p>
<p>In <code>libcdio</code> when you want to read an audio sector, you call
<code>cdio_read_audio_sector()</code> or <code>cdio_read_audio_sectors()</code>.
</p>
<a name="index-subchannel"></a>
<p>In addition to the audio data “channel,” a provision for other
information or <em>subchannel</em> information) can be stored in a
sector. Other subchannels include a Media Catalog Number (also
abbreviated as MCN and sometimes a UPC), or album metadata (also
called CD-Text). Karaoke graphics can also be stored in a format
called <em>CD+G</em>.
</p>
<hr size="6">
<a name="CD-Text"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Red-Book" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#CDDB" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Red-Book" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="CD-Text_002c-CD_002bG"></a>
<h3 class="subsection">4.1.1 CD Text, CD+G</h3>
<a name="index-CD-Text"></a>
<a name="index-CD_002bG"></a>
<p>CD Text is an extension to the CD-DA standard that adds the ability to
album and track metadata (titles, artist/performer names, song
titles) and graphical (e.g. Karaoke) information. For an
alternative way to get album and track metadata see See section <a href="#CDDB">Internet CD Database (CDDB)</a>.
</p>
<p>Information is stored in such a way that it doesn’t interfere with the
normal operation of any CD players or CDROM drives. There are two
different parts of the CD where the data can be stored.
</p>
<p>The first place the information can be recorded is in the R-W sub
codes in the lead-in area of the CD. This information is stored as a
single block of data and is the format. The method for reading this
data from a CDROM drive is covered under the Sony proposal to the MMC
specification. The format of the data is partially covered in the MMC
specification.
</p>
<p>CD Text information is stored in this area. The format that follows
the Interactive Text Transmission System (ITTS) is the same data
transmission standard used by such things as Digital Audio
Broadcasting (DAB), and virtually the same as the data standard for
the MiniDisc.
</p>
<p>The second place the information can be recorded is in the R-W sub
codes in the program area of the CD, giving a data capacity of roughly
31MB. CD+G (CD w/graphics) uses this method.
</p>
<p>The methods for reading this data from a CD-ROM drive were first
covered by the programming specs from the individual drive
manufacturers. In the case of ATAPI drives, the SFF8020 spec covers
the reading of the RW subcodes. Subsequently it has been incorporated
into the MMC specifications.
</p>
<p>Not all drives support reading the RW subcodes from the program
area. However for those that do, <code>libcdio</code> provides a way to get
at this information via <code>cdtext_get()</code> and its friends.
</p>
<p>There is a separate document in this distribution describing CD-Text
information and how it is encoded.
</p>
<hr size="6">
<a name="CDDB"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#CD-Text" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Yellow-Book" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Red-Book" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Internet-CD-Database-_0028CDDB_0029"></a>
<h3 class="subsection">4.1.2 Internet CD Database (CDDB)</h3>
<a name="index-CDDB"></a>
<p>CDDB is an database on the Internet of CD album/track, artist, and
genre information similar to CD Text information. Using track
information (number of tracks and length of the tracks), devices that
have access to the Internet can query for metadata and
contribute information for CD’s where there is no existing
information. When storage is available (such as you’d expect for any
program using <code>libcdio</code>, the information is often saved for
later use when the Internet is not available; people tend to request the
same information since they play the same music via programs.
</p>
<p>Obtaining CD meta information when none is encoded in an audio CD is
useful in media players or making one’s own compilations from audio
CDs.
</p>
<p>There are currently two popular CDDB services on the Internet. The
original database has been renamed Gracenote and is a profit-making
entity. GnuDB (<a href="https://gnudb.org">https://gnudb.org</a> is an open source CD
information resource that is free for developers and the public to
use.
</p>
<p>As there already is an excellent library for handling CDDB libcddb
(<a href="http://libcddb.sourceforge.net">http://libcddb.sourceforge.net</a> we suggest using that. Our
utility program <code>cd-info</code> will make use of it if it is available
and it’s what we use in our applications that need it.
</p>
<hr size="6">
<a name="Yellow-Book"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#CDDB" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#ISO-9660" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Yellow-Book-_0028CD_002dROM-Digital-Data_0029"></a>
<h2 class="section">4.2 Yellow Book (CD-ROM Digital Data)</h2>
<p>The CD-ROM specification or the “Yellow Book” followed a few years
later (Standards ISO/IEC 10149), and describes the extension of CDs
to store computer data, i.e., CD-ROM (Compact Disk Read Only Memory).
</p>
<p>The specification in the Yellow Book defines two modes: Mode 1 and
Mode 2.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#ISO-9660">4.2.1 ISO 9660</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Mode-1">4.2.2 Mode 1 (2048 data bytes per sector)</a></td><td> </td><td align="left" valign="top"> Mode 1 Format
</td></tr>
<tr><td align="left" valign="top"><a href="#Mode-2">4.2.3 Mode 2 (2336 data bytes per sector)</a></td><td> </td><td align="left" valign="top"> Mode 2 Format
</td></tr>
</table>
<hr size="6">
<a name="ISO-9660"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Yellow-Book" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#ISO-9660-Level-1" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Yellow-Book" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="ISO-9660-1"></a>
<h3 class="subsection">4.2.1 ISO 9660</h3>
<a name="index-ISO-9660"></a>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#ISO-9660-Level-1">4.2.1.1 ISO 9660 Level 1</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#ISO-9660-Level-2">4.2.1.2 ISO 9660 Level 2</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#ISO-9660-Level-3">4.2.1.3 ISO 9660 Level 3</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Joliet-Extensions">4.2.1.4 Joliet Extensions</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Rock-Ridge-Extensions">4.2.1.5 Rock Ridge Extensions</a></td><td> </td><td align="left" valign="top">
</td></tr>
</table>
<p>The Yellow Book doesn’t specify how data is to be stored on a CD-ROM.
It was feared that different companies would implement proprietary
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
later adopted as ISO the ISO 9660 standard. This standard is further
broken down into 3 "levels"; the higher the level, the more
permissive.
</p>
<hr size="6">
<a name="ISO-9660-Level-1"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#ISO-9660" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#ISO-9660-Level-2" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#ISO-9660" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="ISO-9660-Level-1-1"></a>
<h4 class="subsubsection">4.2.1.1 ISO 9660 Level 1</h4>
<p>Level 1 ISO 9660 defines names in the 8+3 convention so familiar to
MS-DOS: eight characters for the filename, a period, and then three
characters for the file type, all in upper case. The allowed
characters are A-Z, 0-9, ".", and "_".Level 1 ISO 9660 requires that
files occupy a contiguous range of sectors. This allows a file to be
specified with a start block and a count. The maximum directory depth
is 8. For a table of the characters, see See section <a href="#ISO_002d9660-Character-Sets">ISO-9660 Character Sets</a>.
</p>
<hr size="6">
<a name="ISO-9660-Level-2"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#ISO-9660-Level-1" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#ISO-9660-Level-3" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#ISO-9660" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="ISO-9660-Level-2-1"></a>
<h4 class="subsubsection">4.2.1.2 ISO 9660 Level 2</h4>
<p>Level 2 ISO 9660 allows far more flexibility in filenames, but isn’t
usable on some systems, notably MS-DOS.
</p>
<hr size="6">
<a name="ISO-9660-Level-3"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#ISO-9660-Level-2" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Joliet-Extensions" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#ISO-9660" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="ISO-9660-Level-3-1"></a>
<h4 class="subsubsection">4.2.1.3 ISO 9660 Level 3</h4>
<p>Level 3 ISO-9660 allows non-contiguous files, useful if the file was
written in multiple packets with packet-writing software.
</p>
<p>There have been extensions to the ISO 9660 CD-ROM file
format. One extension is Microsoft’s Joliet specification, designed to
resolve 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.
</p>
<p>Another extension is the Rock Ridge Interchange Protocol (RRIP), which
enables the recording of sufficient information to support POSIX File
System semantics.
</p>
<hr size="6">
<a name="Joliet-Extensions"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#ISO-9660-Level-3" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Rock-Ridge-Extensions" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#ISO-9660" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Joliet-Extensions-1"></a>
<h4 class="subsubsection">4.2.1.4 Joliet Extensions</h4>
<a name="index-Joliet-extensions"></a>
<p>Joliet extensions were an upward-compatible extension to the ISO 9660
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 letters, accented characters, spaces, and various
symbols.
</p>
<p>The way all of this is encoded is by adding a second directory and
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 <em>Primary Volume Descriptor</em> or <em>PVD</em>. The root of the
Joliet-encode filesystem is found in a Supplementary Volume
Descriptor or <em>SVD</em> defined in the ISO 9660 specification. The
SVD structure is almost identical to a PVD with a couple of unused
fields getting used and with the filename encoding changed to UCS-BE.
</p>
<hr size="6">
<a name="Rock-Ridge-Extensions"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Joliet-Extensions" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Mode-1" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#ISO-9660" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Rock-Ridge-Extensions-1"></a>
<h4 class="subsubsection">4.2.1.5 Rock Ridge Extensions</h4>
<a name="index-Rock-Ridge-extensions"></a>
<p>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
they store: XA does <em>not</em> address filename limitations, and the
Rock Ridge extensions don’t indicate if a sector is in Mode 1 or Mode
2 format.
</p>
<p>The Rock Ridge extension makes use of a hook that was defined as part
of the ISO 9660 standard.
</p>
<hr size="6">
<a name="Mode-1"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Rock-Ridge-Extensions" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Mode-2" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Yellow-Book" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Mode-1-_00282048-data-bytes-per-sector_0029"></a>
<h3 class="subsection">4.2.2 Mode 1 (2048 data bytes per sector)</h3>
<a name="index-Mode-1"></a>
<p>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 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
cannot tolerate the loss of a handful of bits now and then, the way
audio CDs can.
</p>
<p>In <code>libcdio</code>, when you want to read a mode1
sector you call the <code>cdio_read_mode1_sector()</code> or
<code>cdio_read_mode1_sectors()</code>.
</p>
<hr size="6">
<a name="Mode-2"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Mode-1" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Green-Book" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Yellow-Book" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Mode-2-_00282336-data-bytes-per-sector_0029"></a>
<h3 class="subsection">4.2.3 Mode 2 (2336 data bytes per sector)</h3>
<a name="index-Mode-2"></a>
<p>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; 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, Video CD, and Sony’s PlayStation.
</p>
<p>In <code>libcdio</code> when you want to read a mode1
sector you call the <code>cdio_read_mode2_sector()</code> or
<code>cdio_read_mode2_sectors()</code>.
</p>
<hr size="6">
<a name="Green-Book"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Mode-2" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#White-Book" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Green-Book-_0028CD_002di_0029"></a>
<h2 class="section">4.3 Green Book (CD-i)</h2>
<a name="index-Green-Book"></a>
<p>This was a CD-ROM format developed by Philips for CD-i (an obsolete
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.
</p>
<p>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 the White book
CD-ROM which draws on this specification.
</p>
<hr size="6">
<a name="White-Book"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Green-Book" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Formats" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#CD-Image-Formats" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#General-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="White-Book-_0028DV_002c-Video-CD_0029"></a>
<h2 class="section">4.4 White Book (DV, Video CD)</h2>
<a name="index-Green-Book-1"></a>
<p>The White Book was released by Sony, Philips, Matsushita, and JVC in
1993, defines the Video CD specification. The White Book is also known
as Digital Video (DV).
</p>
<p>A Video CD contains one data track recorded in CD-ROM XA Mode 2 Form