[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Libcdio-devel] libcdio release around the ides of March? (March 15)
From: |
Huang William |
Subject: |
RE: [Libcdio-devel] libcdio release around the ides of March? (March 15) |
Date: |
Mon, 3 Mar 2008 00:51:13 -0800 |
Hi,
I would like to contribute the enclosed to diffs for lib/driver/image/nrg.c and
src/cd-paranoia/cd-paranoia.c so I can rip CDDA tracks contained in NRG image
files without using a CD drive emulator. The nrg.c needs to recognize the size
of sectors to be 2352 (98 * 24) bytes when NRG CUEX says that a track is of
audio type. The cd-paranoia.c needs an option (I choose -N tentatively) for
users to pass the NRG image file name to the tool. I found the cd-paranoia.c
statement info_file=strdup(info_file); illogical but did not touch it. Please
let me know how I should proceed.
Thanks,
Chekgiau Ng
-------
Index: nrg.c
===================================================================
RCS file: /sources/libcdio/libcdio/lib/driver/image/nrg.c,v
retrieving revision 1.24
diff -c -r1.24 nrg.c
*** nrg.c 27 Feb 2006 10:23:52 -0000 1.24
--- nrg.c 3 Mar 2008 08:35:02 -0000
***************
*** 311,317 ****
sec_count = UINT32_FROM_BE (_entries[idx + 1].lsn);
! _register_mapping (p_env, lsn, sec_count*2,
(lsn+CDIO_PREGAP_SECTORS) * M2RAW_SECTOR_SIZE,
M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true);
}
--- 311,322 ----
sec_count = UINT32_FROM_BE (_entries[idx + 1].lsn);
! if ((_entries[idx].type & 0x0f) == 0x01)
! _register_mapping (p_env, lsn, sec_count - lsn,
! (lsn + CDIO_PREGAP_SECTORS)*CDIO_CD_FRAMESIZE_RAW,
! CDIO_CD_FRAMESIZE_RAW, TRACK_FORMAT_AUDIO, true);
! else
! _register_mapping (p_env, lsn, sec_count*2,
(lsn+CDIO_PREGAP_SECTORS) * M2RAW_SECTOR_SIZE,
M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true);
}
***************
*** 360,366 ****
lsn = UINT32_FROM_BE (_entries[idx].lsn);
sec_count = UINT32_FROM_BE (_entries[idx + 1].lsn);
! _register_mapping (p_env, lsn, sec_count - lsn,
(lsn + CDIO_PREGAP_SECTORS)*M2RAW_SECTOR_SIZE,
M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true);
}
--- 365,376 ----
lsn = UINT32_FROM_BE (_entries[idx].lsn);
sec_count = UINT32_FROM_BE (_entries[idx + 1].lsn);
! if ((_entries[idx].type & 0x0f) == 0x01)
! _register_mapping (p_env, lsn, sec_count - lsn,
! (lsn + CDIO_PREGAP_SECTORS)*CDIO_CD_FRAMESIZE_RAW,
! CDIO_CD_FRAMESIZE_RAW, TRACK_FORMAT_AUDIO, true);
! else
! _register_mapping (p_env, lsn, sec_count - lsn,
(lsn + CDIO_PREGAP_SECTORS)*M2RAW_SECTOR_SIZE,
M2RAW_SECTOR_SIZE, TRACK_FORMAT_XA, true);
}
Index: cd-paranoia.c
===================================================================
RCS file: /sources/libcdio/libcdio/src/cd-paranoia/cd-paranoia.c,v
retrieving revision 1.34
diff -c -r1.34 cd-paranoia.c
*** cd-paranoia.c 29 Feb 2008 11:34:15 -0000 1.34
--- cd-paranoia.c 3 Mar 2008 08:35:43 -0000
***************
*** 547,553 ****
}
#endif /* !TRACE_PARANOIA */
! const char *optstring = "aBcCd:efg:hi:l:m:n:o:O:pqQrRsS:Tt:VvwWx:XYZz::";
struct option options [] = {
{"abort-on-skip", no_argument, NULL, 'X'},
--- 547,553 ----
}
#endif /* !TRACE_PARANOIA */
! const char *optstring = "aBcCd:efg:hi:l:m:N:n:o:O:pqQrRsS:Tt:VvwWx:XYZz::";
struct option options [] = {
{"abort-on-skip", no_argument, NULL, 'X'},
***************
*** 562,567 ****
--- 562,568 ----
{"force-generic-device", required_argument, NULL, 'g'},
{"force-read-speed", required_argument, NULL, 'S'},
{"force-search-overlap", required_argument, NULL, 'o'},
+ {"load-nrg-image", required_argument, NULL, 'N'},
{"help", no_argument, NULL, 'h'},
{"log-summary", required_argument, NULL, 'l'},
{"mmc-timeout", required_argument, NULL, 'm'},
***************
*** 592,597 ****
--- 593,599 ----
static char *span = NULL;
static char *force_cdrom_device = NULL;
static char *info_file = NULL;
+ static char *nrg_image_file = NULL;
#define free_and_null(p) \
free(p); \
***************
*** 619,624 ****
--- 621,627 ----
free_and_null(force_cdrom_device);
free_and_null(span);
free_and_null(info_file);
+ free_and_null(nrg_image_file);
if(logfile && logfile != stdout) {
fclose(logfile);
logfile = NULL;
***************
*** 686,691 ****
--- 689,696 ----
int search=0;
int c,long_option_index;
+ CdIo_t *p_cdio=NULL;
+
atexit(cleanup);
while((c=getopt_long(argc,argv,optstring,options,&long_option_index))!=EOF){
***************
*** 756,761 ****
--- 761,770 ----
case 'n':
get_int_arg(c, &force_cdrom_sectors);
break;
+ case 'N':
+ if(nrg_image_file)free(nrg_image_file);
+ nrg_image_file=strdup(optarg);
+ break;
case 'o':
get_int_arg(c, &force_cdrom_overlap);
break;
***************
*** 861,871 ****
}else
if (argv[optind]) span=strdup(argv[optind]);
report(PARANOIA_VERSION);
/* Query the cdrom/disc; we may need to override some settings */
! if(force_cdrom_device)
d=cdda_identify(force_cdrom_device,verbose,NULL);
else {
driver_id_t driver_id;
--- 870,890 ----
}else
if (argv[optind]) span=strdup(argv[optind]);
+ if(nrg_image_file) {
+ p_cdio=cdio_open_nrg(nrg_image_file);
+ if(!p_cdio) {
+ fprintf(stderr,"Cannot open image file %s as source.", nrg_image_file);
+ exit(1);
+ }
+ }
+
report(PARANOIA_VERSION);
/* Query the cdrom/disc; we may need to override some settings */
! if(p_cdio)
! d=cdio_cddap_identify_cdio(p_cdio,verbose,NULL);
! else if(force_cdrom_device)
d=cdda_identify(force_cdrom_device,verbose,NULL);
else {
driver_id_t driver_id;
> From: address@hidden
> Date: Thu, 28 Feb 2008 18:01:19 -0500
> To: address@hidden
> CC: address@hidden
> Subject: [Libcdio-devel] libcdio release around the ides of March? (March 15)
>
> I've been thinking about making another release to clear out the
> security bugs that have been reported and fixed in CVS. Also, it might
> pave the way for a GPL 2 to GPL 3 down the line. (Previously the
> observation was made that one shouldn't tie security fixes with a
> license change).
>
> A couple of people suggested a possibility of some other additions to
> libcdio. For example Robert William Fuller suggested adding gap
> detection via MMC commands, but I gather this has all been rolled into
> cued, right?
>
> So right now unless there's reason not to, I'm shooting for a March
> 15th release. Comments?
>
>
_________________________________________________________________
用部落格分享照片、影音、趣味小工具和最愛清單,盡情秀出你自己 — Windows Live Spaces
http://spaces.live.com/
- RE: [Libcdio-devel] libcdio release around the ides of March? (March 15),
Huang William <=