#include "filesystem.h"
#include "guicast.h"
#include "indexfile.h"
+#include "maxchannels.h"
#include "mutex.h"
#include "preferences.h"
#include "probeprefs.h"
sprintf(index_directory, "%s/", File::get_config_path());
if(strlen(index_directory))
fs.complete_path(index_directory);
- cache_size = 0x1000000;
+ cache_size = 0x10000000;
index_size = 0x400000;
index_count = 500;
use_thumbnails = 1;
trap_sigintr = 1;
theme[0] = 0;
plugin_icons[0] = 0;
+ strcpy(snapshot_path, "/tmp");
use_renderfarm = 0;
force_uniprocessor = 0;
renderfarm_port = DEAMON_PORT;
warn_version = 1;
bd_warn_root = 1;
popupmenu_btnup = 1;
+ grab_input_focus = 1;
textbox_focus_policy = 0;
+ forward_render_displacement = 0;
dvd_yuv420p_interlace = 0;
+ highlight_inverse = 0xffffff;
+ yuv_color_space = 0; // bt601
+ yuv_color_range = 0; // jpeg
// Default brender asset
brender_asset = new Asset;
android_port = 23432;
strcpy(android_pin, "cinelerra");
- for(int i = 0; i < MAXCHANNELS; i++)
- {
- for(int j = 0; j < i + 1; j++)
- {
- int position = 180 - (360 * j / (i + 1));
- while(position < 0) position += 360;
- channel_positions[i * MAXCHANNELS + j] = position;
- }
+ memset(channel_positions, 0, sizeof(channel_positions));
+ int channels = 0;
+ while( channels < MAXCHANNELS ) {
+ int *positions = channel_positions[channels++];
+ for( int i=0; i<channels; ++i )
+ positions[i] = default_audio_channel_position(i, channels);
}
}
keyframe_reticle = that->keyframe_reticle;
strcpy(theme, that->theme);
strcpy(plugin_icons, that->plugin_icons);
+ strcpy(snapshot_path, that->snapshot_path);
use_tipwindow = that->use_tipwindow;
scan_commercials = that->scan_commercials;
warn_version = that->warn_version;
bd_warn_root = that->bd_warn_root;
popupmenu_btnup = that->popupmenu_btnup;
+ grab_input_focus = that->grab_input_focus;
textbox_focus_policy = that->textbox_focus_policy;
+ forward_render_displacement = that->forward_render_displacement;
dvd_yuv420p_interlace = that->dvd_yuv420p_interlace;
+ highlight_inverse = that->highlight_inverse;
+ yuv_color_space = that->yuv_color_space;
+ yuv_color_range = that->yuv_color_range;
renderfarm_nodes.remove_all_objects();
renderfarm_ports.remove_all();
renderfarm_enabled.remove_all();
trap_sigsegv = defaults->get("TRAP_SIGSEGV", trap_sigsegv);
trap_sigintr = defaults->get("TRAP_SIGINTR", trap_sigintr);
- strcpy(theme, DEFAULT_THEME);
- defaults->get("THEME", theme);
+ strcpy(theme, _(DEFAULT_THEME));
strcpy(plugin_icons, DEFAULT_PICON);
+ defaults->get("THEME", theme);
defaults->get("PLUGIN_ICONS", plugin_icons);
+ strcpy(snapshot_path, "/tmp");
+ defaults->get("SNAPSHOT_PATH", snapshot_path);
- for(int i = 0; i < MAXCHANNELS; i++)
- {
+ for( int i=0; i<MAXCHANNELS; ++i ) {
char string2[BCTEXTLEN];
sprintf(string, "CHANNEL_POSITIONS%d", i);
- print_channels(string2,
- &channel_positions[i * MAXCHANNELS],
- i + 1);
-
+ print_channels(string2, &channel_positions[i][0], i+1);
defaults->get(string, string2);
-
- scan_channels(string2,
- &channel_positions[i * MAXCHANNELS],
- i + 1);
+ scan_channels(string2, &channel_positions[i][0], i+1);
}
-
- brender_asset->load_defaults(defaults,
- "BRENDER_",
- 1,
- 1,
- 1,
- 0,
- 0);
-
-
+ brender_asset->load_defaults(defaults, "BRENDER_", 1, 1, 1, 0, 0);
project_smp = defaults->get("PROJECT_SMP", project_smp);
force_uniprocessor = defaults->get("FORCE_UNIPROCESSOR", force_uniprocessor);
warn_version = defaults->get("WARN_VERSION", warn_version);
bd_warn_root = defaults->get("BD_WARN_ROOT", bd_warn_root);
popupmenu_btnup = defaults->get("POPUPMENU_BTNUP", popupmenu_btnup);
+ grab_input_focus = defaults->get("GRAB_FOCUS", grab_input_focus);
textbox_focus_policy = defaults->get("TEXTBOX_FOCUS_POLICY", textbox_focus_policy);
+ forward_render_displacement = defaults->get("FORWARD_RENDER_DISPLACEMENT", forward_render_displacement);
dvd_yuv420p_interlace = defaults->get("DVD_YUV420P_INTERLACE", dvd_yuv420p_interlace);
+ highlight_inverse = defaults->get("HIGHLIGHT_INVERSE", highlight_inverse);
+ yuv_color_space = defaults->get("YUV_COLOR_SPACE", yuv_color_space);
+ yuv_color_range = defaults->get("YUV_COLOR_RANGE", yuv_color_range);
use_brender = defaults->get("USE_BRENDER", use_brender);
brender_fragment = defaults->get("BRENDER_FRAGMENT", brender_fragment);
cache_size = defaults->get("CACHE_SIZE", cache_size);
shbtn_prefs.append(new ShBtnPref(_("Online Help"), "$CIN_BROWSER https://cinelerra-cv.org/docs.php", 0));
shbtn_prefs.append(new ShBtnPref(_("Original Manual"), "$CIN_BROWSER file://$CIN_DAT/doc/cinelerra.html", 0));
shbtn_prefs.append(new ShBtnPref(_("Setting Shell Commands"), "$CIN_BROWSER file://$CIN_DAT/doc/ShellCmds.html", 0));
+ shbtn_prefs.append(new ShBtnPref(_("Shortcuts"), "$CIN_BROWSER file://$CIN_DAT/doc/shortcuts.html", 0));
+ shbtn_prefs.append(new ShBtnPref(_("RenderMux"), "$CIN_DAT/doc/RenderMux.sh",0));
shbtns_total = 0;
}
for( int i=0; i<shbtns_total; ++i ) {
defaults->update("TRAP_SIGINTR", trap_sigintr);
defaults->update("THEME", theme);
defaults->update("PLUGIN_ICONS", plugin_icons);
-
+ defaults->update("SNAPSHOT_PATH", snapshot_path);
for(int i = 0; i < MAXCHANNELS; i++)
{
char string2[BCTEXTLEN];
sprintf(string, "CHANNEL_POSITIONS%d", i);
- print_channels(string2, &channel_positions[i * MAXCHANNELS], i + 1);
+ print_channels(string2, &channel_positions[i][0], i + 1);
defaults->update(string, string2);
}
defaults->update("WARN_VERSION", warn_version);
defaults->update("BD_WARN_ROOT", bd_warn_root);
defaults->update("POPUPMENU_BTNUP", popupmenu_btnup);
+ defaults->update("GRAB_FOCUS", grab_input_focus);
defaults->update("TEXTBOX_FOCUS_POLICY", textbox_focus_policy);
+ defaults->update("FORWARD_RENDER_DISPLACEMENT", forward_render_displacement);
defaults->update("DVD_YUV420P_INTERLACE", dvd_yuv420p_interlace);
+ defaults->update("HIGHLIGHT_INVERSE", highlight_inverse);
+ defaults->update("YUV_COLOR_SPACE", yuv_color_space);
+ defaults->update("YUV_COLOR_RANGE", yuv_color_range);
brender_asset->save_defaults(defaults, "BRENDER_", 1, 1, 1, 0, 0);
defaults->update("USE_BRENDER", use_brender);
defaults->update("BRENDER_FRAGMENT", brender_fragment);