X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fedl.C;h=55ca9a2947b4d933b5f8edfd305eece56cd88b47;hp=49d4cecfc72a14b6197c6eef62e887b8ad09ec9a;hb=f007a674187f11ab58a5aebfe1eec27a90398bcb;hpb=62709d0558a8c4366f75ae39f5f98e759e19fcfc diff --git a/cinelerra-5.1/cinelerra/edl.C b/cinelerra-5.1/cinelerra/edl.C index 49d4cecf..55ca9a29 100644 --- a/cinelerra-5.1/cinelerra/edl.C +++ b/cinelerra-5.1/cinelerra/edl.C @@ -580,21 +580,38 @@ int EDL::copy(double start, double end, int all, return 0; } -int EDL::to_nested(EDL *nested_edl) +EDL *EDL::get_nested(EDL *nested_edl, const char *path) { -// Keep frame rate, sample rate, and output size unchanged. -// These parameters would revert the project if VWindow displayed an asset -// of different size than the project. + for( int i=0; ipath) ) return dst; + } + return new_nested(nested_edl, path); +} + +EDL *EDL::new_nested(EDL *nested_edl, const char *path) +{ + EDL *new_edl = new EDL; // no parent for nested clip + new_edl->create_objects(); + new_edl->copy_session(this); + new_edl->create_nested(nested_edl, path); + return new_edl; +} +void EDL::create_nested(EDL *nested_edl, const char *path) +{ + set_path(path); + strcpy(local_session->clip_title, path); +// save a ref to nested edl for garbage delete + EDL *nest = clips.get_copy(nested_edl); +// Keep frame rate, sample rate, and output size unchanged. // Nest all video & audio outputs session->video_tracks = 1; - session->audio_tracks = nested_edl->session->audio_channels; + session->audio_tracks = nest->session->audio_channels; create_default_tracks(); - insert_asset(0, nested_edl, 0, 0, 0); - return 0; + insert_asset(0, nest, 0, 0, 0); } - void EDL::retrack() { int min_w = session->output_w, min_h = session->output_h;