void
Controls::add_clicked ()
{
- shared_ptr<Content> sel = selected_content ();
+ shared_ptr<Content> sel = selected_content()->clone();
DCPOMATIC_ASSERT (sel);
_film->examine_and_add_content (sel);
bool const ok = display_progress (_("DCP-o-matic"), _("Loading DCP"));
if (!ok || !report_errors_from_last_job(this)) {
return;
}
- if (_film->content().size() == 1) {
- /* Put 1 frame of black at the start so when we seek to 0 we don't see anything */
- sel->set_position (DCPTime::from_frames(1, _film->video_frame_rate()));
- }
add_content_to_list (sel, _current_spl_view);
setup_sensitivity ();
}
wxListItem it;
it.SetId(N);
it.SetColumn(0);
- DCPTime length = content->length_after_trim ();
+ DCPTime length = content->length_after_trim (_film);
int seconds = length.seconds();
int minutes = seconds / 60;
seconds -= minutes * 60;
try {
shared_ptr<Content> content;
if (is_directory(*i) && (is_regular_file(*i / "ASSETMAP") || is_regular_file(*i / "ASSETMAP.xml"))) {
- content.reset (new DCPContent(_film, *i));
- } else if (i->path().extension() == ".mp4") {
- content = content_factory(_film, *i).front();
+ content.reset (new DCPContent(*i));
+ } else if (i->path().extension() == ".mp4" || i->path().extension() == ".ecinema") {
+ content = content_factory(*i).front();
}
if (content) {