X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fedlsession.C;h=1471834dc4de6a9bdc8205a367d87bb9ea599490;hb=b7045bda288a03559422862284a9cf411b63c072;hp=91b53d227276f553f22273ab27aaa28ea072b72a;hpb=620f70a943c1f47880ec68a908aa03bf463e741f;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/edlsession.C b/cinelerra-5.1/cinelerra/edlsession.C index 91b53d22..1471834d 100644 --- a/cinelerra-5.1/cinelerra/edlsession.C +++ b/cinelerra-5.1/cinelerra/edlsession.C @@ -44,8 +44,9 @@ EDLSession::EDLSession(EDL *edl) for(int i = 0; i < MAXCHANNELS; i++) achannel_positions[i] = 0; assetlist_format = ASSETS_ICONS; + int xs100 = xS(100); for(int i = 0; i < ASSET_COLUMNS; i++) - asset_columns[i] = 100; + asset_columns[i] = xs100; auto_conf = new AutoConf; awindow_folder = AW_MEDIA_FOLDER; aspect_w = 4; aspect_h = 3; @@ -58,8 +59,8 @@ EDLSession::EDLSession(EDL *edl) clipboard_length = 0; // unused color_model = BC_RGBA8888; interlace_mode = ILACE_MODE_UNDETECTED; - crop_x1 = 0; crop_x2 = 320; - crop_y1 = 0; crop_y2 = 240; + crop_x1 = 0; crop_x2 = xS(320); + crop_y1 = 0; crop_y2 = yS(240); eyedrop_radius = 0; ruler_x1 = ruler_y1 = 0.0; ruler_x2 = ruler_y2 = 0.0; @@ -73,6 +74,7 @@ EDLSession::EDLSession(EDL *edl) cwindow_xscroll = cwindow_yscroll = 0; cwindow_zoom = 1.0; cwindow_click2play = 0; + cwindow_clear_color = BLACK; strcpy(default_atransition, INIT_ATRANSITION); strcpy(default_vtransition, INIT_VTRANSITION); default_transition_length = 1.0; @@ -99,6 +101,7 @@ EDLSession::EDLSession(EDL *edl) playback_buffer = 4096; playback_cursor_visible = 0; playback_preload = 0; + proxy_state = PROXY_INACTIVE; proxy_scale = 1; proxy_disabled_scale = 1; proxy_use_scaler = 0; @@ -130,6 +133,7 @@ EDLSession::EDLSession(EDL *edl) si_duration = 3; test_playback_edits = 1; time_format = TIME_HMSF; + timecode_offset = 0; nudge_format = 1; tool_window = 0; for(int i = 0; i < MAXCHANNELS; i++) { @@ -176,9 +180,11 @@ int EDLSession::need_rerender(EDLSession *ptr) (subtitle_number != ptr->subtitle_number) || (interpolate_raw != ptr->interpolate_raw) || (white_balance_raw != ptr->white_balance_raw) || + (proxy_state != ptr->proxy_state) || (proxy_disabled_scale != ptr->proxy_disabled_scale) || (proxy_scale != ptr->proxy_scale) || - (proxy_use_scaler != ptr->proxy_use_scaler)); + (proxy_use_scaler != ptr->proxy_use_scaler) || + (cwindow_clear_color != ptr->cwindow_clear_color)); } void EDLSession::equivalent_output(EDLSession *session, double *result) @@ -192,6 +198,7 @@ void EDLSession::equivalent_output(EDLSession *session, double *result) session->white_balance_raw != white_balance_raw || session->decode_subtitles != decode_subtitles || session->subtitle_number != subtitle_number || + session->proxy_state != proxy_state || session->proxy_disabled_scale != proxy_disabled_scale || session->proxy_scale != proxy_scale || session->proxy_use_scaler != proxy_use_scaler ) @@ -254,6 +261,7 @@ int EDLSession::load_defaults(BC_Hash *defaults) cwindow_yscroll = defaults->get("CWINDOW_YSCROLL", 0); cwindow_zoom = defaults->get("CWINDOW_ZOOM", (float)1); cwindow_click2play = defaults->get("CWINDOW_CLICK2PLAY", 0); + cwindow_clear_color = defaults->get("CWINDOW_CLEAR_COLOR", BLACK); sprintf(default_atransition, INIT_ATRANSITION); defaults->get("DEFAULT_ATRANSITION", default_atransition); sprintf(default_vtransition, INIT_VTRANSITION); @@ -319,6 +327,7 @@ 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); + timecode_offset = defaults->get("TIMECODE_OFFSET", timecode_offset); nudge_format = defaults->get("NUDGE_FORMAT", 1); tool_window = defaults->get("TOOL_WINDOW", 0); vconfig_in->load_defaults(defaults); @@ -401,6 +410,7 @@ int EDLSession::save_defaults(BC_Hash *defaults) defaults->update("CWINDOW_YSCROLL", cwindow_yscroll); defaults->update("CWINDOW_ZOOM", cwindow_zoom); defaults->update("CWINDOW_CLICK2PLAY", cwindow_click2play); + defaults->update("CWINDOW_CLEAR_COLOR", cwindow_clear_color); defaults->update("DEFAULT_ATRANSITION", default_atransition); defaults->update("DEFAULT_VTRANSITION", default_vtransition); defaults->update("DEFAULT_TRANSITION_LENGTH", default_transition_length); @@ -455,6 +465,7 @@ 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); + defaults->update("TIMECODE_OFFSET", timecode_offset); defaults->update("NUDGE_FORMAT", nudge_format); defaults->update("TOOL_WINDOW", tool_window); vconfig_in->save_defaults(defaults); @@ -492,7 +503,7 @@ int EDLSession::save_defaults(BC_Hash *defaults) void EDLSession::boundaries() { Workarounds::clamp(audio_tracks, 0, (int)BC_INFINITY); - Workarounds::clamp(audio_channels, 1, MAXCHANNELS - 1); + Workarounds::clamp(audio_channels, 0, MAXCHANNELS - 1); Workarounds::clamp(sample_rate, 1, 1000000); Workarounds::clamp(video_tracks, 0, (int)BC_INFINITY); Workarounds::clamp(video_channels, 1, MAXCHANNELS - 1); @@ -562,6 +573,11 @@ int EDLSession::load_video_config(FileXML *file, int append_mode, uint32_t load_ proxy_disabled_scale = file->tag.get_property("PROXY_DISABLED_SCALE", proxy_disabled_scale); proxy_use_scaler = file->tag.get_property("PROXY_USE_SCALER", proxy_use_scaler); proxy_auto_scale = file->tag.get_property("PROXY_AUTO_SCALE", proxy_auto_scale); + proxy_state = file->tag.get_property("PROXY_STATE", -1); + if( proxy_state < 0 ) // convert older edl + proxy_state = proxy_scale != 1 ? PROXY_ACTIVE : + proxy_disabled_scale != 1 ? PROXY_DISABLED : + PROXY_INACTIVE; return 0; } @@ -625,6 +641,7 @@ int EDLSession::load_xml(FileXML *file, cwindow_yscroll = file->tag.get_property("CWINDOW_YSCROLL", cwindow_yscroll); cwindow_zoom = file->tag.get_property("CWINDOW_ZOOM", cwindow_zoom); cwindow_click2play = file->tag.get_property("CWINDOW_CLICK2PLAY", cwindow_click2play); + cwindow_clear_color = file->tag.get_property("CWINDOW_CLEAR_COLOR", cwindow_clear_color); editing_mode = file->tag.get_property("EDITING_MODE", editing_mode); folderlist_format = file->tag.get_property("FOLDERLIST_FORMAT", folderlist_format); highlighted_track = file->tag.get_property("HIGHLIGHTED_TRACK", 0); @@ -637,6 +654,7 @@ 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); + timecode_offset = file->tag.get_property("TIMECODE_OFFSET", timecode_offset); 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); @@ -692,6 +710,7 @@ int EDLSession::save_xml(FileXML *file) file->tag.set_property("CWINDOW_YSCROLL", cwindow_yscroll); file->tag.set_property("CWINDOW_ZOOM", cwindow_zoom); file->tag.set_property("CWINDOW_CLICK2PLAY", cwindow_click2play); + file->tag.set_property("CWINDOW_CLEAR_COLOR", cwindow_clear_color); file->tag.set_property("EDITING_MODE", editing_mode); file->tag.set_property("FOLDERLIST_FORMAT", folderlist_format); file->tag.set_property("HIGHLIGHTED_TRACK", highlighted_track); @@ -704,6 +723,7 @@ 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); + file->tag.set_property("TIMECODE_OFFSET", timecode_offset); file->tag.set_property("NUDGE_FORMAT", nudge_format); file->tag.set_property("TOOL_WINDOW", tool_window); file->tag.set_property("VWINDOW_METER", vwindow_meter); @@ -750,6 +770,7 @@ int EDLSession::save_video_config(FileXML *file) file->tag.set_property("OUTPUTH", output_h); file->tag.set_property("ASPECTW", aspect_w); file->tag.set_property("ASPECTH", aspect_h); + file->tag.set_property("PROXY_STATE", proxy_state); file->tag.set_property("PROXY_SCALE", proxy_scale); file->tag.set_property("PROXY_DISABLED_SCALE", proxy_disabled_scale); file->tag.set_property("PROXY_USE_SCALER", proxy_use_scaler); @@ -827,6 +848,7 @@ int EDLSession::copy(EDLSession *session) cwindow_yscroll = session->cwindow_yscroll; cwindow_zoom = session->cwindow_zoom; cwindow_click2play = session->cwindow_click2play; + cwindow_clear_color = session->cwindow_clear_color; strcpy(default_atransition, session->default_atransition); strcpy(default_vtransition, session->default_vtransition); default_transition_length = session->default_transition_length; @@ -878,6 +900,7 @@ int EDLSession::copy(EDLSession *session) show_titles = session->show_titles; test_playback_edits = session->test_playback_edits; time_format = session->time_format; + timecode_offset = session->timecode_offset; nudge_format = session->nudge_format; tool_window = session->tool_window; for(int i = 0; i < MAXCHANNELS; i++) { @@ -894,6 +917,7 @@ int EDLSession::copy(EDLSession *session) vwindow_meter = session->vwindow_meter; vwindow_zoom = session->vwindow_zoom; vwindow_click2play = session->vwindow_click2play; + proxy_state = session->proxy_state; proxy_scale = session->proxy_scale; proxy_disabled_scale = session->proxy_disabled_scale; proxy_use_scaler = session->proxy_use_scaler; @@ -914,13 +938,12 @@ void EDLSession::dump() printf("EDLSession::dump\n"); printf(" audio_tracks=%d audio_channels=%d sample_rate=%jd\n" " video_tracks=%d frame_rate=%f output_w=%d output_h=%d aspect_w=%f aspect_h=%f\n" - " decode subtitles=%d subtitle_number=%d label_cells=%d program_no=%d\n" - " proxy scale=%d\n disabled_scale=%d, use_scaler=%d, auto_scale=%d\n" - " proxy_beep=%d render_beep=%d\n", - audio_tracks, audio_channels, sample_rate, video_tracks, - frame_rate, output_w, output_h, aspect_w, aspect_h, - decode_subtitles, subtitle_number, label_cells, program_no, - proxy_scale, proxy_disabled_scale, proxy_use_scaler, proxy_auto_scale, - proxy_beep, render_beep); + " decode subtitles=%d subtitle_number=%d label_cells=%d program_no=%d render_beep=%f\n" + " proxy_* auto_scale=%d state=%d scale=%d disabled_scale=%d use_scaler=%d beep=%f\n", + audio_tracks, audio_channels, sample_rate, + video_tracks, frame_rate, output_w, output_h, aspect_w, aspect_h, + decode_subtitles, subtitle_number, label_cells, program_no, render_beep, + proxy_auto_scale, proxy_state, proxy_scale, proxy_disabled_scale, + proxy_use_scaler, proxy_beep); }