X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Fedlsession.C;h=e69e84f073e732d2d1504b770861fad4f050e827;hp=57a58afdb75013abacd5cd75024a96e45e19ab1c;hb=52fcc46226f9df46f9ce9d0566dc568455a7db0b;hpb=2d99bb8ce591f05a31464b517d85dc2bc35b2abe diff --git a/cinelerra-5.0/cinelerra/edlsession.C b/cinelerra-5.0/cinelerra/edlsession.C index 57a58afd..e69e84f0 100644 --- a/cinelerra-5.0/cinelerra/edlsession.C +++ b/cinelerra-5.0/cinelerra/edlsession.C @@ -6,7 +6,7 @@ * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,7 +22,7 @@ #include "asset.h" #include "assets.h" #include "autoconf.h" -#include "colormodels.h" +#include "bccmodels.h" #include "bchash.h" #include "edl.h" #include "edlsession.h" @@ -43,7 +43,7 @@ EDLSession::EDLSession(EDL *edl) aconfig_in = new AudioInConfig; vconfig_in = new VideoInConfig; recording_format = new Asset; - interpolation_type = CUBIC_LINEAR; + interpolation_type = CUBIC_CUBIC; interpolate_raw = 1; white_balance_raw = 1; test_playback_edits = 1; @@ -56,7 +56,7 @@ EDLSession::EDLSession(EDL *edl) strcpy(default_atransition, ""); strcpy(default_vtransition, ""); default_transition_length = 1.0; - folderlist_format = ASSETS_ICONS; + folderlist_format = FOLDERS_ICONS; frame_rate = 25; // just has to be something by default autos_follow_edits = 1; // this is needed for predictability labels_follow_edits = 1; @@ -95,8 +95,7 @@ EDLSession::~EDLSession() int EDLSession::need_rerender(EDLSession *ptr) { - return (playback_preload != ptr->playback_preload) || - (interpolation_type != ptr->interpolation_type) || + return (interpolation_type != ptr->interpolation_type) || (video_every_frame != ptr->video_every_frame) || (video_asynchronous != ptr->video_asynchronous) || (real_time_playback != ptr->real_time_playback) || @@ -165,8 +164,8 @@ 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); - cmodel_to_text(string, BC_RGBA8888); - color_model = cmodel_from_text(defaults->get("COLOR_MODEL", string)); + 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); crop_x1 = defaults->get("CROP_X1", 0); crop_x2 = defaults->get("CROP_X2", 320); @@ -182,9 +181,9 @@ int EDLSession::load_defaults(BC_Hash *defaults) typeless_keyframes = defaults->get("TYPELESS_KEYFRAMES", 0); cwindow_dest = defaults->get("CWINDOW_DEST", 0); cwindow_mask = defaults->get("CWINDOW_MASK", 0); - cwindow_meter = defaults->get("CWINDOW_METER", 1); + cwindow_meter = defaults->get("CWINDOW_METER", 0); cwindow_operation = defaults->get("CWINDOW_OPERATION", 0); - cwindow_scrollbars = defaults->get("CWINDOW_SCROLLBARS", 1); + cwindow_scrollbars = defaults->get("CWINDOW_SCROLLBARS", 0); cwindow_xscroll = defaults->get("CWINDOW_XSCROLL", 0); cwindow_yscroll = defaults->get("CWINDOW_YSCROLL", 0); cwindow_zoom = defaults->get("CWINDOW_ZOOM", (float)1); @@ -215,7 +214,6 @@ int EDLSession::load_defaults(BC_Hash *defaults) output_w = defaults->get("OUTPUTW", 720); output_h = defaults->get("OUTPUTH", 480); playback_buffer = defaults->get("PLAYBACK_BUFFER", 4096); - playback_preload = defaults->get("PLAYBACK_PRELOAD", 0); playback_software_position = defaults->get("PLAYBACK_SOFTWARE_POSITION", 0); delete playback_config; playback_config = new PlaybackConfig; @@ -228,15 +226,22 @@ int EDLSession::load_defaults(BC_Hash *defaults) // record_speed = defaults->get("RECORD_SPEED", 24); record_fragment_size = defaults->get("RECORD_FRAGMENT_SIZE", 2048); record_write_length = defaults->get("RECORD_WRITE_LENGTH", 131072); + +// set some defaults that work + recording_format->video_data = 1; + recording_format->audio_data = 1; + recording_format->format = FILE_FFMPEG; + strcpy(recording_format->acodec, "mp4.qt"); + strcpy(recording_format->vcodec, "mp4.qt"); + recording_format->channels = 2; + recording_format->sample_rate = 48000; + recording_format->bits = 16; + recording_format->dither = 0; + record_realtime_toc = defaults->get("RECORD_REALTIME_TOC", 1); - recording_format->load_defaults(defaults, - "RECORD_", - 1, - 1, - 1, - 1, - 1); - safe_regions = defaults->get("SAFE_REGIONS", 1); + recording_format->load_defaults(defaults, "RECORD_", 1, 1, 1, 1, 1); + + safe_regions = defaults->get("SAFE_REGIONS", 0); sample_rate = defaults->get("SAMPLERATE", 48000); scrub_speed = defaults->get("SCRUB_SPEED", (float)2); show_assets = defaults->get("SHOW_ASSETS", 1); @@ -260,7 +265,7 @@ int EDLSession::load_defaults(BC_Hash *defaults) video_tracks = defaults->get("VTRACKS", 1); video_write_length = defaults->get("VIDEO_WRITE_LENGTH", 30); view_follows_playback = defaults->get("VIEW_FOLLOWS_PLAYBACK", 1); - vwindow_meter = defaults->get("VWINDOW_METER", 1); + vwindow_meter = defaults->get("VWINDOW_METER", 0); decode_subtitles = defaults->get("DECODE_SUBTITLES", decode_subtitles); @@ -298,7 +303,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); - cmodel_to_text(string, color_model); + BC_CModels::to_text(string, color_model); defaults->update("COLOR_MODEL", string); defaults->update("EYEDROP_RADIUS", eyedrop_radius); defaults->update("CROP_X1", crop_x1); @@ -346,7 +351,6 @@ int EDLSession::save_defaults(BC_Hash *defaults) defaults->update("OUTPUTW", output_w); defaults->update("OUTPUTH", output_h); defaults->update("PLAYBACK_BUFFER", playback_buffer); - defaults->update("PLAYBACK_PRELOAD", playback_preload); defaults->update("PLAYBACK_SOFTWARE_POSITION", playback_software_position); playback_config->save_defaults(defaults); defaults->update("PLAYBACK_REALTIME", real_time_playback); @@ -446,13 +450,13 @@ void EDLSession::boundaries() int EDLSession::load_video_config(FileXML *file, int append_mode, uint32_t load_flags) { - char string[1024]; + char string[BCTEXTLEN]; if(append_mode) return 0; interpolation_type = file->tag.get_property("INTERPOLATION_TYPE", interpolation_type); interpolate_raw = file->tag.get_property("INTERPOLATE_RAW", interpolate_raw); white_balance_raw = file->tag.get_property("WHITE_BALANCE_RAW", white_balance_raw); - cmodel_to_text(string, color_model); - color_model = cmodel_from_text(file->tag.get_property("COLORMODEL", string)); + BC_CModels::to_text(string, color_model); + color_model = BC_CModels::from_text(file->tag.get_property("COLORMODEL", string)); video_channels = file->tag.get_property("CHANNELS", video_channels); for(int i = 0; i < video_channels; i++) { @@ -539,7 +543,6 @@ int EDLSession::load_xml(FileXML *file, mpeg4_deblock = file->tag.get_property("MPEG4_DEBLOCK", mpeg4_deblock); plugins_follow_edits = file->tag.get_property("PLUGINS_FOLLOW_EDITS", plugins_follow_edits); single_standalone = file->tag.get_property("SINGLE_STANDALONE", single_standalone); - playback_preload = file->tag.get_property("PLAYBACK_PRELOAD", playback_preload); 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); @@ -602,7 +605,6 @@ int EDLSession::save_xml(FileXML *file) file->tag.set_property("MPEG4_DEBLOCK", mpeg4_deblock); file->tag.set_property("PLUGINS_FOLLOW_EDITS", plugins_follow_edits); file->tag.set_property("SINGLE_STANDALONE", single_standalone); - file->tag.set_property("PLAYBACK_PRELOAD", playback_preload); file->tag.set_property("SAFE_REGIONS", safe_regions); file->tag.set_property("SHOW_ASSETS", show_assets); file->tag.set_property("SHOW_TITLES", show_titles); @@ -628,12 +630,12 @@ int EDLSession::save_xml(FileXML *file) int EDLSession::save_video_config(FileXML *file) { - char string[1024]; + char string[BCTEXTLEN]; file->tag.set_title("VIDEO"); file->tag.set_property("INTERPOLATION_TYPE", interpolation_type); file->tag.set_property("INTERPOLATE_RAW", interpolate_raw); file->tag.set_property("WHITE_BALANCE_RAW", white_balance_raw); - cmodel_to_text(string, color_model); + BC_CModels::to_text(string, color_model); file->tag.set_property("COLORMODEL", string); file->tag.set_property("CHANNELS", video_channels); for(int i = 0; i < video_channels; i++) @@ -747,7 +749,6 @@ int EDLSession::copy(EDLSession *session) playback_config = new PlaybackConfig; playback_config->copy_from(session->playback_config); playback_cursor_visible = session->playback_cursor_visible; - playback_preload = session->playback_preload; playback_software_position = session->playback_software_position; real_time_playback = session->real_time_playback; real_time_record = session->real_time_record;