+ std::string temp_file_name(const temp_dir & dir,
+ std::string base_name,
+ unsigned index=0)
+ {
+ if (index != 0)
+ {
+ std::size_t index_pos = base_name.find("%3d");
+ assert(index_pos != std::string::npos);
+ base_name[index_pos] = '0' + index / 100;
+ base_name[index_pos + 1] = '0' + (index / 10) % 10;
+ base_name[index_pos + 2] = '0' + index % 10;
+ }
+
+ return Glib::build_filename(dir.get_name(), base_name);
+ }
+
+ // We would like to use just a single frame for the menu but this
+ // seems not to be legal or compatible. The minimum length of a
+ // cell is 0.4 seconds but I've seen a static menu using 12 frames
+ // on a commercial "PAL" disc so let's use 12 frames regardless.
+ unsigned menu_duration_frames(const video::frame_params & params)
+ {
+ return 12;
+ }
+ double menu_duration_seconds(const video::frame_params & params)
+ {
+ return double(menu_duration_frames(params))
+ * double(params.rate_numer)
+ / double(params.rate_denom);
+ }