1 // Copyright 2005-6 Ben Hutchings <ben@decadentplace.org.uk>.
2 // See the file "COPYING" for licence details.
4 #ifndef INC_GENERATE_DVD_HPP
5 #define INC_GENERATE_DVD_HPP
10 #include <boost/shared_ptr.hpp>
12 #include "temp_file.hpp"
13 #include "vob_list.hpp"
15 // Description of menus and titles to go on a DVD.
19 enum pgc_type { unknown_pgc, menu_pgc, title_pgc };
21 // Reference to some PGC (program chain).
24 explicit pgc_ref(pgc_type type = unknown_pgc,
27 : type(type), index(index), sub_index(sub_index)
29 bool operator==(const pgc_ref & other) const
31 return type == other.type && index == other.index;
33 bool operator!=(const pgc_ref & other) const
35 return !(*this == other);
38 pgc_type type; // Menu or title reference?
39 unsigned index; // Menu or title index (within resp. vector)
40 unsigned sub_index; // Button or chapter number (1-based; 0 if
41 // unspecified; not compared!)
49 // Temporary file in which the menu VOB should be generated.
50 // This is created as an empty file and then closed.
51 boost::shared_ptr<temp_file> vob_temp;
53 // References to the menus and titles that the menu buttons
54 // are meant to link to, in the same order as the buttons.
55 std::vector<pgc_ref> entries;
58 std::vector<menu> menus;
59 std::vector<vob_list> titles;
62 // Use dvdauthor to generate a DVD filesystem with the given contents.
63 void generate_dvd(const dvd_contents & contents,
64 const std::string & output_dir);
66 #endif // !INC_GENERATE_DVD_HPP