X-Git-Url: https://git.decadent.org.uk/gitweb/?p=videolink.git;a=blobdiff_plain;f=generate_dvd.cpp;h=371894d41edc23abd7ac34abee8337fd52b64711;hp=45e9ca6d8a3f2d35583c88b763f26785baf3a6d1;hb=HEAD;hpb=fdb477d14a28e89299a66328bd0f4f723098c508 diff --git a/generate_dvd.cpp b/generate_dvd.cpp index 45e9ca6..371894d 100644 --- a/generate_dvd.cpp +++ b/generate_dvd.cpp @@ -1,6 +1,7 @@ -// Copyright 2005-6 Ben Hutchings . +// Copyright 2005-8 Ben Hutchings . // See the file "COPYING" for licence details. +#include #include #include #include @@ -10,6 +11,10 @@ #include #include +#include +#include +#include + #include #include #include @@ -211,11 +216,15 @@ void dvd_generator::generate_menu_vob(unsigned index, } } } + // Pad vertically to even y coordinates since dvdauthor claims + // odd values may result in incorrect display. + // XXX This may cause overlappping where it wasn't previously + // a problem. spumux_file << " " << temp_file_name(temp_dir_, "menu-%3d.mpeg", 1 + index); + << " | spumux -v0 -mdvd " << spumux_name << " > " << output_name; std::string command(command_stream.str()); const char * argv[] = { "/bin/sh", "-c", command.c_str(), 0 @@ -291,7 +283,9 @@ void dvd_generator::generate_menu_vob(unsigned index, sigc::slot(), 0, 0, &command_result); - if (command_result != 0) + struct stat stat_buf; + if (command_result != 0 || stat(output_name.c_str(), &stat_buf) != 0 + || stat_buf.st_size == 0) throw std::runtime_error("spumux pipeline failed"); } @@ -366,14 +360,16 @@ void dvd_generator::generate(const std::string & output_dir) const const bool have_real_menus = titleset_num * dvdauthor_anonymous_menus_max < menus_.size(); - file << " <" << outer_element_name << ">\n" - << " \n"; + file << " <" << outer_element_name << ">\n" << + " \n" + "