X-Git-Url: https://git.decadent.org.uk/gitweb/?p=videolink.git;a=blobdiff_plain;f=generate_dvd.cpp;h=5e129d4235b794fb0d68f54440f68c1976b59909;hp=6144ef5ba0b78e06a2d5568154f03ca1eeaa0e7d;hb=2f3abf1d90ae5f83d6d48a0c5e451397e48a4be0;hpb=3fb06bde35cdcd9864329517f4548e1c5f0ad97c diff --git a/generate_dvd.cpp b/generate_dvd.cpp index 6144ef5..5e129d4 100644 --- a/generate_dvd.cpp +++ b/generate_dvd.cpp @@ -8,6 +8,7 @@ #include "dvd.hpp" #include "generate_dvd.hpp" +#include "xml_utils.hpp" dvd_contents::menu::menu() : vob_temp(new temp_file("webdvd-vob-")) @@ -159,8 +160,10 @@ void generate_dvd(const dvd_contents & contents, << 1 + menu_num + (1 + button_num) * button_mult << "; jump title " << 1 + target.index; - if (target.sub_index) - file << " chapter " << target.sub_index; + // FIXME: Here we should check target.sub_index and + // jump to a specific chapter if it is non-zero. + // However, we can't jump directly to chapters from + // the VMGM. file << ";"; } @@ -193,8 +196,22 @@ void generate_dvd(const dvd_contents & contents, " \n" " \n" // Record calling location. - "
 g12 = g1; 
\n" - << contents.titles[title_num].vob_list << + "
 g12 = g1; 
\n"; + + for (vob_list::const_iterator it = contents.titles[title_num].begin(), + end = contents.titles[title_num].end(); + it != end; + ++it) + { + file << " chapters.empty()) + file << " chapters='" << xml_escape(it->chapters) << "'"; + if (!it->pause.empty()) + file << " pause='" << xml_escape(it->pause) << "'"; + file << "/>\n"; + } + + file << // If the menu location has not been changed during // the title, set the location to be the following // button in the menu. In any case, return to some