| 1 |
This directory contains some simple examples of the use of the libcdio |
| 2 |
library. |
| 3 |
|
| 4 |
One might also possibly find useful C code among the regression tests |
| 5 |
(directory test), e.g. testbincue.c, testdefault.c, testiso9660.c, |
| 6 |
testparanoia.c, or testtoc.c |
| 7 |
|
| 8 |
Larger more-complicated examples are the cd-drive, cd-info, cd-read, |
| 9 |
cdda-player, iso-info and iso-read programs in the src directory. |
| 10 |
|
| 11 |
And going further there's the cd-paranoia program (in |
| 12 |
src/cd-paranoia), and "real-world' code in the xine VCD plugin, or the |
| 13 |
vlc CD-DA plugin which are part of those distributions. |
| 14 |
|
| 15 |
In some cases you may have to make small changes to compile these |
| 16 |
programs. For example, compiling using Solaris's C compiler with |
| 17 |
largefile support on a 64-bit system, may require changing C headers. |
| 18 |
|
| 19 |
Descriptions of the programs in this example directory are as |
| 20 |
follows... |
| 21 |
|
| 22 |
audio.c: Sample program to show audio controls. |
| 23 |
|
| 24 |
cdchange.c: A program to test if a CD has been changed since the last |
| 25 |
change test. |
| 26 |
|
| 27 |
cdio-eject.c: a stripped-down "eject" command to open or close a CDROM |
| 28 |
tray |
| 29 |
|
| 30 |
cdtext.c: A program to show CD-Text and CD disc mode info. |
| 31 |
|
| 32 |
cdtext-raw.c: A program to show CD-Text parsing from binary files. |
| 33 |
|
| 34 |
device.c: A program to show drivers installed and what the default |
| 35 |
CD-ROM drive is. See also corresponding C++ programs of similar |
| 36 |
names. |
| 37 |
|
| 38 |
discid.c: http://sourceforge.net/projects/discid/ using libcdio: |
| 39 |
a small program to calculate the disc-ID for audio |
| 40 |
compact discs. The disc-ID can be used to query info |
| 41 |
(tracks, title, interpret) about compact audio discs from |
| 42 |
a CDDB-Server. |
| 43 |
|
| 44 |
drives.c: A program to show drivers installed and what the default |
| 45 |
CD-ROM drive is and what CD drives are available. |
| 46 |
|
| 47 |
eject.c: A program eject a CD from a CD-ROM drive and then close the door |
| 48 |
again. |
| 49 |
|
| 50 |
extract.c: Extract the full contents of either an UDF or ISO9660 image file. |
| 51 |
|
| 52 |
isofile.c: A program to show using libiso9660 to extract a file from an |
| 53 |
ISO-9660 image. |
| 54 |
|
| 55 |
isofile2.c: A program to show using libiso9660 to extract a file |
| 56 |
from a CDRWIN cue/bin CD image. |
| 57 |
|
| 58 |
isofuzzy.c : A program showing fuzzy ISO-9660 detection/reading. |
| 59 |
|
| 60 |
isolist.c: A program to show using libiso9660 to list files in a |
| 61 |
directory of an ISO-9660 image and give basic iso9660 |
| 62 |
information. |
| 63 |
|
| 64 |
isolsn.c: A program to show using libiso9660 to get the file |
| 65 |
path for a given LSN. |
| 66 |
|
| 67 |
mmc1.c: A program to show issuing a simple MMC command (INQUIRY). |
| 68 |
|
| 69 |
mmc2.c: A more involved MMC command to list features from |
| 70 |
a MMC GET_CONFIGURATION command. |
| 71 |
|
| 72 |
mmc2a.c: Show MODE_SENSE page 2A paramaters: |
| 73 |
CD/DVD Capabilities and Mechanical Status Page |
| 74 |
|
| 75 |
mmc3.c Another simple program to show use of SCSI MMC interface. |
| 76 |
Is basically the the libdio scsi_mmc_get_hwinfo() routine. |
| 77 |
|
| 78 |
paranoia: A program to show using CD-DA paranoia (a library for jitter |
| 79 |
detection and audio-read error correction). This program uses |
| 80 |
an interface compatible (mostly) with cdparanoia. It looks for |
| 81 |
a CD-ROM with an audio CD in it and rips up to the first 300 |
| 82 |
sectors of track 1 to file track01s.wav. |
| 83 |
|
| 84 |
paranoia2: Another program to show using CD-DA paranoia using a more |
| 85 |
libcdio-oriented initialization. Probably more suited to |
| 86 |
things that otherwise use libcdio such as media players |
| 87 |
(e.g. for getting CDDB or CD-Text info) |
| 88 |
|
| 89 |
sample3.c: A simple program to show the use of cdio_guess_cd_type(). |
| 90 |
Figure out the kind of CD image we've got. |
| 91 |
|
| 92 |
sample4.c: A slightly improved sample3 program: we handle cdio logging |
| 93 |
and take an optional CD-location. |
| 94 |
|
| 95 |
tracks.c: A program to list track numbers and logical sector |
| 96 |
numbers of a Compact Disc using libcdio. |
| 97 |
|
| 98 |
udf1.c: A program to show using libudf to list files in a directory of |
| 99 |
an UDF image. |
| 100 |
|
| 101 |
udf2.c: A program to show using libudf to extract a file from |
| 102 |
an UDF image. |
| 103 |
|
| 104 |
udffile.c A program to show using libudf to extract a file. |
| 105 |
|
| 106 |
Many of the above programs can be compiled in C++. See that directory |
| 107 |
for C++ examples which include some of the above. |
| 108 |
|
| 109 |
Some of these programs are also used in testing. When this occurs, |
| 110 |
output is prepended with -- so it can be filtered out by Ruby program |
| 111 |
make-check-filter.rb when running "make check-short". |