purge file_cache when starting rev read cache burst
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / edlsession.C
index 001208442958b4cd16061a03a71ba23220008036..673ec070f77bb563f8a89e0c8c6d6600d24a42f8 100644 (file)
@@ -129,10 +129,12 @@ EDLSession::EDLSession(EDL *edl)
        scrub_speed = 2.;
        show_assets = 1;
        show_titles = 1;
+       gang_tracks = GANG_NONE;
        si_useduration = 1;
        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++) {
@@ -324,8 +326,10 @@ int EDLSession::load_defaults(BC_Hash *defaults)
 
        show_assets = defaults->get("SHOW_ASSETS", 1);
        show_titles = defaults->get("SHOW_TITLES", 1);
+       gang_tracks = defaults->get("GANG_TRACKS", GANG_NONE);
 //     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);
@@ -462,8 +466,10 @@ int EDLSession::save_defaults(BC_Hash *defaults)
        defaults->update("SI_DURATION",si_duration);
        defaults->update("SHOW_ASSETS", show_assets);
        defaults->update("SHOW_TITLES", show_titles);
+       defaults->update("GANG_TRACKS", gang_tracks);
 //     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);
@@ -501,7 +507,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);
@@ -646,8 +652,10 @@ int EDLSession::load_xml(FileXML *file,
                safe_regions = file->tag.get_property("SAFE_REGIONS", safe_regions);
                show_assets = file->tag.get_property("SHOW_ASSETS", 1);
                show_titles = file->tag.get_property("SHOW_TITLES", 1);
+               gang_tracks = file->tag.get_property("GANG_TRACKS", GANG_NONE);
 //             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);
@@ -715,8 +723,10 @@ int EDLSession::save_xml(FileXML *file)
        file->tag.set_property("SAFE_REGIONS", safe_regions);
        file->tag.set_property("SHOW_ASSETS", show_assets);
        file->tag.set_property("SHOW_TITLES", show_titles);
+       file->tag.set_property("GANG_TRACKS", gang_tracks);
        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);
@@ -891,8 +901,10 @@ int EDLSession::copy(EDLSession *session)
        si_duration = session->si_duration;
        show_assets = session->show_assets;
        show_titles = session->show_titles;
+       gang_tracks = session->gang_tracks;
        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++) {
@@ -931,7 +943,7 @@ void EDLSession::dump()
                "    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",
+               "    proxy_beep=%f render_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,