X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fedlsession.C;h=1a83545e063cccf443973b9c7f4583074cd922e4;hb=ddb2a20b7dbae022ea8394b60a97cbaea839ded9;hp=0930dd0593b185b5c2f1b4136dd22dd03a2d83d5;hpb=49f85559268fc040fe7ba5611cc0520793cf728b;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/edlsession.C b/cinelerra-5.1/cinelerra/edlsession.C index 0930dd05..1a83545e 100644 --- a/cinelerra-5.1/cinelerra/edlsession.C +++ b/cinelerra-5.1/cinelerra/edlsession.C @@ -53,7 +53,7 @@ EDLSession::EDLSession(EDL *edl) audio_tracks = 2; autos_follow_edits = 1; // this is needed for predictability auto_keyframes = 0; - brender_start = 0.0; + brender_start = brender_end = 0.0; clipboard_length = 0; // unused color_model = BC_RGBA8888; interlace_mode = ILACE_MODE_UNDETECTED; @@ -121,8 +121,6 @@ EDLSession::EDLSession(EDL *edl) show_titles = 1; test_playback_edits = 1; time_format = TIME_HMSF; - for(int i = 0; i < 4; i++) - timecode_offset[i] = 0; nudge_format = 1; tool_window = 0; for(int i = 0; i < MAXCHANNELS; i++) { @@ -225,6 +223,7 @@ int EDLSession::load_defaults(BC_Hash *defaults) auto_conf->load_defaults(defaults); autos_follow_edits = defaults->get("AUTOS_FOLLOW_EDITS", 1); brender_start = defaults->get("BRENDER_START", brender_start); + brender_end = defaults->get("BRENDER_END", brender_end); BC_CModels::to_text(string, BC_RGBA8888); color_model = BC_CModels::from_text(defaults->get("COLOR_MODEL", string)); eyedrop_radius = defaults->get("EYEDROP_RADIUS", 0); @@ -315,10 +314,6 @@ int EDLSession::load_defaults(BC_Hash *defaults) show_titles = defaults->get("SHOW_TITLES", 1); // test_playback_edits = defaults->get("TEST_PLAYBACK_EDITS", 1); time_format = defaults->get("TIME_FORMAT", TIME_HMSF); - for(int i = 0; i < 4; i++) { - sprintf(string, "TIMECODE_OFFSET_%d", i); - timecode_offset[i] = defaults->get(string, 0); - } nudge_format = defaults->get("NUDGE_FORMAT", 1); tool_window = defaults->get("TOOL_WINDOW", 0); vconfig_in->load_defaults(defaults); @@ -372,6 +367,7 @@ int EDLSession::save_defaults(BC_Hash *defaults) defaults->update("ATRACKS", audio_tracks); defaults->update("AUTOS_FOLLOW_EDITS", autos_follow_edits); defaults->update("BRENDER_START", brender_start); + defaults->update("BRENDER_END", brender_end); BC_CModels::to_text(string, color_model); defaults->update("COLOR_MODEL", string); ilacemode_to_xmltext(string, interlace_mode); @@ -450,10 +446,6 @@ int EDLSession::save_defaults(BC_Hash *defaults) defaults->update("SHOW_TITLES", show_titles); // defaults->update("TEST_PLAYBACK_EDITS", test_playback_edits); defaults->update("TIME_FORMAT", time_format); - for(int i = 0; i < 4; i++) { - sprintf(string, "TIMECODE_OFFSET_%d", i); - defaults->update(string, timecode_offset[i]); - } defaults->update("NUDGE_FORMAT", nudge_format); defaults->update("TOOL_WINDOW", tool_window); vconfig_in->save_defaults(defaults); @@ -516,6 +508,7 @@ void EDLSession::boundaries() Workarounds::clamp(ruler_y1, 0.0, output_h); Workarounds::clamp(ruler_y2, 0.0, output_h); if(brender_start < 0) brender_start = 0.0; + if(brender_end < 0) brender_end = 0.0; Workarounds::clamp(subtitle_number, 0, 31); Workarounds::clamp(awindow_folder, 0, AWINDOW_FOLDERS - 1); @@ -595,6 +588,7 @@ int EDLSession::load_xml(FileXML *file, auto_keyframes = file->tag.get_property("AUTO_KEYFRAMES", auto_keyframes); autos_follow_edits = file->tag.get_property("AUTOS_FOLLOW_EDITS", autos_follow_edits); brender_start = file->tag.get_property("BRENDER_START", brender_start); + brender_end = file->tag.get_property("BRENDER_END", brender_end); eyedrop_radius = file->tag.get_property("EYEDROP_RADIUS", eyedrop_radius); crop_x1 = file->tag.get_property("CROP_X1", crop_x1); crop_y1 = file->tag.get_property("CROP_Y1", crop_y1); @@ -634,10 +628,6 @@ int EDLSession::load_xml(FileXML *file, show_titles = file->tag.get_property("SHOW_TITLES", 1); // test_playback_edits = file->tag.get_property("TEST_PLAYBACK_EDITS", test_playback_edits); time_format = file->tag.get_property("TIME_FORMAT", time_format); - for(int i = 0; i < 4; i++) { - sprintf(string, "TIMECODE_OFFSET_%d", i); - timecode_offset[i] = file->tag.get_property(string, timecode_offset[i]); - } nudge_format = file->tag.get_property("NUDGE_FORMAT", nudge_format); tool_window = file->tag.get_property("TOOL_WINDOW", tool_window); vwindow_meter = file->tag.get_property("VWINDOW_METER", vwindow_meter); @@ -668,6 +658,7 @@ int EDLSession::save_xml(FileXML *file) file->tag.set_property("AUTO_KEYFRAMES", auto_keyframes); file->tag.set_property("AUTOS_FOLLOW_EDITS", autos_follow_edits); file->tag.set_property("BRENDER_START", brender_start); + file->tag.set_property("BRENDER_END", brender_end); file->tag.set_property("EYEDROP_RADIUS", eyedrop_radius); file->tag.set_property("CROP_X1", crop_x1); file->tag.set_property("CROP_Y1", crop_y1); @@ -701,10 +692,6 @@ int EDLSession::save_xml(FileXML *file) file->tag.set_property("SHOW_TITLES", show_titles); file->tag.set_property("TEST_PLAYBACK_EDITS", test_playback_edits); file->tag.set_property("TIME_FORMAT", time_format); - for(int i = 0; i < 4; i++) { - sprintf(string, "TIMECODE_OFFSET_%d", i); - file->tag.set_property(string, timecode_offset[i]); - } file->tag.set_property("NUDGE_FORMAT", nudge_format); file->tag.set_property("TOOL_WINDOW", tool_window); file->tag.set_property("VWINDOW_METER", vwindow_meter); @@ -797,6 +784,7 @@ int EDLSession::copy(EDLSession *session) audio_tracks = session->audio_tracks; autos_follow_edits = session->autos_follow_edits; brender_start = session->brender_start; + brender_end = session->brender_end; color_model = session->color_model; interlace_mode = session->interlace_mode; eyedrop_radius = session->eyedrop_radius; @@ -870,9 +858,6 @@ int EDLSession::copy(EDLSession *session) show_titles = session->show_titles; test_playback_edits = session->test_playback_edits; time_format = session->time_format; - for(int i = 0; i < 4; i++) { - timecode_offset[i] = session->timecode_offset[i]; - } nudge_format = session->nudge_format; tool_window = session->tool_window; for(int i = 0; i < MAXCHANNELS; i++) { @@ -897,12 +882,6 @@ int EDLSession::copy(EDLSession *session) return 0; } -int64_t EDLSession::get_frame_offset() -{ - return int64_t((timecode_offset[3] * 3600 + timecode_offset[2] * 60 + - timecode_offset[1]) * frame_rate + timecode_offset[0]); -} - void EDLSession::dump() { printf("EDLSession::dump\n");