diff -u -r -p /home/fab/Bureau/cdrtools-2.01.01/mkisofs/mkisofs.c /home/fab/Bureau/cdrtools-2.01.01-patched/mkisofs/mkisofs.c --- /home/fab/Bureau/cdrtools-2.01.01/mkisofs/mkisofs.c 2008-06-09 19:16:26.000000000 +0200 +++ /home/fab/Bureau/cdrtools-2.01.01-patched/mkisofs/mkisofs.c 2008-06-09 19:59:01.000000000 +0200 @@ -296,6 +296,7 @@ int create_udfsymlinks = 1; /* include s #ifdef DVD_VIDEO int dvd_video = 0; +int dvd_audio = 0; #endif #ifdef SORTING @@ -930,6 +931,8 @@ LOCAL const struct mki_option mki_option #ifdef DVD_VIDEO {{"dvd-video", &dvd_video }, "Generate DVD-Video compliant UDF file system"}, + {{"dvd-audio", &dvd_audio }, + "Generate DVD-Audio compliant UDF file system"}, #endif {{"uid*", &uid_str }, @@ -1274,6 +1277,7 @@ susage(excode) error(" -print-size Print estimated filesystem size and exit\n"); error(" -UDF Generate UDF file system\n"); error(" -dvd-video Generate DVD-Video compliant UDF file system\n"); + error(" -dvd-audio Generate DVD-Audio compliant UDF file system\n"); error(" -iso-level LEVEL Set ISO9660 level (1..3) or 4 for ISO9660 v 2\n"); error(" -V ID, -volid ID Set Volume ID\n"); error(" -graft-points Allow to use graft points for filenames\n"); @@ -1949,7 +1953,7 @@ args_ok: comerrno(EX_BAD, "Illegal UCS Level %d, use 1..3.\n", ucs_level); #ifdef DVD_VIDEO - if (dvd_video) { + if ((dvd_video) || (dvd_audio)) { if (!use_udf) rationalize_udf++; } @@ -2203,9 +2207,9 @@ args_ok: * XXX This is a hack until we have a decent separate name handling * XXX for UDF filenames. */ - if (dvd_video && use_Joliet) { + if ((dvd_video || dvd_audio) && use_Joliet) { use_Joliet = 0; - error("Warning: Disabling Joliet support for DVD-Video.\n"); + error("Warning: Disabling Joliet support for DVD-Video/DVD-Audio.\n"); } if (use_udf && !use_Joliet) jlen = 255; diff -u -r -p /home/fab/Bureau/cdrtools-2.01.01/mkisofs/mkisofs.h /home/fab/Bureau/cdrtools-2.01.01-patched/mkisofs/mkisofs.h --- /home/fab/Bureau/cdrtools-2.01.01/mkisofs/mkisofs.h 2008-06-09 19:16:26.000000000 +0200 +++ /home/fab/Bureau/cdrtools-2.01.01-patched/mkisofs/mkisofs.h 2008-06-09 19:17:32.000000000 +0200 @@ -383,6 +383,7 @@ extern int jlen; /* selected maximum Jo #ifdef DVD_VIDEO extern int dvd_video; +extern int dvd_audio; #endif /* DVD_VIDEO */ diff -u -r -p /home/fab/Bureau/cdrtools-2.01.01/mkisofs/tree.c /home/fab/Bureau/cdrtools-2.01.01-patched/mkisofs/tree.c --- /home/fab/Bureau/cdrtools-2.01.01/mkisofs/tree.c 2008-06-09 19:16:26.000000000 +0200 +++ /home/fab/Bureau/cdrtools-2.01.01-patched/mkisofs/tree.c 2008-06-09 19:17:32.000000000 +0200 @@ -1872,7 +1872,7 @@ insert_file_entry(this_dir, whole_path, * sort_matches would slow things to a crawl. */ - if (dvd_video) { + if (dvd_video || dvd_audio) { s_entry->sort = assign_dvd_weights(s_entry->name, this_dir, s_entry->sort); /* * Turn on sorting if necessary, regardless of cmd-line options diff -u -r -p /home/fab/Bureau/cdrtools-2.01.01/mkisofs/udf.c /home/fab/Bureau/cdrtools-2.01.01-patched/mkisofs/udf.c --- /home/fab/Bureau/cdrtools-2.01.01/mkisofs/udf.c 2008-06-09 19:16:26.000000000 +0200 +++ /home/fab/Bureau/cdrtools-2.01.01-patched/mkisofs/udf.c 2008-06-09 19:17:32.000000000 +0200 @@ -2150,6 +2150,21 @@ struct output_fragment udf_padend_avdp_f * The same thing is done for AUDIO_TS files, except in the 20000 range * instead of the 10000 range. * + * /AUDIO_TS/AUDIO_PP.IFO 21210 + * /AUDIO_TS/AUDIO_TS.IFO 21209 + * /AUDIO_TS/AUDIO_TS.VOB 21208 + * /AUDIO_TS/AUDIO_TS.BUP 21200 + * /AUDIO_TS/AUDIO_SV.IFO 21199 + * /AUDIO_TS/AUDIO_SV.VOB 21198 + * /AUDIO_TS/AUDIO_SV.BUP 21188 + * /AUDIO_TS/ATS_01_0.IFO 21187 + * /AUDIO_TS/ATS_01_0.VOB 21186 + * : : + * /AUDIO_TS/ATS_01_9.VOB 21177 + * /AUDIO_TS/ATS_01_0.BUP 21176 + * : : + * /AUDIO_TS/ATS_99_0.BUP 20000 + * * Question: what about JACKET_P files? * * Answer: At least as far as I know :) @@ -2168,6 +2183,7 @@ assign_dvd_weights(name, this_dir, val) int val; { int ts_number; + int amg_number; int segment; int audio; @@ -2175,15 +2191,27 @@ assign_dvd_weights(name, this_dir, val) return (val); if (memcmp(name, "VIDEO_TS", 8) == 0) { + amg_number = 0; ts_number = 0; audio = 0; } else if (memcmp(name, "VTS_", 4) == 0) { + amg_number = 0; ts_number = 1; audio = 0; + } else if (memcmp(name, "AUDIO_PP", 8) == 0) { + amg_number = 2; + ts_number = 0; + audio = 1; } else if (memcmp(name, "AUDIO_TS", 8) == 0) { + amg_number = 1; + ts_number = 0; + audio = 1; + } else if (memcmp(name, "AUDIO_SV", 8) == 0) { + amg_number = 0; ts_number = 0; audio = 1; } else if (memcmp(name, "ATS_", 4) == 0) { + amg_number = 0; ts_number = 1; audio = 1; } else { @@ -2191,7 +2219,8 @@ assign_dvd_weights(name, this_dir, val) } if (this_dir->parent != root || - strcmp(this_dir->de_name, "VIDEO_TS") != 0) + ((strcmp(this_dir->de_name, "VIDEO_TS") != 0) && + (strcmp(this_dir->de_name, "AUDIO_TS") != 0))) return (val); if (ts_number == 0) { @@ -2209,11 +2238,11 @@ assign_dvd_weights(name, this_dir, val) } if (strcmp(name+8, audio ? ".AOB" : ".VOB") == 0) { - return (audio * 10000 - ts_number * 12 - segment + 11198); + return (audio * 10000 - ts_number * 12 + amg_number * 10 - segment + 11198); } else if (strcmp(name+8, ".IFO") == 0) { - return (audio * 10000 - ts_number * 12 + 11199); + return (audio * 10000 - ts_number * 12 + amg_number * 10 + 11199); } else if (strcmp(name+8, ".BUP") == 0) { - return (audio * 10000 - ts_number * 12 + 11188); + return (audio * 10000 - ts_number * 12 + amg_number * 10 + 11188); } else { return (val); } diff -u -r -p /home/fab/Bureau/cdrtools-2.01.01/mkisofs/write.c /home/fab/Bureau/cdrtools-2.01.01-patched/mkisofs/write.c --- /home/fab/Bureau/cdrtools-2.01.01/mkisofs/write.c 2008-06-09 19:16:26.000000000 +0200 +++ /home/fab/Bureau/cdrtools-2.01.01-patched/mkisofs/write.c 2008-06-09 20:08:28.000000000 +0200 @@ -604,6 +604,7 @@ write_files(outfile) #ifndef DVD_VIDEO #define dvd_video 0 +#define dvd_audio 0 #endif #ifndef APPLE_HYB @@ -612,7 +613,7 @@ write_files(outfile) #if defined(APPLE_HYB) || defined(DVD_VIDEO) - if ((apple_hyb && !donotwrite_macpart) || dvd_video) { + if ((apple_hyb && !donotwrite_macpart) || dvd_video || dvd_audio) { /* * we may have to pad out ISO files to work with HFS * clump sizes @@ -1009,7 +1010,7 @@ sort_file_addresses() * Shouldn't this be done for every type of sort? Otherwise * we will loose every pad info we add if we sort the files */ - if (dvd_video) { + if (dvd_video || dvd_audio) { start_extent += dwpnt->pad; } #endif /* DVD_VIDEO */