sample8 program shows CD-TEXT and Disc mode info.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
$Id: README,v 1.4 2004/01/29 04:22:49 rocky Exp $
|
$Id: README,v 1.5 2004/07/24 06:11:30 rocky Exp $
|
||||||
|
|
||||||
This directory contains some simple examples of the use of the libcdio
|
This directory contains some simple examples of the use of the libcdio
|
||||||
library.
|
library.
|
||||||
@@ -24,9 +24,11 @@ sample5.c: A program to show drivers installed and what the default
|
|||||||
CD-ROM drive is and what CD drives are available.
|
CD-ROM drive is and what CD drives are available.
|
||||||
|
|
||||||
sample6.c: A simple program to show using libiso9660 to extract a file
|
sample6.c: A simple program to show using libiso9660 to extract a file
|
||||||
from a cue/bin CD-IMAGE.
|
from a CDRWIN cue/bin CD image.
|
||||||
|
|
||||||
sample7.c: A program to show using libiso9660 to extract a file from an
|
sample7.c: A program to show using libiso9660 to extract a file from an
|
||||||
ISO-9660 image.
|
ISO-9660 image.
|
||||||
|
|
||||||
|
sample8.c: A program to show CD-TEXT and CD disc mode info.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: sample8.c,v 1.6 2004/07/21 11:01:23 rocky Exp $
|
$Id: sample8.c,v 1.7 2004/07/24 06:11:30 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ print_cdtext_track_info(CdIo *cdio, track_t i_track, const char *message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_cdtext_info(CdIo *cdio, track_t i_tracks, track_t i_first_track) {
|
print_disc_info(CdIo *cdio, track_t i_tracks, track_t i_first_track) {
|
||||||
track_t i_last_track = i_first_track+i_tracks;
|
track_t i_last_track = i_first_track+i_tracks;
|
||||||
discmode_t cd_discmode = cdio_get_discmode(cdio);
|
discmode_t cd_discmode = cdio_get_discmode(cdio);
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ main(int argc, const char *argv[])
|
|||||||
} else {
|
} else {
|
||||||
i_first_track = cdio_get_first_track_num(cdio);
|
i_first_track = cdio_get_first_track_num(cdio);
|
||||||
i_tracks = cdio_get_num_tracks(cdio);
|
i_tracks = cdio_get_num_tracks(cdio);
|
||||||
print_cdtext_info(cdio, i_tracks, i_first_track);
|
print_disc_info(cdio, i_tracks, i_first_track);
|
||||||
cdio_destroy(cdio);
|
cdio_destroy(cdio);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ main(int argc, const char *argv[])
|
|||||||
printf("Couldn't find CD\n");
|
printf("Couldn't find CD\n");
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
print_cdtext_info(cdio, i_tracks, i_first_track);
|
print_disc_info(cdio, i_tracks, i_first_track);
|
||||||
}
|
}
|
||||||
|
|
||||||
cdio_destroy(cdio);
|
cdio_destroy(cdio);
|
||||||
|
|||||||
Reference in New Issue
Block a user