Go to the documentation of this file.
45 #define NEED_ENDIAN_TEST
63 #ifndef ENABLE_DIAGNOSTICS
82 #include <mach/mach.h>
83 #include <mach/processor_info.h>
84 #include <mach/mach_host.h>
92 #include <sys/prctl.h>
96 #include <glib-unix.h>
106 static char buff[256];
110 static boolean no_recover =
FALSE, auto_recover =
FALSE;
111 static boolean upgrade_error =
FALSE;
112 static boolean info_only;
114 static char *newconfigfile = NULL;
117 static double start = 0.;
120 static boolean theme_error;
128 static int xxwidth = 0, xxheight = 0;
131 static char *old_vhash = NULL;
132 static int initial_startup_phase = 0;
133 static boolean needs_workdir =
FALSE;
134 static boolean ran_ds_dlg =
FALSE;
136 static void do_start_messages(
void);
142 {
"STRING", GTK_TARGET_OTHER_APP, 0 },
143 {
"text/uri-list", GTK_TARGET_OTHER_APP, 0 },
148 #ifdef NO_COMPILE // never compile this
152 (
_(
"Attention Translators !\nThis message is intended for you, so please do not translate it.\n\n"
153 "All translators should read the LiVES translation notes at\n"
154 "http://lives-video.com/TRANS-README.txt"));
161 g_print(
"BANG ! hit breakpoint %s\n", brkstr ? brkstr :
"???");
174 static void lives_log_handler(
const char *domain, LiVESLogLevelFlags level,
const char *message, livespointer data) {
176 if (level & LIVES_LOG_FATAL_MASK) {
177 #ifndef IGNORE_FATAL_ERRORS
182 LiVESLogLevelFlags xlevel = level & LIVES_LOG_LEVEL_MASK;
184 #ifdef LIVES_NO_DEBUG
188 #ifndef SHOW_ALL_ERRORS
189 #ifdef LIVES_NO_DEBUG
190 if (xlevel >= LIVES_LOG_LEVEL_DEBUG)
return;
193 #ifndef SHOW_INFO_ERRORS
194 if (xlevel == LIVES_LOG_LEVEL_INFO)
return;
197 #ifndef SHOW_MSG_ERRORS
198 if (xlevel == LIVES_LOG_LEVEL_MESSAGE)
return;
200 #define NO_WARN_ERRORS
201 #ifdef NO_WARN_ERRORS
202 if (xlevel == LIVES_LOG_LEVEL_WARNING) {
206 #define NO_CRITICAL_ERRORS
207 #ifdef NO_CRITICAL_ERRORS
208 if (xlevel == LIVES_LOG_LEVEL_CRITICAL)
return;
214 #ifndef SHOW_THEME_ERRORS
216 if (!strncmp(message,
"Theme parsing", strlen(
"Theme parsing"))) {
217 #ifdef TRAP_THEME_ERRORS
226 if (!strncmp(message, TRAP_ERRMSG, strlen(TRAP_ERRMSG))) {
227 fprintf(stderr,
"Trapped message %s\n", message);
231 if (xlevel == LIVES_LOG_LEVEL_FATAL)
233 else if (xlevel == LIVES_LOG_LEVEL_CRITICAL)
235 else if (xlevel == LIVES_LOG_LEVEL_WARNING)
237 else if (xlevel == LIVES_LOG_LEVEL_MESSAGE)
239 else if (xlevel == LIVES_LOG_LEVEL_INFO)
241 else if (xlevel == LIVES_LOG_LEVEL_DEBUG)
248 fprintf(stderr,
"%s", msg);
251 #define BREAK_ON_CRIT
252 if (xlevel <= LIVES_LOG_LEVEL_CRITICAL) {
311 g_print(
"Thread got signal %d\n", signum);
335 fprintf(stderr,
_(
"\nUnfortunately LiVES crashed.\nPlease report this bug at %s\n"
336 "Thanks. Recovery should be possible if you restart LiVES.\n"),
LIVES_BUG_URL);
337 fprintf(stderr,
_(
"\n\nWhen reporting crashes, please include details of your operating system, "
338 "distribution, and the LiVES version (%s)\n"), LiVES_VERSION);
341 if (
mainw->
debug) fprintf(stderr,
"%s",
_(
"and any information shown below:\n\n"));
342 else fprintf(stderr,
"%s",
_(
"Please try running LiVES with the -debug option to collect more information.\n\n"));
344 fprintf(stderr,
"%s",
_(
"Please install gdb and then run LiVES with the -debug option "
345 "to collect more information.\n\n"));
349 #ifdef LIVES_NO_DEBUG
353 prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY);
356 #ifdef LIVES_NO_DEBUG
366 if (
mainw->
memok) fprintf(stderr,
"%s",
_(
"Preserving set.\n"));
379 static boolean glib_sighandler(livespointer data) {
380 int signum = LIVES_POINTER_TO_INT(data);
388 static double get_screen_scale(GdkScreen *screen,
double *pdpi) {
390 double dpi = gdk_screen_get_resolution(screen);
391 if (dpi == 120.) scale = 1.25;
392 else if (dpi == 144.) scale = 1.5;
393 else if (dpi == 192.) scale = 2.0;
394 if (pdpi) *pdpi = dpi;
404 #if GTK_CHECK_VERSION(3, 22, 0)
411 #if !GTK_CHECK_VERSION(3, 22, 0)
412 GSList *dlist, *dislist;
413 int nscreens, nmonitors;
414 #if LIVES_HAS_DEVICE_MANAGER
415 GdkDeviceManager *devman;
428 #if !GTK_CHECK_VERSION(3, 22, 0)
429 dlist = dislist = gdk_display_manager_list_displays(gdk_display_manager_get());
434 disp = (GdkDisplay *)dlist->data;
438 for (i = 0; i < nscreens; i++) {
439 screen = gdk_display_get_screen(disp, i);
445 disp = gdk_display_get_default();
452 #if !GTK_CHECK_VERSION(3, 22, 0)
456 disp = (GdkDisplay *)dlist->data;
459 devman = gdk_display_get_device_manager(disp);
460 devlist = gdk_device_manager_list_devices(devman, GDK_DEVICE_TYPE_MASTER);
464 for (i = 0; i < nscreens; i++) {
465 screen = gdk_display_get_screen(disp, i);
466 scale = get_screen_scale(screen, &dpi);
467 nmonitors = gdk_screen_get_n_monitors(screen);
468 for (j = 0; j < nmonitors; j++) {
469 gdk_screen_get_monitor_geometry(screen, j, &(rect));
477 #if GTK_CHECK_VERSION(3, 4, 0)
478 gdk_screen_get_monitor_workarea(screen, j, &(rect));
482 #if LIVES_HAS_DEVICE_MANAGER
484 for (k = 0; k < lives_list_length(devlist); k++) {
485 device = (GdkDevice *)lives_list_nth_data(devlist, k);
486 if (gdk_device_get_display(device) == disp &&
487 gdk_device_get_source(device) == GDK_SOURCE_MOUSE) {
499 #if LIVES_HAS_DEVICE_MANAGER
500 lives_list_free(devlist);
505 lives_slist_free(dislist);
507 screen = gdk_display_get_default_screen(disp);
508 scale = get_screen_scale(screen, &dpi);
509 device = gdk_seat_get_pointer(gdk_display_get_default_seat(disp));
512 mainw->
mgeom[idx].monitor = moni = gdk_display_get_monitor(disp, idx);
514 gdk_monitor_get_geometry(moni, (GdkRectangle *)&rect);
522 gdk_monitor_get_workarea(moni, &(rect));
525 if (gdk_monitor_is_primary(moni)) {
528 }
else if (play_moni == 1) play_moni = idx + 1;
544 char **array = lives_strsplit(buff,
",", 2);
547 lives_strfreev(array);
574 static void print_notice(
void) {
575 fprintf(stderr,
"\nLiVES %s\n", LiVES_VERSION);
577 fprintf(stderr,
"LiVES comes with ABSOLUTELY NO WARRANTY\nThis is free software, and you are welcome to redistribute it\n"
578 "under certain conditions; "
579 "see the file COPYING for details.\n\n");
583 static boolean pre_init(
void) {
588 LiVESError *gerr = NULL;
592 pthread_mutexattr_t mattr;
594 char *msg, *tmp, *tmp2, *cfgdir;
596 boolean needs_update =
FALSE;
621 _(
"\nPerl must be installed and in your path.\n\n"
622 "Please review the README file which came with this package\nbefore running LiVES.\n\n"
627 _(
"\n`smogrify` must be in your path, and be executable\n\n"
628 "Please review the README file which came with this package\nbefore running LiVES.\n"));
633 _(
"\nAn incorrect version of smogrify was found in your path.\n\n"
634 "Please review the README file which came with this package\nbefore running LiVES."
635 "\n\nThankyou.\n")));
640 _(
"\nLiVES was unable to read from its configuration file\n%s\n\n"
641 "Please check the file permissions for this file and try again.\n"),
642 (tmp = lives_filename_to_utf8(
prefs->
configfile, -1, NULL, NULL, NULL)));
649 _(
"\nAn error occurred when writing to the configuration files\n%s*\n\n"
650 "Please check the file permissions for this file and directory\nand try again.\n"),
662 ?
"<tempdir>" :
"<workdir>",
663 (tmp = lives_filename_to_utf8(
prefs->
configfile, -1, NULL, NULL, NULL)));
665 }
else tmp2 = lives_strdup(
"");
713 g_log_set_always_fatal((GLogLevelFlags)0);
767 if (!needs_workdir &&
prefs->
disk_quota && !needs_workdir && initial_startup_phase == 0)
809 pthread_mutexattr_init(&mattr);
810 pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);
896 #if GTK_CHECK_VERSION(3, 0, 0)
911 if (strcmp(
PREFIX,
"NONE")) {
925 gtk_window_set_default_icon_from_file(icon, &gerr);
928 if (gerr) lives_error_free(gerr);
932 needs_update =
FALSE;
987 lives_widget_object_get(gtk_settings_get_default(),
"gtk-enable-tooltips", &
prefs->
show_tooltips);
1025 const char *tmp = get_js_filename();
1035 #ifdef OMC_MIDI_IMPL
1048 mainw->seq_handle = NULL;
1062 auto_recover =
TRUE;
1091 weed_plant_t *filter;
1115 rfx->
menu_text = (
_(
"_Resize All Frames..."));
1125 LIVES_WIDGET_ACTIVATE_SIGNAL,
1134 if (deint_idx > -1) {
1137 LIVES_INT_TO_POINTER(deint_idx));
1143 static void lives_init(
_ign_opts *ign_opts) {
1145 LiVESList *encoders = NULL;
1146 LiVESList *encoder_capabilities = NULL;
1151 char *weed_plugin_path;
1158 #ifdef HAVE_LIBVISUAL
1212 for (i = 0; i <
FN_KEYS - 1; i++) {
1662 #if LIVES_HAS_GRID_WIDGET
1692 #ifdef GDK_WINDOWING_WAYLAND
1696 #ifdef GDK_WINDOWING_X11
1698 capable->
wm_name = lives_strdup(gdk_x11_screen_get_window_manager_name(gdk_screen_get_default()));
1826 LiVESList *ofmt_all = NULL;
1841 for (i = 0; i < lives_list_length(ofmt_all); i++) {
1842 if (
get_token_count((
char *)lives_list_nth_data(ofmt_all, i),
'|') > 2) {
1843 array = lives_strsplit((
char *)lives_list_nth_data(ofmt_all, i),
"|", -1);
1847 lives_strfreev(array);
1861 lives_strfreev(array);
1888 LiVESList *ofmt_all, *dummy_list;
1898 LiVESList *list = ofmt_all;
1901 array = lives_strsplit((
char *)list->data,
"|", -1);
1906 lives_strfreev(array);
1909 lives_strfreev(array);
1921 #if GLIB_CHECK_VERSION(2, 14, 0)
1935 #if GLIB_CHECK_VERSION(2, 14, 0)
1951 #if GLIB_CHECK_VERSION(2, 14, 0)
1965 #if GLIB_CHECK_VERSION(2, 14, 0)
2015 if (!needs_workdir && initial_startup_phase == 0) {
2020 do_start_messages();
2025 weed_plugin_path = getenv(
"WEED_PLUGIN_PATH");
2026 if (!weed_plugin_path) {
2032 if (needs_free)
lives_free(weed_plugin_path);
2041 frei0r_path = getenv(
"FREI0R_PATH");
2059 ladspa_path = getenv(
"LADSPA_PATH");
2061 ladspa_path = lives_build_path(
prefs->
lib_dir,
"ladspa", NULL);
2075 libvis_path = getenv(
"VISUAL_PLUGIN_PATH");
2105 msg =
lives_strdup_printf(
_(
"System default transition (%s from package %s by %s) not found."),
2106 array[1], array[0], array[2]);
2110 lives_strfreev(array);
2118 array = lives_strsplit(buff,
"|", 3);
2122 array[1], array[0], array[2]);
2126 lives_strfreev(array);
2164 if (!lives_jack_init()) {
2179 jack_audio_read_init();
2185 #ifdef HAVE_PULSE_AUDIO
2186 char *otherbit = lives_strdup(
"\"lives -aplayer pulse\".");
2188 char *otherbit = lives_strdup(
"\"lives -aplayer sox\".");
2193 _(
"\n\nManual start of jackd required. Please make sure jackd is running, \n"
2194 "or else change the value of <jack_opts> in %s to 16\nand restart LiVES.\n\n"
2195 "Alternatively, try to start lives with either \"lives -jackopts 16\", or "),
2196 (tmp = lives_filename_to_utf8(
prefs->
configfile, -1, NULL, NULL, NULL)));
2197 fprintf(stderr,
"%s%s\n\n", msg, otherbit);
2228 #ifdef HAVE_PULSE_AUDIO
2246 pulse_audio_read_init();
2307 static void show_detected_or_not(
boolean cap,
const char *pname) {
2308 if (cap)
d_print(
_(
"%s...detected... "), pname);
2309 else d_print(
_(
"%s...NOT DETECTED... "), pname);
2312 #define SHOWDETx(cap, exec) show_detected_or_not(capable->has_##cap, exec)
2313 #define SHOWDET(cap) SHOWDETx(cap, QUOTEME(cap))
2316 static void do_start_messages(
void) {
2318 char *tmp, *endian, *fname, *phase = NULL;
2321 d_print(
_(
"Starting in VJ MODE: Skipping most startup checks\n"));
2331 d_print(
_(
"\nMachine details:\n"));
2334 d_print(
_(
"OS is %s %s, running on %s\n"),
2343 else endian = (
_(
"big endian"));
2351 d_print(
_(
"GUI screen size is %d X %d (usable: %d X %d); %d dpi.\nWidget scaling has been set to %.3f.\n"),
2358 d_print(
_(
"Actual usable size appears to be %d X %d\n"), w, h);
2363 d_print(
_(
"Window manager reports as \"%s\" (%s)"),
2375 else tmp = lives_strdup(
"");
2384 #if GTK_CHECK_VERSION(3, 0, 0)
2385 d_print(
_(
"GTK+ version %d.%d.%d (compiled with %d.%d.%d)"),
2386 gtk_get_major_version(), gtk_get_minor_version(),
2387 gtk_get_micro_version(),
2388 GTK_MAJOR_VERSION, GTK_MINOR_VERSION,
2392 d_print(
_(
"GTK+ (compiled with %d.%d.%d)"),
2393 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
2397 #ifdef LIVES_PAINTER_IS_CAIRO
2398 d_print(
_(
", with cairo support\n"));
2406 d_print(
"GUI theme set to %s, icon theme set to %s\n", tmp,
2413 d_print(
_(
"WARNING - this version of LiVES was compiled without either\njack or pulseaudio support.\n"
2414 "Many audio features will be unavailable.\n"));
2417 d_print(
_(
"Compiled with jack support, good !\n"));
2419 #ifdef HAVE_PULSE_AUDIO
2420 d_print(
_(
"Compiled with pulseaudio support, wonderful !\n"));
2425 tmp = (
_(
"set via -configfile commandline option"));
2427 tmp = (
_(
"default value"));
2435 else tmp = lives_strdup(
"");
2441 d_print(
_(
"(Set by -workdir commandline option)\n"));
2443 if (initial_startup_phase != -1) {
2446 old_vhash = lives_strdup(LiVES_VERSION);
2450 d_print(
_(
"(Set by user during setup phase)\n"));
2454 if (initial_startup_phase == 0) {
2456 phase = (
_(
"STARTUP ERROR OCCURRED - FORCED REINSTALL"));
2464 }
else if (initial_startup_phase == -1) {
2466 phase = (
_(
"REINSTALL AFTER FAILED RECOVERY"));
2468 if (lives_file_test(fname, LIVES_FILE_TEST_EXISTS)) {
2469 tmp =
lives_strdup_printf(
_(
"%s; check %s for possible errors before re-running LiVES"), phase, fname);
2476 phase = (
_(
"fresh install. Welcome !"));
2481 if (!phase) phase = (
_(
"normal startup"));
2482 d_print(
_(
"Initial startup phase was %d: (%s)\n"), initial_startup_phase, phase);
2486 if (initial_startup_phase == 0) {
2488 if (lives_file_test(fname, LIVES_FILE_TEST_EXISTS)) {
2497 d_print(
_(
"\nChecking RECOMMENDED dependencies: "));
2521 d_print(
_(
"\n\nChecking OPTIONAL dependencies: "));
2525 SHOWDETx(cdda2wav,
"cdda2wav/icedax");
2536 static void set_toolkit_theme(
int prefer) {
2537 char *lname, *ic_dir;
2541 lives_widget_object_get(gtk_settings_get_default(),
"gtk-double-click-time", &
capable->
dclick_time);
2544 lives_widget_object_get(gtk_settings_get_default(),
"gtk-double-click-distance", &
capable->
dclick_dist);
2547 lives_widget_object_get(gtk_settings_get_default(),
"gtk-font-name", &tmp);
2559 lives_widget_object_set(gtk_settings_get_default(),
"gtk-application-prefer-dark-theme",
TRUE);
2563 lives_widget_object_set(gtk_settings_get_default(),
"gtk-theme-name",
"");
2565 lname = lives_strdup(
"-lives-hybrid");
2568 lname = lives_strdup(
"-lives-hybrid-dynamic");
2586 for (; list; list = list->next)
if (!strncmp((
char *)list->data,
"gtk-", 4)) g_print(
"icon: %s\n", (
char *)list->data);
2594 static void pick_custom_colours(
void) {
2596 uint8_t ncr, ncg, ncb;
2598 lmin = .05; lmax = .4;
2600 lmin = .6; lmax = .8;
2609 palette->
nice1.red = LIVES_WIDGET_COLOR_SCALE_255(ncr);
2610 palette->
nice1.green = LIVES_WIDGET_COLOR_SCALE_255(ncg);
2611 palette->
nice1.blue = LIVES_WIDGET_COLOR_SCALE_255(ncb);
2619 palette->
nice1.blue * 255., &ncr, &ncg, &ncb, 1., lmin, lmax)) {
2622 palette->
nice2.red = LIVES_WIDGET_COLOR_SCALE_255(ncr);
2623 palette->
nice2.green = LIVES_WIDGET_COLOR_SCALE_255(ncg);
2624 palette->
nice2.blue = LIVES_WIDGET_COLOR_SCALE_255(ncb);
2629 lmin = .6; lmax = .8;
2631 lmin = .2; lmax = .4;
2636 palette->
nice3.red = LIVES_WIDGET_COLOR_SCALE_255(ncr);
2637 palette->
nice3.green = LIVES_WIDGET_COLOR_SCALE_255(ncg);
2638 palette->
nice3.blue = LIVES_WIDGET_COLOR_SCALE_255(ncb);
2645 set_css_value_direct(NULL, LIVES_WIDGET_STATE_PRELIGHT,
"combobox window menu menuitem",
"border-color", colref);
2648 set_css_value_direct(NULL, LIVES_WIDGET_STATE_CHECKED,
"notebook header tabs *",
"box-shadow", tmp);
2650 set_css_value_direct(NULL, LIVES_WIDGET_STATE_PRELIGHT,
"menu menuitem",
"box-shadow",
"none");
2653 set_css_value_direct(NULL, LIVES_WIDGET_STATE_ACTIVE,
"scrollbar slider",
"background-color", colref);
2655 set_css_value_direct(NULL, LIVES_WIDGET_STATE_PRELIGHT,
"combobox window menu menuitem",
"box-shadow", tmp);
2666 LiVESList *cache_backup;
2668 char *themedir, *themefile, *othemefile, *fname, *tmp;
2669 char *pstyle, *colref;
2671 boolean is_OK =
TRUE;
2672 boolean cached =
FALSE;
2746 set_toolkit_theme(0);
2749 force_reload =
TRUE;
2812 if (!lives_file_test(themedir, LIVES_FILE_TEST_IS_DIR)) {
2816 if (!lives_file_test(themedir, LIVES_FILE_TEST_IS_DIR)) {
2819 set_toolkit_theme(0);
2827 tmp = lives_build_filename(themedir, fname, NULL);
2829 if (lives_file_test(tmp, LIVES_FILE_TEST_EXISTS)) {
2835 tmp = lives_build_filename(themedir, fname, NULL);
2842 tmp = lives_build_filename(themedir, fname, NULL);
2844 if (lives_file_test(tmp, LIVES_FILE_TEST_EXISTS)) {
2849 tmp = lives_build_filename(themedir, fname, NULL);
2856 themefile = lives_build_filename(themedir,
THEME_HEADER, NULL);
2858 #if !GTK_CHECK_VERSION(3, 0, 0)
2860 themefile = lives_build_filename(themedir,
THEME_HEADER_2, NULL);
2864 if (!lives_file_test(themefile, LIVES_FILE_TEST_EXISTS)) {
2866 themefile = lives_build_filename(themedir,
THEME_HEADER_2, NULL);
2868 #if !GTK_CHECK_VERSION(3, 0, 0)
2870 themefile = lives_build_filename(themedir,
THEME_HEADER, NULL);
2873 if (!lives_file_test(themefile, LIVES_FILE_TEST_EXISTS)) {
2881 othemefile = themefile;
2891 set_toolkit_theme(0);
2938 themefile = othemefile;
2970 themefile = othemefile;
2991 set_css_value_direct(NULL, LIVES_WIDGET_STATE_PRELIGHT,
"toolbutton *",
"background-image",
"none");
2994 set_css_value_direct(NULL, LIVES_WIDGET_STATE_NORMAL,
"combobox window menu",
"background-color", colref);
2997 set_css_value_direct(NULL, LIVES_WIDGET_STATE_NORMAL,
"combobox window menu",
"color", colref);
3001 set_css_value_direct(NULL, LIVES_WIDGET_STATE_NORMAL,
"scrollbar",
"background-color", colref);
3002 set_css_value_direct(NULL, LIVES_WIDGET_STATE_PRELIGHT,
"combobox window menu menuitem",
"background-color", colref);
3005 set_css_value_direct(NULL, LIVES_WIDGET_STATE_PRELIGHT,
"combobox window menu menuitem",
"color", colref);
3008 set_css_value_direct(NULL, LIVES_WIDGET_STATE_NORMAL,
"combobox window menu menuitem",
"border-width",
"2px");
3011 set_css_value_direct(NULL, LIVES_WIDGET_STATE_NORMAL,
"combobox window menu menuitem",
"min-height", tmp);
3035 processor_info_array_t processorInfo;
3036 mach_msg_type_number_t numProcessorInfo;
3037 natural_t numProcessors = 0U;
3087 if (!newconfigfile) {
3102 if (numtok < 2)
return capable;
3104 array = lives_strsplit(buffer,
" ", numtok);
3105 if (strcmp(array[0],
"smogrify")) {
3106 lives_strfreev(array);
3113 if (strcmp(array[1], LiVES_VERSION)) {
3114 msg =
lives_strdup_printf(
"Version mismatch: smogrify = %s, LiVES = %s\n", array[1], LiVES_VERSION);
3117 lives_strfreev(array);
3121 lives_strfreev(array);
3143 array = lives_strsplit(buffer,
"|", numtok);
3145 if (!newconfigfile) {
3146 if (!strcmp(array[0],
"smogrify::error")) {
3148 if (!strcmp(array[1],
"config_get")) {
3149 lives_strfreev(array);
3153 if (!strcmp(array[1],
"config_set_new")) {
3154 lives_strfreev(array);
3158 if (!strcmp(array[1],
"config_set_rec")) {
3159 lives_strfreev(array);
3163 if (!strcmp(array[1],
"config_set")) {
3164 lives_strfreev(array);
3182 if (!newconfigfile) {
3188 if (lives_file_test(oldconfig, LIVES_FILE_TEST_EXISTS)) {
3189 lives_strfreev(array);
3193 goto retry_configfile;
3206 old_vhash = lives_strdup(
"NULL");
3208 old_vhash = lives_strdup(
"not present");
3210 old_vhash = lives_strdup(
"unrecoverable");
3214 if (newconfigfile && *newconfigfile) {
3222 if (newconfigfile && *newconfigfile) {
3223 lives_strfreev(array);
3226 newconfigfile = lives_strdup(
"");
3229 goto retry_configfile;
3232 lives_snprintf(dir,
PATH_MAX,
"%s", array[1]);
3236 boolean dir_valid =
TRUE;
3238 if (dirlen && strncmp(dir,
"(null)", 6)) {
3240 msg =
lives_strdup_printf(
"The backend found a workdir (%s), but claimed old version was %s !", dir, old_vhash);
3271 needs_workdir =
TRUE;
3276 msg =
lives_strdup_printf(
"The backend found no workdir, but set startup_phase to %d !\n%s",
3281 needs_workdir =
TRUE;
3291 if (numtok > 4 && *array[4]) {
3298 needs_workdir =
TRUE;
3301 lives_strfreev(array);
3346 lives_printerr(
_(
"\nStartup syntax is: %s [OPTS] [filename [start_time] [frames]]\n"),
capable->
myname);
3347 fprintf(stderr,
"%s",
_(
"Where: filename is the name of a media file or backup file to import\n"));
3348 fprintf(stderr,
"%s",
_(
"start_time : filename start time in seconds\n"));
3349 fprintf(stderr,
"%s",
_(
"frames : maximum number of frames to open\n"));
3350 fprintf(stderr,
"%s",
"\n");
3351 fprintf(stderr,
"%s",
_(
"OPTS can be:\n"));
3352 fprintf(stderr,
"%s",
_(
"-help | --help \t\t\t: print this help text on stderr and exit\n"));
3353 fprintf(stderr,
"%s",
_(
"-version | --version\t\t: print the LiVES version on stderr and exit\n"));
3354 fprintf(stderr,
"%s",
_(
"-workdir <workdir>\t\t: specify the working directory for the session, "
3355 "overriding any value set in preferences\n"));
3356 fprintf(stderr,
"%s",
_(
"\t\t\t\t\t(disables any disk quota checking)"));
3357 fprintf(stderr,
"%s",
_(
"-configfile <path_to_file>\t: override the default configuration file for the session\n"));
3359 fprintf(stderr,
_(
"\t\t\t\t\t(default is %s)\n"), tmp);
3363 fprintf(stderr,
"%s",
_(
"-configdatadir <dir>\t\t: override the default configuration data directory for the session\n"));
3364 fprintf(stderr,
_(
"\t\t\t\t\t(default is %s\n"), tmp);
3367 fprintf(stderr,
"%s",
_(
"-dscrit <bytes>\t\t\t: temporarily sets the free disk space critical level for workdir to <bytes>\n"));
3368 fprintf(stderr,
"%s",
_(
"\t\t\t\t\t(intended to allow correction of erroneous values within the app; "
3369 "<= 0 disables checks)\n"));
3370 fprintf(stderr,
"%s",
_(
"-set <setname>\t\t\t: autoload clip set <setname>\n"));
3371 fprintf(stderr,
"%s",
_(
"-noset\t\t\t\t: do not reload any clip set on startup (overrides -set)\n"));
3372 fprintf(stderr,
"%s",
_(
"-layout <layout_name>\t\t: autoload multitrack layout <layout_name> (if successful, "
3373 "overrides -startup-ce)\n"));
3374 fprintf(stderr,
"%s",
_(
"-nolayout\t\t\t: do not reload any multitrack layout on startup (overrides -layout)\n"));
3375 fprintf(stderr,
"%s",
_(
"-norecover\t\t\t: force non-loading of crash recovery files (overrides -recover / -autorecover)\n"));
3376 fprintf(stderr,
"%s",
3377 _(
"-recover | -autorecover\t\t: force reloading of any crash recovery files (may override -noset and -nolayout)\n"));
3378 fprintf(stderr,
"%s",
_(
"-nogui\t\t\t\t: do not show the gui (still shows the play window when active)\n"));
3379 fprintf(stderr,
"%s",
_(
"-nosplash\t\t\t: do not show the splash window\n"));
3380 fprintf(stderr,
"%s",
3381 _(
"-noplaywin\t\t\t: do not show the play window (still shows the internal player; intended for remote streaming)\n"));
3382 fprintf(stderr,
"%s",
3383 _(
"-noninteractive\t\t\t: disable menu interactivity (intended for scripting applications, e.g liblives)\n"));
3384 fprintf(stderr,
"%s",
_(
"-startup-ce\t\t\t: start in clip editor mode (overrides -startup-mt)\n"));
3385 fprintf(stderr,
"%s",
_(
"-startup-mt\t\t\t: start in multitrack mode\n"));
3386 fprintf(stderr,
"%s",
_(
"-vjmode\t\t\t\t: start in VJ mode (implicitly sets -startup-ce -autorecover "
3387 "-nolayout -asource external)\n"));
3388 fprintf(stderr,
"%s",
3389 _(
"-fxmodesmax <n>\t\t\t: allow <n> modes per effect key (overrides any value set in preferences; minimum is 1)\n"));
3391 fprintf(stderr,
_(
"-oscstart <port>\t\t: start OSC listener on UDP port <port> (default is %d)\n"), DEF_OSC_LISTEN_PORT);
3392 fprintf(stderr,
"%s",
3393 _(
"-nooscstart\t\t\t: do not start the OSC listener (the default, unless set in preferences)\n"));
3395 fprintf(stderr,
"%s",
3396 _(
"-asource <source>\t\t: set the initial audio source (<source> can be 'internal' or 'external')\n"));
3398 fprintf(stderr,
"%s",
_(
"-aplayer <ap>\t\t\t: start with the selected audio player (<ap> can be: "));
3399 #ifdef HAVE_PULSE_AUDIO
3403 #ifdef HAVE_PULSE_AUDIO
3404 fprintf(stderr,
", ");
3409 fprintf(stderr,
"%s",
3410 _(
"-jackopts <opts>\t\t: opts is a bitmap of jackd startup / playback options (default is 16, "
3411 "unless set in Preferences)\n"
3412 "\t\t\t\t\t 1 = LiVES is a jack transport slave, \n"
3413 "\t\t\t\t\t 2 = LiVES is a jack transport master, \n"
3414 "\t\t\t\t\t 4 = start/stop jack transport server on LiVES playback start / stop\n"
3415 "\t\t\t\t\t\t(must be transport master), \n"
3416 "\t\t\t\t\t 8 = pause jack transport when video paused\n"
3417 "\t\t\t\t\t\t(must be transport master),\n"
3418 "\t\t\t\t\t16 = start/stop jack audio server on LiVES startup / shutdown\n"
3419 "\t\t\t\t\t\t(only if audio player is jack)) \n"));
3422 #ifdef HAVE_PULSE_AUDIO
3423 fprintf(stderr,
", ");
3427 #ifdef HAVE_PULSE_AUDIO
3428 else fprintf(stderr,
"%s",
_(
" or "));
3432 fprintf(stderr,
"%s",
_(
"-devicemap <mapname>\t\t: autoload devicemap <mapname> (for MIDI / joystick control)\n"));
3433 fprintf(stderr,
"%s",
_(
"-vppdefaults <file>\t\t: load defaults for video playback plugin from <file>\n"
3434 "\t\t\t\t\t(Note: only affects the plugin settings, not the plugin type)\n"));
3435 #ifdef HAVE_YUV4MPEG
3436 fprintf(stderr,
"%s",
_(
"-yuvin <fifo>\t\t\t: autoplay yuv4mpeg from stream <fifo> on startup\n"));
3437 fprintf(stderr,
"%s",
_(
"\t\t\t\t\t(only valid in clip edit startup mode)\n"));
3439 fprintf(stderr,
"%s",
_(
"-debug\t\t\t\t: try to debug crashes (requires 'gdb' to be installed)\n"));
3440 fprintf(stderr,
"%s",
"\n");
3444 #ifdef HAVE_YUV4MPEG
3445 static boolean open_yuv4m_startup(livespointer data) {
3455 static boolean norecurse =
FALSE;
3456 boolean rec_recovered =
FALSE;
3457 boolean is_recovery = LIVES_POINTER_TO_INT(data);
3458 if (norecurse)
return FALSE;
3481 static boolean checked_trash =
FALSE;
3482 static boolean mwshown =
FALSE;
3483 static boolean dqshown =
FALSE;
3484 static boolean tlshown =
FALSE;
3485 static boolean extra_caps =
FALSE;
3486 static boolean is_first =
TRUE;
3489 dqshown = mwshown = tlshown =
TRUE;
3521 if (!checked_trash) {
3527 checked_trash =
TRUE;
3531 if (ran_ds_dlg) do_show_quota =
FALSE;
3556 do_show_quota =
TRUE;
3559 if (do_show_quota) {
3590 static boolean isfirst =
TRUE;
3593 if (data) isfirst =
TRUE;
3643 static boolean got_files =
FALSE;
3644 static boolean lives_startup2(livespointer data);
3645 static boolean lives_startup(livespointer data) {
3648 char *tmp, *tmp2, *msg;
3651 if (needs_workdir) {
3677 if (*buff && strcmp(buff,
"(null)") && strcmp(buff,
"none")) {
3706 #ifdef HAVE_PULSE_AUDIO
3725 #ifdef HAVE_PULSE_AUDIO
3768 _(
"\n\nThe theme you requested (%s) could not be located.\n"
3769 "Please make sure you have the themes installed in\n%s/%s.\n"
3770 "(Maybe you need to change the value of <prefix_dir> in your %s file)\n"
3773 (tmp2 = lives_filename_to_utf8(
prefs->
configfile, -1, NULL, NULL, NULL)));
3779 upgrade_error =
TRUE;
3782 lives_init(&ign_opts);
3795 _(
"\nLiVES was unable to locate 'mplayer','mplayer2' or 'mpv'. "
3796 "You may wish to install one of these to use LiVES more fully.\n"),
3801 _(
"\nLiVES was unable to locate 'convert'. "
3802 "You should install convert and image-magick "
3803 "if you want to use rendered effects.\n"),
3808 _(
"\nLiVES was unable to locate 'composite'. "
3809 "You should install composite and image-magick "
3810 "if you want to use the merge function.\n"),
3815 _(
"\nLiVES was unable to locate 'sox'. Some audio features may not work. "
3816 "You should install 'sox'.\n"),
3821 _(
"\nLiVES was unable to find any encoder plugins.\n"
3822 "Please check that you have them installed correctly in\n%s%s%s/\n"
3823 "You will not be able to 'Save' without them.\n"
3824 "You may need to change the value of <lib_dir> in %s\n"),
3826 (tmp = lives_filename_to_utf8(
prefs->
configfile, -1, NULL, NULL, NULL)));
3830 upgrade_error =
TRUE;
3853 #if GTK_CHECK_VERSION(3, 0, 0) || defined GUI_QT
3882 jack_audio_read_init();
3885 #ifdef HAVE_PULSE_AUDIO
3887 lives_pulse_init(0);
3888 pulse_audio_read_init();
3902 close(STDOUT_FILENO);
3911 if (upgrade_error) {
3918 if (*start_file && strcmp(start_file,
"-")) {
3938 lives_idle_add_simple(lives_startup2, NULL);
3943 static boolean lives_startup2(livespointer data) {
3945 boolean layout_recovered =
FALSE;
3982 #ifdef HAVE_YUV4MPEG
3983 if (*
prefs->yuvin) lives_idle_add_simple(open_yuv4m_startup, NULL);
4003 ustr = lives_strdup(
"");
4005 d_print(
_(
"\nWelcome to LiVES version %s%s !\n"), LiVES_VERSION, ustr);
4060 if (newconfigfile) {
4079 struct sigaction sact;
4081 sigemptyset(&smask);
4083 #define USE_GLIB_SIGHANDLER
4084 #ifdef USE_GLIB_SIGHANDLER
4095 sact.sa_handler = sigfunc;
4097 sact.sa_mask = smask;
4115 boolean toolong =
FALSE;
4116 char *tmp, *dir, *msg;
4117 pthread_mutexattr_t mattr;
4119 weed_plant_t *test_plant;
4161 putenv(
"LC_NUMERIC=C");
4162 setlocale(LC_NUMERIC,
"C");
4168 bind_textdomain_codeset(GETTEXT_PACKAGE, nl_langinfo(CODESET));
4172 #ifdef GDK_WINDOWING_X11
4177 #if GTK_CHECK_VERSION(4, 0, 0)
4180 gtk_init(&argc, &argv);
4184 g_log_set_default_handler(lives_log_handler, NULL);
4187 #ifndef LIVES_NO_DEBUG
4188 g_printerr(
"FULL DEBUGGING IS ON !!\n");
4197 if (werr != WEED_SUCCESS) {
4202 #ifndef USE_STD_MEMFUNCS
4223 #ifdef ENABLE_DIAGNOSTICS
4224 run_weed_startup_tests();
4246 test_plant = weed_plant_new(0);
4247 if (weed_leaf_set_private_data(test_plant, WEED_LEAF_TYPE, NULL) == WEED_ERROR_CONCURRENCY)
4250 weed_plant_free(test_plant);
4255 lives_set_application_name(
_(
"LiVES"));
4275 #ifdef HAVE_YUV4MPEG
4276 prefs->yuvin[0] =
'\0';
4299 pthread_mutexattr_init(&mattr);
4300 pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);
4336 tmp = getenv(
"HOME");
4351 if (!strcmp(argv[1],
"-capture")) {
4356 }
else if (!strcmp(argv[1],
"-help") || !strcmp(argv[1],
"--help")) {
4375 }
else if (!strcmp(argv[1],
"-version") || !strcmp(argv[1],
"--version")) {
4379 struct option longopts[] = {
4380 {
"aplayer", 1, 0, 0},
4381 {
"asource", 1, 0, 0},
4382 {
"workdir", 1, 0, 0},
4383 {
"configfile", 1, 0, 0},
4384 {
"configdatadir", 1, 0, 0},
4385 {
"dscrit", 1, 0, 0},
4389 {
"devicemap", 1, 0, 0},
4391 {
"vppdefaults", 1, 0, 0},
4392 {
"recover", 0, 0, 0},
4393 {
"autorecover", 0, 0, 0},
4394 {
"norecover", 0, 0, 0},
4396 {
"nosplash", 0, 0, 0},
4397 {
"noplaywin", 0, 0, 0},
4398 {
"noninteractive", 0, 0, 0},
4399 {
"startup-ce", 0, 0, 0},
4400 {
"startup-mt", 0, 0, 0},
4401 {
"vjmode", 0, 0, 0},
4402 {
"fxmodesmax", 1, 0, 0},
4406 {
"oscstart", 1, 0, 0},
4407 {
"nooscstart", 0, 0, 0},
4410 {
"jackopts", 1, 0, 0},
4413 {
"nothreaddialog", 0, 0, 0},
4414 {
"bigendbug", 1, 0, 0},
4415 {
"tmpdir", 1, 0, 0},
4419 int option_index = 0;
4420 const char *charopt;
4426 c = getopt_long_only(argc, argv,
"", longopts, &option_index);
4428 charopt = longopts[option_index].name;
4433 if (!strcmp(charopt,
"workdir") || !strcmp(charopt,
"tmpdir")) {
4438 if (optarg[0] ==
'-') {
4469 if (!strcmp(charopt,
"configdatadir")) {
4474 if (optarg[0] ==
'-') {
4497 if (!strcmp(charopt,
"configfile")) {
4502 if (optarg[0] ==
'-') {
4520 if (!strcmp(charopt,
"norecover")) {
4526 if (!strcmp(charopt,
"recover") || !strcmp(charopt,
"autorecover")) {
4528 auto_recover =
TRUE;
4532 if (!strcmp(charopt,
"debug")) {
4538 if (!strcmp(charopt,
"yuvin")) {
4539 #ifdef HAVE_YUV4MPEG
4544 if (optarg[0] ==
'-') {
4553 lives_snprintf(
prefs->yuvin,
PATH_MAX,
"%s", (tmp = lives_build_filename(dir,
prefs->yuvin, NULL)));
4557 msg = (
_(
"Must have mjpegtools installed for -yuvin to work"));
4564 if (!strcmp(charopt,
"dscrit") && optarg) {
4570 if (optarg[0] ==
'-') {
4580 if (!strcmp(charopt,
"noset")) {
4588 if (!strcmp(charopt,
"set") && optarg) {
4594 if (optarg[0] ==
'-') {
4600 msg = (
_(
"Abort and retry or continue ?"));
4610 if (!strcmp(charopt,
"nolayout")) {
4618 if (!strcmp(charopt,
"layout") && optarg) {
4624 if (optarg[0] ==
'-') {
4636 if (!strcmp(charopt,
"devicemap") && optarg) {
4643 if (optarg[0] ==
'-') {
4648 lives_snprintf(devmap,
PATH_MAX,
"%s", optarg);
4649 devmap2 = lives_strdup(devmap);
4651 if (!strcmp(devmap, devmap2)) {
4654 lives_snprintf(devmap,
PATH_MAX,
"%s", (tmp = lives_build_filename(dir, devmap, NULL)));
4662 if (!strcmp(charopt,
"vppdefaults") && optarg) {
4668 if (optarg[0] ==
'-') {
4683 if (!strcmp(charopt,
"aplayer")) {
4684 boolean apl_valid =
FALSE;
4689 if (optarg[0] ==
'-') {
4694 lives_snprintf(buff, 256,
"%s", optarg);
4718 #ifdef HAVE_PULSE_AUDIO
4733 if (!strcmp(charopt,
"asource")) {
4738 if (optarg[0] ==
'-') {
4743 lives_snprintf(buff, 256,
"%s", optarg);
4745 if (!strcmp(buff,
_(
"external")) || !strcmp(buff,
"external")) {
4748 }
else if (strcmp(buff,
_(
"internal")) && strcmp(buff,
"internal")) {
4749 fprintf(stderr,
_(
"Invalid audio source %s\n"), buff);
4757 if (!strcmp(charopt,
"nogui")) {
4763 if (!strcmp(charopt,
"nosplash")) {
4769 if (!strcmp(charopt,
"noplaywin")) {
4775 if (!strcmp(charopt,
"noninteractive")) {
4781 if (!strcmp(charopt,
"nothreaddialog")) {
4785 if (!strcmp(charopt,
"fxmodesmax") && optarg) {
4790 if (optarg[0] ==
'-') {
4801 if (!strcmp(charopt,
"bigendbug")) {
4811 if (!strcmp(charopt,
"oscstart") && optarg) {
4816 if (optarg[0] ==
'-') {
4828 if (!strcmp(charopt,
"nooscstart")) {
4837 if (!strcmp(charopt,
"jackopts") && optarg) {
4842 if (optarg[0] ==
'-') {
4853 if (!strcmp(charopt,
"startup-ce")) {
4862 if (!strcmp(charopt,
"startup-mt")) {
4871 if (!strcmp(charopt,
"vjmode")) {
4879 if (optind < argc) {
4882 lives_snprintf(start_file,
PATH_MAX,
"%s", argv[optind++]);
4883 if (optind < argc) start = lives_strtod(argv[optind++], NULL);
4884 if (optind < argc) end = atoi(argv[optind++]);
4886 if (lives_strrstr(start_file,
"://") == NULL) {
4890 lives_snprintf(start_file,
PATH_MAX,
"%s", (tmp = lives_build_filename(dir, start_file, NULL)));
4910 theme_error = pre_init();
4946 lives_idle_add_simple(lives_startup, NULL);
4955 return qapp->exec();
5006 char *title, *tmp, *tmp2;
5007 char short_file[256];
5014 lives_snprintf(short_file, 256,
"%s", file);
5015 if (
cfile->restoring || (
cfile->opening &&
cfile->frames == 123456789)) {
5017 (tmp2 = lives_path_get_basename(file)),
cfile->hsize,
cfile->vsize,
cfile->fps);
5026 title = (
_(
"<No File>"));
5106 #ifdef LIBAV_TRANSCODE
5132 cfile->real_pointer_time > 0.);
5139 cfile->real_pointer_time > 0.);
5185 cfile->real_pointer_time > 0.));
5216 #ifdef HAVE_YUV4MPEG
5234 cfile->frame_index != NULL);
5249 !(
cfile->start == 1 &&
5287 #ifdef LIBAV_TRANSCODE
5324 #ifdef HAVE_YUV4MPEG
5338 #ifdef LIBAV_TRANSCODE
5474 if (!
cfile->opening_only_audio) {
5526 lives_painter_surface_t *surface) {
5529 lives_painter_t *cr;
5531 int rwidth, rheight, width, height, owidth, oheight;
5533 if (!surface || !widget)
return;
5536 if (!LIVES_IS_XWINDOW(xwin))
return;
5545 if (!rwidth || !rheight)
return;
5547 rwidth = (rwidth >> 1) << 1;
5548 rheight = (rheight >> 1) << 1;
5554 cx = (rwidth - width) >> 1;
5556 cy = (rheight - height) >> 1;
5562 int xrwidth, xrheight;
5579 width = (width >> 1) << 1;
5580 height = (height >> 1) << 1;
5582 if (width > owidth && height > oheight) {
5589 cx = (rwidth - width) >> 1;
5591 cy = (rheight - height) >> 1;
5627 update_rect.
x = update_rect.
y = 0;
5628 update_rect.
width = rwidth;
5629 update_rect.
height = rheight;
5631 if (!LIVES_IS_XWINDOW(xwin))
return;
5651 LiVESPixbuf *start_pixbuf = NULL;
5652 LiVESPixbuf *orig_pixbuf = NULL;
5655 LiVESInterpType interp;
5656 char *xmd5sum = NULL;
5658 boolean expose =
FALSE;
5659 boolean cache_it =
TRUE;
5660 int rwidth, rheight, width, height;
5679 int bx, by, hsize, vsize;
5704 LiVESError *
error = NULL;
5775 if (!layer && !start_pixbuf) {
5778 WEED_PALETTE_RGB24)) {
5791 if (LIVES_IS_PIXBUF(start_pixbuf)) {
5795 }
else cache_it =
FALSE;
5822 width =
cfile->hsize;
5823 height =
cfile->vsize;
5831 width = (width >> 2) << 2;
5832 height = (height >> 2) << 2;
5845 if (!layer && !start_pixbuf) {
5850 if (!
resize_layer(layer, width, height, interp, WEED_PALETTE_RGB24, 0) ||
5862 else orig_pixbuf = start_pixbuf;
5864 if (start_pixbuf != orig_pixbuf && LIVES_IS_PIXBUF(start_pixbuf)) {
5865 start_pixbuf = NULL;
5867 if (LIVES_IS_PIXBUF(orig_pixbuf)) {
5869 start_pixbuf = orig_pixbuf;
5876 if (LIVES_IS_PIXBUF(start_pixbuf)) {
5880 #if !GTK_CHECK_VERSION(3, 0, 0)
5889 if (start_pixbuf != orig_pixbuf && LIVES_IS_PIXBUF(start_pixbuf)) {
5893 if (LIVES_IS_PIXBUF(orig_pixbuf)) {
5896 }
else cache_it =
FALSE;
5923 LiVESPixbuf *end_pixbuf = NULL;
5924 LiVESPixbuf *orig_pixbuf = NULL;
5927 LiVESInterpType interp;
5928 char *xmd5sum = NULL;
5930 boolean expose =
FALSE;
5931 boolean cache_it =
TRUE;
5932 int rwidth, rheight, width, height;
5951 int bx, by, hsize, vsize;
5976 LiVESError *
error = NULL;
6048 if (!layer && !end_pixbuf) {
6051 WEED_PALETTE_RGB24)) {
6064 if (LIVES_IS_PIXBUF(end_pixbuf)) {
6068 }
else cache_it =
FALSE;
6094 width =
cfile->hsize;
6095 height =
cfile->vsize;
6101 width = (width >> 2) << 2;
6102 height = (height >> 2) << 2;
6114 if (!layer && !end_pixbuf) {
6119 if (!
resize_layer(layer, width, height, interp, WEED_PALETTE_RGB24, 0) ||
6131 else orig_pixbuf = end_pixbuf;
6133 if (end_pixbuf != orig_pixbuf && LIVES_IS_PIXBUF(end_pixbuf)) {
6137 if (LIVES_IS_PIXBUF(orig_pixbuf)) {
6139 end_pixbuf = orig_pixbuf;
6146 if (LIVES_IS_PIXBUF(end_pixbuf)) {
6150 #if !GTK_CHECK_VERSION(3, 0, 0)
6162 if (end_pixbuf != orig_pixbuf && LIVES_IS_PIXBUF(end_pixbuf)) {
6166 if (LIVES_IS_PIXBUF(orig_pixbuf)) {
6169 }
else cache_it =
FALSE;
6208 LiVESPixbuf *pixbuf = NULL;
6210 boolean cache_it =
TRUE;
6211 char *xmd5sum = NULL;
6225 LiVESError *
error = NULL;
6264 if (!update_always) {
6269 preview_frame =
cfile->end;
6275 preview_frame =
cfile->start;
6279 if (preview_frame >
cfile->frames) preview_frame =
cfile->frames;
6342 width =
cfile->hsize;
6343 height =
cfile->vsize;
6352 if (!layer && !pixbuf) {
6356 WEED_PALETTE_RGB24)) {
6359 if (!
resize_layer(layer, width, height, interp, WEED_PALETTE_RGB24, 0) ||
6375 if (LIVES_IS_PIXBUF(pixbuf)) {
6376 LiVESPixbuf *pr_pixbuf = NULL;
6382 if (LIVES_IS_PIXBUF(pr_pixbuf)) {
6388 }
else cache_it =
FALSE;
6389 }
else cache_it =
FALSE;
6414 if (update_always) {
6421 cfile->pointer_time);
6422 if (
cfile->pointer_time > 0.) {
6472 #ifndef NO_PROG_LOAD
6475 static void pbsize_set(GdkPixbufLoader * pbload,
int xxwidth,
int xxheight, livespointer ptr) {
6476 if (xxwidth * xxheight > 0) gdk_pixbuf_loader_set_size(pbload, xxwidth, xxheight);
6484 #ifdef PNG_ASSEMBLER_CODE_SUPPORTED
6485 static png_uint_32 png_flags;
6487 static int png_flagstate = 0;
6489 static void png_init(png_structp png_ptr) {
6490 png_uint_32 mask = 0;
6491 #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
6492 #ifdef PNG_SELECT_READ
6493 int selection = PNG_SELECT_READ;
6494 int mmxsupport = png_mmx_support();
6495 mask = png_get_asm_flagmask(selection);
6497 if (mmxsupport < 1) {
6499 mask &= ~(png_get_mmx_flagmask(selection, &compilerID));
6511 #if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \
6512 && defined(PNG_THREAD_UNSAFE_OK)
6514 if (png_access_version() >= 10200) {
6515 mask &= ~(PNG_ASM_FLAG_MMX_READ_COMBINE_ROW
6516 | PNG_ASM_FLAG_MMX_READ_FILTER_SUB
6517 | PNG_ASM_FLAG_MMX_READ_FILTER_AVG
6518 | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH);
6521 g_printerr(
"Thread unsafe features of libpng disabled.\n");
6527 uint64_t xmask = (uint64_t)mask;
6528 g_printerr(
"enabling png opts %lu\n", xmask);
6531 if (!mask) png_flagstate = -1;
6533 #ifdef PNG_ASSEMBLER_CODE_SUPPORTED
6534 png_flags = png_get_asm_flags(png_ptr);
6543 static void png_read_func(png_structp png_ptr, png_bytep data, png_size_t length) {
6544 int fd = LIVES_POINTER_TO_INT(png_get_io_ptr(png_ptr));
6547 png_error(png_ptr,
"read_fn error");
6555 LiVESInterpType interp;
6560 #ifdef USE_RESTHREAD
6561 static void res_thrdfunc(
void *arg) {
6562 resl_priv_data *priv = (resl_priv_data *)arg;
6563 resize_layer(priv->layer, priv->width, priv->height, priv->interp, priv->pal, priv->clamp);
6569 static void reslayer_thread(
weed_layer_t *layer,
int twidth,
int theight, LiVESInterpType interp,
6570 int tpalette,
int clamp,
double file_gamma) {
6571 resl_priv_data *priv = (resl_priv_data *)
lives_malloc(
sizeof(resl_priv_data));
6573 weed_set_double_value(layer,
"file_gamma", file_gamma);
6574 priv->layer = layer;
6575 priv->width = twidth;
6576 priv->height = theight;
6577 priv->interp = interp;
6578 priv->pal = tpalette;
6579 priv->clamp = clamp;
6586 boolean layer_from_png(
int fd,
weed_layer_t *layer,
int twidth,
int theight,
int tpalette,
boolean prog) {
6587 png_structp png_ptr;
6592 FILE *fp = fdopen(fd,
"rb");
6593 size_t bsize = fread(ibuff, 1, 8, fp);
6594 boolean is_png =
TRUE;
6595 unsigned char ibuff[8];
6598 unsigned char **row_ptrs;
6601 boolean is16bit =
FALSE;
6603 png_uint_32 xwidth, xheight;
6606 int color_type, bit_depth;
6608 int flags, privflags;
6610 png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, NULL, NULL);
6619 #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200)
6620 if (!png_flagstate) png_init(png_ptr);
6621 #ifdef PNG_ASSEMBLER_CODE_SUPPORTED
6622 if (png_flagstate == 1) png_set_asm_flags(png_ptr, png_flags);
6626 info_ptr = png_create_info_struct(png_ptr);
6629 png_destroy_read_struct(&png_ptr, NULL, NULL);
6636 if (setjmp(png_jmpbuf(png_ptr))) {
6638 #ifdef USE_RESTHREAD
6641 png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
6649 png_set_read_fn(png_ptr, LIVES_INT_TO_POINTER(fd), png_read_func);
6651 png_set_sig_bytes(png_ptr, 8);
6653 png_set_sig_bytes(png_ptr, 0);
6656 png_init_io(png_ptr, fp);
6657 png_set_sig_bytes(png_ptr, bsize);
6661 png_read_info(png_ptr, info_ptr);
6662 png_get_IHDR(png_ptr, info_ptr, &xwidth, &xheight,
6665 if (xwidth > 0 && xheight > 0) {
6666 weed_set_int_value(layer, WEED_LEAF_WIDTH, xwidth);
6667 weed_set_int_value(layer, WEED_LEAF_HEIGHT, xheight);
6673 && (
int)xwidth == twidth && (
int)xheight == theight)) {
6674 png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
6684 #if PNG_LIBPNG_VER >= 10504
6687 png_set_alpha_mode(png_ptr, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB);
6690 png_set_alpha_mode(png_ptr, PNG_ALPHA_PREMULTIPLIED, PNG_DEFAULT_sRGB);
6694 weed_set_int_value(layer, WEED_LEAF_FLAGS, flags);
6696 color_type = png_get_color_type(png_ptr, info_ptr);
6697 bit_depth = png_get_bit_depth(png_ptr, info_ptr);
6698 gval = png_get_gAMA(png_ptr, info_ptr, &file_gamma);
6704 png_set_gamma(png_ptr, 1.0, 1.0);
6707 if (gval == PNG_INFO_gAMA) {
6708 weed_set_int_value(layer, WEED_LEAF_GAMMA_TYPE, WEED_GAMMA_LINEAR);
6712 if (color_type == PNG_COLOR_TYPE_PALETTE)
6713 png_set_palette_to_rgb(png_ptr);
6715 if (png_get_valid(png_ptr, info_ptr,
6716 PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr);
6718 if (color_type == PNG_COLOR_TYPE_GRAY &&
6719 bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr);
6721 if (color_type == PNG_COLOR_TYPE_GRAY ||
6722 color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
6723 png_set_gray_to_rgb(png_ptr);
6725 if (bit_depth == 16) {
6728 #ifdef xUSE_16BIT_PCONV
6735 #if PNG_LIBPNG_VER >= 10504
6736 png_set_scale_16(png_ptr);
6738 png_set_strip_16(png_ptr);
6740 #ifdef xUSE_16BIT_PCONV
6745 if (tpalette != WEED_PALETTE_END) {
6748 if (color_type != PNG_COLOR_TYPE_RGB_ALPHA &&
6749 color_type != PNG_COLOR_TYPE_GRAY_ALPHA) {
6750 if (tpalette == WEED_PALETTE_ARGB32)
6751 png_set_add_alpha(png_ptr, 255, PNG_FILLER_BEFORE);
6753 png_set_add_alpha(png_ptr, 255, PNG_FILLER_AFTER);
6754 color_type = PNG_COLOR_TYPE_RGB_ALPHA;
6756 if (tpalette == WEED_PALETTE_ARGB32) {
6757 png_set_swap_alpha(png_ptr);
6762 if (color_type == PNG_COLOR_TYPE_RGB_ALPHA ||
6763 color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
6764 png_set_strip_alpha(png_ptr);
6765 color_type = PNG_COLOR_TYPE_RGB;
6768 if (tpalette == WEED_PALETTE_BGR24 || tpalette == WEED_PALETTE_BGRA32) {
6769 png_set_bgr(png_ptr);
6777 png_read_update_info(png_ptr, info_ptr);
6779 width = png_get_image_width(png_ptr, info_ptr);
6780 height = png_get_image_height(png_ptr, info_ptr);
6782 weed_set_int_value(layer, WEED_LEAF_WIDTH, width);
6783 weed_set_int_value(layer, WEED_LEAF_HEIGHT, height);
6788 if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) {
6811 row_ptrs = (
unsigned char **)
lives_malloc(height *
sizeof(
unsigned char *));
6812 for (
int j = 0; j < height; j++) {
6817 #ifdef USE_RESTHREAD
6818 if (
weed_threadsafe && twidth * theight != 0 && (twidth != width || theight != height) &&
6819 !png_get_interlace_type(png_ptr, info_ptr)) {
6823 gval == PNG_INFO_gAMA ? file_gamma : 1.);
6824 for (
int j = 0; j < height; j++) {
6825 png_read_row(png_ptr, row_ptrs[j], NULL);
6831 png_read_image(png_ptr, row_ptrs);
6839 png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
6846 if (gval == PNG_INFO_gAMA) {
6853 #ifdef USE_RESTHREAD
6856 int clamping, sampling, subspace;
6861 if (tpalette != WEED_PALETTE_YUV420P) tpalette = WEED_PALETTE_YUV444P;
6863 #ifdef USE_RESTHREAD
6881 boolean save_to_png(FILE * fp,
weed_layer_t *layer,
int comp) {
6883 png_structp png_ptr;
6889 #if PNG_LIBPNG_VER >= 10504
6896 png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, NULL, NULL);
6903 info_ptr = png_create_info_struct(png_ptr);
6906 png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
6911 if (setjmp(png_jmpbuf(png_ptr))) {
6913 if (info_ptr) png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
6914 png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
6918 png_init_io(png_ptr, fp);
6925 if (width <= 0 || height <= 0 || rowstride <= 0) {
6926 LIVES_WARN(
"Cannot make png with 0 width or height");
6931 case WEED_PALETTE_RGB24:
6932 case WEED_PALETTE_BGR24:
6933 png_set_IHDR(png_ptr, info_ptr, width, height,
6934 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
6935 PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
6937 case WEED_PALETTE_RGBA32:
6938 case WEED_PALETTE_BGRA32:
6939 png_set_IHDR(png_ptr, info_ptr, width, height,
6940 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE,
6941 PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
6948 png_set_compression_level(png_ptr, comp);
6952 #if PNG_LIBPNG_VER >= 10504
6955 png_set_alpha_mode(png_ptr, PNG_ALPHA_PREMULTIPLIED, PNG_DEFAULT_sRGB);
6957 png_set_alpha_mode(png_ptr, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB);
6962 png_set_gAMA(png_ptr, info_ptr, 1.0);
6964 png_set_gAMA(png_ptr, info_ptr, 0.45455);
6966 png_write_info(png_ptr, info_ptr);
6971 for (i = 0 ; i < height ; i++) {
6972 png_write_row(png_ptr, ptr);
6977 png_write_end(png_ptr, (png_infop)NULL);
6979 if (info_ptr) png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
6980 png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
6990 int height,
int tpalette,
const char *img_ext) {
6991 LiVESPixbuf *pixbuf = NULL;
6992 LiVESError *gerror = NULL;
6995 boolean is_png =
FALSE;
6999 #ifndef NO_PROG_LOAD
7001 GdkPixbufLoader *pbload;
7013 if (fd < 0)
return FALSE;
7022 if (fd < 0)
return FALSE;
7024 #ifdef HAVE_POSIX_FADVISE
7025 posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
7035 ret = layer_from_png(fd, layer, width, height, tpalette,
TRUE);
7045 else pbload = gdk_pixbuf_loader_new();
7048 LIVES_GUI_CALLBACK(pbsize_set), NULL);
7056 if (!gdk_pixbuf_loader_write(pbload, ibuff, bsize, &gerror)) {
7062 if (!gdk_pixbuf_loader_close(pbload, &gerror)) {
7066 pixbuf = gdk_pixbuf_loader_get_pixbuf(pbload);
7082 if (fd < 0)
return FALSE;
7085 #ifdef HAVE_POSIX_FADVISE
7086 posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL);
7090 ret = layer_from_png(fd, layer, width, height, tpalette,
FALSE);
7100 lives_error_free(gerror);
7126 if (fd >= 0) close(fd);
7140 const char *sfont =
"Sans";
7148 xtime = (
double)((int)(xtime * 100. + .5)) / 100.;
7150 if (xtime < 0.)
return layer;
7154 if (!sfile->
subt->
text)
return layer;
7156 size = weed_get_int_value(layer, WEED_LEAF_WIDTH, &
error) / 32;
7173 int target_palette) {
7182 weed_plant_t *vlayer;
7188 boolean is_thread =
FALSE;
7196 weed_leaf_delete(layer, WEED_LEAF_NATURAL_SIZE);
7210 switch (clip_type) {
7256 if (weed_plant_has_leaf(layer,
"alt_src")) {
7257 int srcnum = weed_get_int_value(layer,
"alt_src", NULL);
7262 if (!dplug || !dplug->
cdata) {
7327 if (!pixel_data || !pixel_data[0]) {
7328 char *msg =
lives_strdup_printf(
"NULL pixel data for layer size %d X %d, palette %s\n", width, height,
7344 rowstrides, sfile->
vsize, pixel_data)) {
7349 if (
prefs->
show_dev_opts) g_print(
"Error loading frame %d (index value %d)\n", frame,
7380 if (weed_get_int_value(layer, WEED_LEAF_GAMMA_TYPE, NULL) == WEED_GAMMA_BT709) {
7381 weed_set_int_value(layer, WEED_LEAF_YUV_SUBSPACE, WEED_YUV_SUBSPACE_BT709);
7383 if (weed_get_int_value(layer, WEED_LEAF_YUV_SUBSPACE, NULL) == WEED_YUV_SUBSPACE_BT709) {
7384 weed_set_int_value(layer, WEED_LEAF_GAMMA_TYPE, WEED_GAMMA_BT709);
7401 #ifdef USE_RESTHREAD
7407 #ifdef USE_RESTHREAD
7417 break_me(
"bad frame load from file");
7427 #ifdef HAVE_YUV4MPEG
7440 weed_layer_set_from_lvdev(layer, sfile, 4. /
cfile->pb_fps);
7457 weed_plant_t *inst = (weed_plant_t *)sfile->
ext_src;
7485 double xtime = (double)(frame - 1) / sfile->
fps;
7486 layer = render_subs_from_file(sfile, xtime, layer);
7530 boolean ready =
TRUE;
7533 #ifdef USE_RESTHREAD
7536 if (!layer)
return FALSE;
7546 #ifdef USE_RESTHREAD
7554 if (ready)
return TRUE;
7570 double xtime = (double)(frame - 1) / sfile->
fps;
7571 layer = render_subs_from_file(sfile, xtime, layer);
7583 const char *img_ext;
7588 static void *pft_thread(
void *in) {
7589 pft_priv_data *data = (pft_priv_data *)in;
7591 weed_timecode_t tc = data->tc;
7592 const char *img_ext = data->img_ext;
7593 int width = data->width, height = data->height;
7600 int tgamma = WEED_GAMMA_UNKNOWN;
7637 #ifdef NO_FRAME_THREAD
7642 #ifdef MULT_SRC_TEST
7652 weed_set_int_value(layer,
"alt_src", 0);
7662 pft_priv_data *in = (pft_priv_data *)
lives_calloc(1,
sizeof(pft_priv_data));
7667 in->img_ext = img_ext;
7670 in->height = height;
7679 int width,
int height, LiVESInterpType interp,
boolean fordisp) {
7685 LiVESPixbuf *pixbuf = NULL;
7691 else palette = WEED_PALETTE_RGB24;
7694 else palette = WEED_PALETTE_END;
7704 LiVESPixbuf *pixbuf2;
7722 int rwidth, rheight;
7744 *opwidth =
cfile->hsize;
7745 *opheight =
cfile->vsize;
7758 rheight = *opheight;
7759 *opwidth =
cfile->hsize;
7760 *opheight =
cfile->vsize;
7783 *opwidth =
cfile->hsize;
7784 *opheight =
cfile->vsize;
7794 *opwidth =
cfile->hsize;
7795 *opheight =
cfile->vsize;
7799 *opheight = rheight;
7809 *opwidth = (*opwidth >> 2) << 2;
7810 *opheight = (*opheight >> 2) << 2;
7835 static boolean check_for_overlay_text(
weed_layer_t *layer) {
7875 static void do_cleanup(
weed_layer_t *layer,
int success) {
7896 clip, frame, fps)));
7919 #define USEC_WAIT_FOR_SYNC 500000
7921 static boolean avsync_check(
void) {
7948 #ifdef HAVE_PULSE_AUDIO
7961 clock_gettime(CLOCK_REALTIME, &ts);
7965 ts.tv_nsec += 10000;
7995 void **pd_array, **retdata = NULL;
7996 LiVESPixbuf *pixbuf = NULL;
7998 char *framecount = NULL, *tmp;
7999 char *fname_next = NULL, *info_file = NULL;
8000 const char *img_ext = NULL;
8002 LiVESInterpType interp;
8003 double scrap_file_size = -1;
8007 boolean was_preview =
FALSE;
8008 boolean rec_after_pb =
FALSE;
8009 boolean success =
FALSE;
8010 boolean size_ok =
TRUE;
8011 boolean player_v2 =
FALSE;
8014 int layer_palette, cpal;
8016 static int old_pwidth = 0, old_pheight = 0;
8017 int opwidth = 0, opheight = 0;
8018 int pwidth, pheight;
8019 int lb_width = 0, lb_height = 0;
8020 int bad_frame_count = 0;
8022 int tgamma = WEED_GAMMA_UNKNOWN;
8023 boolean was_letterboxed =
FALSE;
8025 #if defined ENABLE_JACK || defined HAVE_PULSE_AUDIO
8029 #define BFC_LIMIT 1000
8089 weed_plant_t *event_list;
8094 rec_after_pb =
TRUE;
8136 if (audio_timed_out == 0) {
8143 #ifdef HAVE_PULSE_AUDIO
8158 if (audio_timed_out == 0) {
8166 numframes = (bg_file == -1) ? 1 : 2;
8171 frames[0] = (int64_t)fg_frame;
8172 if (numframes == 2) {
8174 frames[1] = (int64_t)bg_frame;
8199 if (!xevent) xevent = event;
8224 for (i = 0; i < 11; i++) {
8226 other_file = LIVES_POINTER_TO_INT(lives_list_nth_data(
mainw->
cliplist, other_file));
8253 if (
cfile->opening) {
8280 if (
cfile->opening_only_audio) {
8284 load_end_image(1 + (
int)((
double)frame * rand() / (RAND_MAX + 1.0)));
8367 weed_set_int_value(layers[i], WEED_LEAF_CURRENT_PALETTE, (
mainw->
clip_index[i] == -1 ||
8412 for (i = 0; layers[i]; i++) {
8433 || !
mainw->
preview || lives_file_test(fname_next, LIVES_FILE_TEST_EXISTS)) {
8439 cfile->hsize,
cfile->vsize, WEED_PALETTE_END)) {
8450 bad_frame_count = 0;
8455 boolean got_preload =
FALSE;
8477 if (delta < 0) g_printerr(
"cached frame TOO LATE, got %ld, wanted %d !!!\n",
8530 if ((fp = fopen(info_file,
"r"))) {
8539 }
while (retval == LIVES_RESPONSE_RETRY);
8634 if (!rec_after_pb) {
8650 weed_plant_t *frame_layer = NULL;
8651 weed_plant_t *return_layer = NULL;
8652 int lwidth, lheight;
8677 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1;
8682 if (!check_for_overlay_text(frame_layer)) {
8693 tgamma = WEED_GAMMA_LINEAR;
8695 tgamma = WEED_GAMMA_SRGB;
8700 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1;
8734 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1;
8737 else return_layer = NULL;
8756 if (return_layer) weed_leaf_dup(return_layer, frame_layer, WEED_LEAF_GAMMA_TYPE);
8766 weed_set_double_value(frame_layer,
"x_range", (
double)lb_width / (
double)pwidth);
8767 weed_set_double_value(frame_layer,
"y_range", (
double)lb_height / (
double)pheight);
8769 weed_set_double_value(frame_layer,
"x_range", 1.0);
8770 weed_set_double_value(frame_layer,
"y_range", 1.0);
8774 if (!avsync_check())
goto lfi_done;
8788 return_layer = NULL;
8790 }
else success =
TRUE;
8804 if (!
resize_layer(return_layer, width, height, LIVES_INTERP_FAST, WEED_PALETTE_END, 0)) {
8813 return_layer = NULL;
8835 weed_plant_t *frame_layer = NULL;
8836 weed_plant_t *return_layer = NULL;
8838 boolean needs_lb =
FALSE;
8864 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1;
8874 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1;
8888 if (pwidth != lb_width || pheight != lb_height) {
8892 if (layer_palette !=
mainw->
vpp->
palette && (pwidth > lb_width || pheight > lb_height)) {
8894 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1;
8904 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1;
8905 if (!
letterbox_layer(frame_layer, pwidth, pheight, lb_width, lb_height, interp,
8907 was_letterboxed =
TRUE;
8910 weed_set_double_value(frame_layer,
"x_range", (
double)lb_width / (
double)pwidth);
8911 weed_set_double_value(frame_layer,
"y_range", (
double)lb_height / (
double)pheight);
8923 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1;
8924 if (!needs_lb || was_letterboxed) {
8926 lb_height = pheight;
8928 if (!
resize_layer(frame_layer, lb_width, lb_height, interp,
8942 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1;
8952 if (!check_for_overlay_text(frame_layer)) {
8963 tgamma = WEED_GAMMA_LINEAR;
8965 tgamma = WEED_GAMMA_SRGB;
8971 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1;
8993 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1;
9002 if (!player_v2)
THREADVAR(rowstride_alignment_hint) = -1 ;
9005 }
else return_layer = NULL;
9017 if (tgamma != WEED_GAMMA_UNKNOWN) {
9018 if (!was_letterboxed) {
9022 lb_width, lb_height,
TRUE);
9028 if (!avsync_check())
goto lfi_done;
9033 weed_set_double_value(frame_layer,
"x_range", 1.0);
9034 weed_set_double_value(frame_layer,
"y_range", 1.0);
9052 return_layer = NULL;
9055 }
else success =
TRUE;
9066 if (
resize_layer(return_layer, width, height, LIVES_INTERP_FAST, WEED_PALETTE_END, 0)) {
9075 return_layer = NULL;
9108 cpal = WEED_PALETTE_RGBA32;
9126 if ((lb_width != pwidth || lb_height != pheight)
9127 || weed_get_boolean_value(
mainw->
frame_layer,
"letterboxed", NULL) == WEED_FALSE) {
9132 was_letterboxed =
TRUE;
9135 lb_height = pheight;
9139 if (lb_width != pwidth || lb_height != pheight ||
9140 weed_get_boolean_value(
mainw->
frame_layer,
"letterboxed", NULL) == WEED_FALSE) {
9183 if (!avsync_check())
goto lfi_done;
9193 if (pwidth < old_pwidth || pheight < old_pheight)
9195 old_pwidth = pwidth;
9196 old_pheight = pheight;
9211 int xwidth, xheight;
9212 LiVESError *gerror = NULL;
9234 #if GTK_CHECK_VERSION(3, 0, 0)
9237 if ((pixbuf = gdk_pixbuf_get_from_window(
mainw->
foreign_window, 0, 0, xwidth, xheight))) {
9241 mainw->foreign_cmap, 0, 0, 0, 0, xwidth, xheight))) {
9245 lives_snprintf(fname,
PATH_MAX,
"%s", tmp);
9250 if (gerror) lives_error_free(gerror);
9259 cfile->frames = frame;
9285 THREADVAR(rowstride_alignment_hint) = 0;
9305 LiVESError **gerrorptr) {
9308 boolean retval =
TRUE;
9314 if (!LIVES_IS_PIXBUF(pixbuf)) {
9323 fd =
lives_open3(fname, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
9329 if (timeout == 0)
return FALSE;
9337 qt_jpeg_save(pixbuf, fname, gerrorptr, quality);
9342 if (LIVES_IS_PIXBUF(pixbuf)) {
9347 qt_png_save(pixbuf, fname, gerrorptr, (
int)((100. - (
double)quality + 5.) / 10.));
9349 }
else retval =
FALSE;
9356 if (*gerrorptr)
return FALSE;
9375 LiVESList *list_index;
9377 boolean need_new_blend_file =
FALSE;
9398 if (
cfile->laudio_drawable) {
9402 if (cairo_surface_get_reference_count(
cfile->laudio_drawable))
9405 cfile->laudio_drawable = NULL;
9407 if (
cfile->raudio_drawable) {
9411 if (cairo_surface_get_reference_count(
cfile->raudio_drawable))
9414 cfile->raudio_drawable = NULL;
9434 for (i = 0; i <
FN_KEYS - 1; i++) {
9439 if (
cfile->menuentry) {
9443 if (!(list_index = lives_list_previous(list_index))) list_index = lives_list_last(
mainw->
cliplist);
9444 index = LIVES_POINTER_TO_INT(lives_list_nth_data(list_index, 0));
9465 if (lives_file_test(clipd, LIVES_FILE_TEST_EXISTS)) {
9485 #ifdef HAVE_YUV4MPEG
9493 lives_vdev_free((lives_vdev_t *)
cfile->ext_src);
9498 if (
cfile->audio_waveform) {
9514 if (
IS_VALID_CLIP(file_to_switch_to) && file_to_switch_to > 0) {
9532 need_new_blend_file =
TRUE;
9670 if (old_file != new_file) {
9740 if (
cfile->menuentry) {
9756 if (
cfile->achans < 2) {
9762 if (
cfile->redoable) {
9771 if (
cfile->menuentry) {
9776 if (
cfile->frames == 0) {
9786 if (
cfile->opening) {
9815 if (
mainw->
jackd->playing_file == new_file ||
9844 jack_message.data = NULL;
9845 jack_message.next = NULL;
9901 jack_message.next = &jack_message2;
9904 jack_message2.next = NULL;
9926 #ifdef HAVE_PULSE_AUDIO
9957 pulse_message.data = NULL;
9958 pulse_message.next = NULL;
10018 pulse_message.next = &pulse_message2;
10020 pulse_message2.next = NULL;
10040 mainw->nullaudio_playing_file = -1;
10044 nullaudio_clip_set(new_file);
10055 nullaudio_get_rec_avals();
10057 nullaudio_get_rec_avals();
10095 weed_plant_t *inst = (weed_plant_t *)
cfile->ext_src;
10170 cfile->next_event = NULL;
10172 #if GTK_CHECK_VERSION(3, 0, 0)
10233 LiVESXWindow *xwin;
10234 double oscale = scale;
10262 else if (w > scr_width - bx || h > scr_height - by) {
10263 w = scr_width - bx;
10286 if (oscale == 2.) {
10306 LiVESError *
error = NULL;
10337 if (LIVES_IS_XWINDOW(xwin)) {
10370 if (scale != oscale) {
10374 else if (w > scr_width - bx || h > scr_height - by) {
10375 w = scr_width - bx;
10376 h = scr_height - by;
#define PREF_STARTUP_INTERFACE
int palette
width in pixels, but converted to macropixels for the player
boolean lives_freep(void **ptr)
#define LIVES_LAYER_LOAD_IF_NEEDS_RESIZE
private flags
#define LIVES_GLOBAL_INLINE
void * jackd
jack audio player / transport
boolean do_startup_tests(boolean tshoot)
void clear_mainw_msg(void)
boolean lives_setenv(const char *name, const char *value)
LiVESWidget * custom_effects_submenu
boolean internal_messaging
internal fx
boolean activate_x11_window(const char *wid)
double blend_factor
keyboard control parameter
LiVESWidget * recent_menu
weed_plant_t * append_frame_event(weed_plant_t *event_list, weed_timecode_t tc, int numframes, int *clips, int64_t *frames)
pthread_mutex_t instance_ref_mutex
refcounting for instances
weed_plant_t * rte_textparm
send keyboard input to this paramter (usually NULL)
void lives_buffered_rdonly_slurp(int fd, off_t skip)
void get_active_track_list(int *clip_index, int num_tracks, weed_plant_t *filter_map)
volatile ticks_t startticks
effective ticks when current frame was (should have been) displayed
#define LIVES_LOCAL_INLINE
boolean normalise_audio
for future use
LIVES_GLOBAL_INLINE boolean get_boolean_prefd(const char *key, boolean defval)
LiVESList * get_plugin_list(const char *plugin_type, boolean allow_nonex, const char *plugdir, const char *filter_ext)
ticks_t lives_get_current_playback_ticks(ticks_t origsecs, ticks_t origusecs, lives_time_source_t *time_source)
boolean mt_needs_idlefunc
set if we need to re-add the idlefunc for autobackup
char * ds_warning_msg(const char *dir, char **mountpoint, uint64_t dsval, uint64_t cwarn, uint64_t nwarn)
LiVESWidget * select_submenu
lives_img_type_t lives_image_type_to_img_type(const char *lives_image_type)
ticks_t last_display_ticks
LiVESList * cliplist
hash table of clips in menu order
LiVESWidget * m_mutebutton
#define WEED_LEAF_SIGNAL_DATA
int swapped_clip
maintains the current cliplist postion even if we swap fg and bg clips
LiVESWidget * LiVES
WIDGETS.
#define PREF_OPEN_MAXIMISED
void get_player_size(int *opwidth, int *opheight)
#define THEME_DETAIL_MT_MARK
LiVESIOChannel * iochan
encoder text output
double fixed_fpsd
<=0. means free playback
LIVES_GLOBAL_INLINE void lives_layer_set_clip(weed_layer_t *layer, int clip)
void lives_exit(int signum)
double lives_ce_update_timeline(int frame, double x)
pointer position in timeline
int active_track_list[MAX_TRACKS]
#define PREF_STOP_SCREENSAVER
LiVESList * prefs_cache
file caches
ssize_t lives_readlink(const char *path, char *buf, size_t bufsiz)
void run_diskspace_dialog(void)
int lives_thread_create(lives_thread_t *thread, lives_thread_attr_t attr, lives_funcptr_t func, void *arg)
char recent_file[PATH_MAX]
LiVESWidgetColor normal_back
#define USE_LIVES_THEMEING
void get_blend_layer(weed_timecode_t tc)
#define PREF_RTE_KEYS_VIRTUAL
#define ASERVER_CMD_FILE_SEEK
#define LIVES_SENSE_STATE_INSENSITIZED
#define JACK_OPTS_NOPLAY_WHEN_PAUSED
play audio even when transport paused
LiVESWidget * preferences
#define PREF_DL_BANDWIDTH_K
LiVESWidget * preview_controls
LiVESWidget * export_allaudio
boolean pick_nice_colour(uint8_t r0, uint8_t g0, uint8_t b0, uint8_t *r1, uint8_t *g1, uint8_t *b1, double max, double lmin, double lmax)
volatile off64_t aseek_pos
audio seek posn. (bytes) for when we switch clips
LiVESWidget * rev_clipboard
LiVESWidgetColor light_red
boolean unordered_blocks
are we recording unordered blocks ?
#define WEED_LEAF_THREAD_PROCESSING
void set_interactive(boolean interactive)
#define LIVES_FLAG_MAINTAIN_VALUE
soft flag, like immutable / deletable for host
LIVES_GLOBAL_INLINE LiVESList * plugin_request_by_line(const char *plugin_type, const char *plugin_name, const char *request)
#define PREF_MT_DEF_ARATE
@ CLIP_TYPE_VIDEODEV
frames from video device
void add_rfx_effects(lives_rfx_status_t status)
add dynamic menu entries
LiVESWidget * vj_save_set
#define DEF_MIDI_CHECK_RATE
default MIDI checks per keyboard cycle (i.e.
boolean has_audio_filters(lives_af_t af_type)
#define DEF_DS_WARN_LEVEL
lives_checkstatus_t has_smogrify
#define LIVES_IS_SENSITIZED
LIVES_GLOBAL_INLINE void lives_layer_set_frame(weed_layer_t *layer, frames_t frame)
weed_plant_t * audio_event
#define PREF_MSG_TEXTSIZE
#define EXEC_MIDISTOP
shipped
_vid_playback_plugin * open_vid_playback_plugin(const char *name, boolean in_use)
boolean last_transition_ins_frames
#define THEME_DETAIL_MT_TCFG
lives_mgeometry_t * mgeom
multi-head support
void mt_desensitise(lives_mt *mt)
int old_active_track_list[MAX_TRACKS]
void close_decoder_plugin(lives_decoder_t *dplug)
#define VPP_CAN_CHANGE_PALETTE
lives_interlace_t interlace
void break_me(const char *brkstr)
LIVES_GLOBAL_INLINE double get_double_pref(const char *key)
boolean get_wm_caps(void)
#define WEED_LEAF_HOST_FLAGS
char ** get_font_list(void)
#define PREF_MT_AUTO_BACK
@ LIVES_STORAGE_STATUS_OVER_QUOTA
LiVESList * file_buffers
list of open files for buffered i/o
pthread_mutex_t abuf_mutex
mutices
LiVESList * xlays
immediately (to be) affected layout maps
lives_thread_data_t * lives_thread_data_create(uint64_t idx)
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_new(int layer_type)
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_set_yuv_subspace(weed_layer_t *layer, int subspace)
char workdir[PATH_MAX]
kept in locale encoding
size_t sl_undo_buffer_used
char jack_aserver[PATH_MAX]
#define PREF_DS_CRIT_LEVEL
LiVESWidget * p_mutebutton
#define WARN_FILE_SIZE
LiVES will show a warning if this (MBytes) is exceeded on load (can be overridden in prefs)
#define WEED_LEAF_HOST_SCRAP_FILE_OFFSET
#define PREF_SHOW_PLAYER_STATS
LiVESWidget * pl_eventbox
void filename_toolong_error(const char *fname, const char *ftype, size_t max, boolean can_retry)
#define LIVES_SEEK_FAST
good
LiVESWidget * resample_audio
char startup_msg[1024]
used for returning startup messages from the backend
boolean can_write_to_config
weed_layer_t * st_fcache
caches for start / end / preview images. This avoids having to reload / reread them from the source,...
boolean pref_trash
user prefers trash to delete (future / present swapped)
lives_checkstatus_t has_pulse_audio
LiVESWidget * export_theme
char omc_midi_fname[PATH_MAX]
utf8
#define PREF_WORKING_DIR_OLD
LiVESWidget * select_last
boolean check_for_recovery_files(boolean auto_recover)
#define LIVES_SENSE_STATE_SENSITIZED
volatile boolean is_exiting
set during shutdown (inverse of only_close then)
weed_plant_t * append_marker_event(weed_plant_t *event_list, weed_timecode_t tc, int marker_type)
#define IS_VALID_CLIP(clip)
boolean no_interp
block interpolation (for single frame previews)
boolean ignore_screen_size
applied during frame reconfig events
boolean crash_recovery
TRUE==maintain mainw->recovery file.
LiVESWidget * splash_window
splash window
#define LIVES_THEME_COMPACT
lives_storage_status_t get_storage_status(const char *dir, uint64_t warn_level, int64_t *dsval, int64_t ds_resvd)
#define WEED_LEAF_PIXEL_BITS
LiVESWidget * m_rewindbutton
LiVESWidgetColor dark_red
_vid_playback_plugin * vpp
video plugin
int size_warn
warn the user that incorrectly sized frames were found (threshold count)
weed_plant_t * get_weed_filter(int idx)
lives_checkstatus_t has_midistartstop
#define LIVES_THRDATTR_PRIORITY
lives_checkstatus_t has_youtube_dl
int * palettes
number forames from one keyframe to the next, 0 if unknown
short q_type
frame quantisation type
#define DEFAULT_AUDIO_SAMPS
boolean get_subt_text(lives_clip_t *sfile, double xtime)
lives_checkstatus_t has_ffmpeg
void * ext_src
points to opaque source for non-disk types
LiVESWidget * show_clipboard_info
#define SPLASH_LEVEL_LOAD_APLAYER
#define LIVES_AUTHOR_EMAIL
boolean show_overlay_msgs
#define PREF_FILESEL_MAXIMISED
#define LIVES_DEF_CONFIG_DATADIR
LIVES_GLOBAL_INLINE LiVESList * plugin_request(const char *plugin_type, const char *plugin_name, const char *request)
void * gtk_thread_wrapper(void *data)
lives_checkstatus_t has_du
#define DEF_FRAME_VSIZE_UNSCALED
#define ASERVER_CMD_FILE_CLOSE
int bigendbug
default 0; 1==use old (bad) behaviour on bigendian machines (r/w bigend ints/doubles); 2==bad reads,...
lives_colRGBA64_t mt_evbox
LIVES_GLOBAL_INLINE int weed_palette_get_nplanes(int pal)
int current_palette
plugin should init this to palettes[0] if URI changes
char * action_desc
for Weed "Applying $s"
int new_clip
clip we should switch to during playback; switch will happen at the designated SWITCH POINT
lives_checkstatus_t has_wmctrl
int calc_frame_from_time(int filenum, double time)
nearest frame [1, frames]
lives_checkstatus_t has_identify
#define AUDIO_PLAYER_NONE
weed_plant_t * on_rte_apply(weed_layer_t *layer, int opwidth, int opheight, weed_timecode_t tc)
LIVES_GLOBAL_INLINE int weed_layer_get_width(weed_layer_t *layer)
boolean fatal
got fatal signal
LiVESWidgetColor normal_fore
boolean open_scrap_file(void)
boolean clip_switched
for recording - did we switch clips ?
frames_t frames
number of video frames
#define PREF_SCREEN_GAMMA
LiVESWidget * paste_as_new
lives_clip_type_t clip_type
weed_leaf_num_elements_f _weed_leaf_num_elements
#define WEED_LEAF_HOST_DEINTERLACE
#define PREF_SHOW_OVERLAY_MSGS
void replace_with_delegates(void)
void do_startup_interface_query(void)
LiVESWidget * play_window
#define LIVES_LAYER_GET_SIZE_ONLY
LIVES_GLOBAL_INLINE void do_abortblank_error(const char *what)
boolean reload_set(const char *set_name)
LIVES_GLOBAL_INLINE boolean lives_strcmp(const char *st1, const char *st2)
returns FALSE if strings match
char frameblank_path[PATH_MAX]
???
char backend[PATH_MAX *4]
frames_t virtual_to_images(int sfileno, frames_t sframe, frames_t eframe, boolean update_progress, LiVESPixbuf **pbr)
char vid_dl_dir[PATH_MAX]
volatile boolean video_seek_ready
boolean decoders_loaded
decoders
boolean record_starting
start recording at next frame
int lives_open2(const char *pathname, int flags)
char proj_save_dir[PATH_MAX]
#define JACK_OPTS_TRANSPORT_CLIENT
jack can start/stop
#define LIVES_FILE_EXT_JPG
void dir_toolong_error(const char *dirname, const char *dirtype, size_t max, boolean can_retry)
char * recovery_file
the filename of our recover file
#define OMC_DEV_MIDI_DUMMY
#define PREF_LIVES_WARNING_MASK
weed_plant_t * frame_layer
int64_t get_best_audio(_vid_playback_plugin *vpp)
#define MULTI_ENCODER3_NAME
LiVESWidget * save_selection
void set_palette_prefs(boolean save)
int num_rendered_effects_builtin
int verhash(char *version)
#define EXEC_JACKD
recommended if (!have_pulseaudio)
weed_plant_t * blend_layer
char * menu_text
for Weed, this is the filter_class "name"
#define is_layer_ready(layer)
LIVES_GLOBAL_INLINE LiVESResponseType get_string_prefd(const char *key, char *val, int maxlen, const char *def)
char * weed_palette_get_name_full(int pal, int clamping, int subspace)
LiVESResponseType do_read_failed_error_s_with_retry(const char *fname, const char *errtext)
LiVESWidget * import_proj
LiVESList * list
list of filter_idx from which user can delegate
int lives_open3(const char *pathname, int flags, mode_t mode)
boolean get_x11_visible(const char *wname)
#define LIVES_COPYRIGHT_YEARS
LiVESWidget * framecounter
@ LIVES_STRING_CONSTANT_CL
"the current layout"
weed_leaf_set_flags_f _weed_leaf_set_flags
#define PREF_LIBVISUAL_PATH
weed_plantptr_t lives_proc_thread_t
lives proc_threads API
boolean push_audio_to_gens
boolean pause_effect_during_preview
mt_opts multi_opts
some multitrack options that survive between mt calls
#define PREF_MOUSE_SCROLL_CLIPS
boolean weed_palette_is_lower_quality(int p1, int p2)
LiVESWidget * ins_silence
frames_t record_frame
frame number to insert in recording
void get_monitors(boolean reset)
#define SEPWIN_TYPE_STICKY
int set_string_pref_priority(const char *key, const char *value)
#define PREF_OMC_DEV_OPTS
pthread_mutex_t alarmlist_mutex
append / remove with file_buffer list
boolean noswitch
value set automatically to prevent 'inopportune' clip switching
boolean btgamma
allows clips to be stored with bt709 gamma - CAUTION not backwards compatible, untested
#define PREF_PUSH_AUDIO_TO_GENS
LiVESWidgetColor menu_and_bars_fore
LIVES_GLOBAL_INLINE int weed_layer_get_palette_yuv(weed_layer_t *layer, int *clamping, int *sampling, int *subspace)
#define DEF_FPSCHANGE_AMOUNT
rate to change pb fps when faster/slower pressed (TODO: make pref)
LIVES_GLOBAL_INLINE LiVESResponseType do_info_dialog(const char *text)
boolean lives_alarm_clear(lives_alarm_t alarm_handle)
ticks_t stream_ticks
ticks since first frame sent to playback plugin
char backend_sync[PATH_MAX *4]
#define TICKS_PER_SECOND_DBL
actually microseconds / 100.
#define PREF_PREF_TRASH
prefer trash to delete
lives_colRGBA64_t mt_timeline_reg
uint64_t ds_crit_level
diskspace critical level bytes
int best_palette_match(int *palette_list, int num_palettes, int palette)
check palette vs.
#define WARN_MASK_NO_MPLAYER
#define DEF_MT_UNDO_SIZE
MB.
@ CANCEL_KILL
normal - kill background processes working on current clip
LiVESWidget * p_playselbutton
weed_plant_free_f _weed_plant_free
LIVES_GLOBAL_INLINE int weed_layer_get_height(weed_layer_t *layer)
boolean pref_trash
user prefers trash to delete
weed_plant_t * add_filter_init_events(weed_plant_t *event_list, weed_timecode_t tc)
add init events for every effect which is switched on
#define WEED_LEAF_OVERLAY_TEXT
int osc_auto
bypass user choices automatically
frames_t actual_frame
actual / last frame being displayed
#define PREF_CONSERVE_SPACE
double blendchange_amount
boolean used_in_current_layout(lives_mt *mt, int file)
LiVESWidgetColor menu_and_bars
size_t get_token_count(const char *string, int delim)
@ CLIP_TYPE_GENERATOR
frames from generator plugin
void set_main_title(const char *file, int untitled)
void do_quick_switch(int new_file)
boolean opening_multi
flag to indicate multiple file selection
weed_layer_t * weed_layer_create(int width, int height, int *rowstrides, int palette)
create a layer, setting the most important properties
_fx_dialog * fx_dialog[2]
void load_preview_image(boolean update_always)
void weed_layer_set_from_lives2lives(weed_layer_t *layer, int clip, lives_vstream_t *lstream)
#define TICKS_PER_SECOND
ticks per second - GLOBAL TIMEBASE
volatile boolean agen_needs_reinit
LiVESWidget * export_submenu
#define CE_TIMELINE_VSPACE
boolean show_msgs_on_startup
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_nullify_pixel_data(weed_layer_t *layer)
LiVESWidget * expl_missing
#define LIVES_DEFAULT_TIMEOUT
uint64_t lives_thread_join(lives_thread_t work, void **retval)
@ RFX_STATUS_ANY
indicates free choice of statuses
#define EXEC_XDG_SCREENSAVER
boolean copy_pixel_data(weed_layer_t *layer, weed_layer_t *old_layer, size_t alignment)
#define INT_CLAMP(i, min, max)
char frei0r_path[PATH_MAX]
char def_vid_load_dir[PATH_MAX]
void weed_layer_set_from_yuv4m(weed_layer_t *layer, lives_clip_t *sfile)
ulong fsp_func
fileselector preview expose (for image thumbnails)
boolean build_init_config(const char *config_datadir, boolean prompt)
pthread_mutex_t cache_buffer_mutex
sync for jack playback termination
#define PREF_MIDI_CHECK_RATE
#define VPP_LOCAL_DISPLAY
boolean toy_go_wild
some silliness
#define lives_nanosleep(nanosec)
LiVESWidgetColor light_green
LiVESWidget * export_proj
weed_event_t * event_list
current event_list, for recording
boolean letterbox_layer(weed_layer_t *layer, int nwidth, int nheight, int width, int height, LiVESInterpType interp, int tpal, int tclamp)
int lives_open_buffered_rdonly(const char *pathname)
boolean load_from_scrap_file(weed_layer_t *layer, int frame)
#define PREF_AUTOLOAD_SUBS
lives_checkstatus_t has_composite
boolean startup_message_nonfatal_dismissable(const char *msg, uint64_t warning_mask)
void lives_pixbuf_set_opaque(LiVESPixbuf *pixbuf)
int lives_touch(const char *tfile)
unsigned char * sl_undo_mem
#define PREF_AHOLD_THRESHOLD
boolean ensure_isdir(char *fname)
weed_plant_t * ref_message
#define LIVES_OSC_NOTIFY_MODE_CHANGED
mode changed to clip editor or to multitrack
short startup_phase
0 = normal , -1 or 1: fresh install, 2: workdir set, 3: startup tests passed, 4: aud pl chosen,...
volatile int rec_aclip
recording values - to be inserted at the following video frame
LIVES_GLOBAL_INLINE int get_int_prefd(const char *key, int defval)
#define THEME_DETAIL_INFO_TEXT
LiVESWidget * preview_spinbutton
#define PREF_STREAM_AUDIO_OUT
_encoder encoder
from main.h
LIVES_GLOBAL_INLINE LiVESResponseType do_error_dialog(const char *text)
boolean switch_audio_clip(int new_file, boolean activate)
LIVES_GLOBAL_INLINE char * get_upd_msg(void)
weed_plant_t * get_last_frame_event(weed_plant_t *event_list)
#define THEME_DETAIL_MT_EVBOX
#define PREF_MT_BACKAUDIO
boolean last_transition_align_start
char ar_clipset_name[128]
locale
frames64_t * frame_index
maps frame slots to the presentation values (if >= 0, points to a 'virtual' frame in the source clip,...
LiVESInterpType get_interp_value(short quality, boolean low_for_mt)
#define WEED_LAYER_TYPE_VIDEO
boolean reverse_pb
used in osc.c
pthread_mutex_t fx_mutex[FX_KEYS_MAX]
used to prevent fx processing when it is scheduled for deinit
void deinterlace_frame(weed_layer_t *layer, weed_timecode_t tc)
#define LIVES_SHORTEST_TIMEOUT
LiVESWidget * resize_menuitem
void threaded_dialog_spin(double fraction)
#define STYLE_PLAIN
no theme (theme 'none')
lives_colRGBA64_t mt_mark
char * get_dir(const char *filename)
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_set_palette(weed_layer_t *layer, int palette)
functions all return the input layer for convenience; no checking for valid values is done if layer i...
lives_render_error_t render_error
lives_img_type_t img_type
char * get_md5sum(const char *filename)
LiVESWidget * toy_random_frames
int pheight
playback height
@ CLIP_TYPE_TEMP
temp type, for internal use only
#define PREF_MT_DEF_SIGNED_ENDIAN
#define SCREEN_AREA_BACKGROUND
@ CLIP_TYPE_DISK
imported video, broken into frames
#define PREF_WEED_PLUGIN_PATH
boolean ign_config_datadir
#define LIVES_OSC_NOTIFY_QUIT
sent when app quits
LiVESWidget * fade_aud_in
lives_clip_data_t * cdata
lives_checkstatus_t has_xdotool
char * string_constants[NUM_LIVES_STRING_CONSTANTS]
#define PREF_INSERT_RESAMPLE
#define PREF_SHOW_TOOLTIPS
float volume
audio volume level (for jack and pulse)
#define PREF_CLEAR_DISK_OPTS
void lives_threadpool_init(void)
LiVESList * set_list
number of sets in workdir (minus the current set), -1 if not checked
int save_to_scrap_file(weed_layer_t *layer)
LIVES_GLOBAL_INLINE void msg_area_scroll_to_end(LiVESWidget *widget, LiVESAdjustment *adj)
ssize_t lives_read_buffered(int fd, void *buf, ssize_t count, boolean allow_less)
#define AUDIO_PLAYER_PULSE_AUDIO
used for display, alternate pref and alternate startup opt (-aplayer pulseaudio)
#define PREF_AUTOCLEAN_TRASH
remove unneeded files on shutdown / startup
LIVES_GLOBAL_INLINE boolean weed_palette_is_yuv(int pal)
weed_plant_t * fd_layer_orig
original layer uneffected
boolean disk_monitor_running(const char *dir)
boolean migrate_config(const char *old_vhash, const char *newconfigfile)
volatile lives_whentostop_t whentostop
lives_painter_surface_t * si_surface
char def_vid_save_dir[PATH_MAX]
LiVESResponseType do_dir_perm_error(const char *dir_name, boolean allow_cancel)
@ LIVES_STORAGE_STATUS_WARNING
lives_checkstatus_t has_mpv
void init_track_decoders(void)
lives_permmgr_t * permmgr
LiVESWidgetColor banner_fade_text
#define VPP_CAN_LETTERBOX
LIVES_GLOBAL_INLINE int * weed_layer_get_rowstrides(weed_layer_t *layer, int *nplanes)
#define DEF_SCRATCHFWD_AMOUNT
weed_plant_t * weed_apply_effects(weed_plant_t **layers, weed_plant_t *filter_map, weed_timecode_t tc, int opwidth, int opheight, void ***pchains)
volatile boolean loop_cont
#define CURRENT_CLIP_HAS_AUDIO
void weed_layer_pixel_data_free(weed_layer_t *layer)
free pixel_data from layer
LIVES_GLOBAL_INLINE boolean weed_palette_is_valid(int pal)
#define THEME_DETAIL_NORMAL_FORE
LiVESWidget * m_sepwinbutton
volatile lives_cancel_t cancelled
lives_storage_status_t ds_status
LiVESWidgetColor info_text
LiVESWidget * export_selaudio
void do_jack_noopen_warn(void)
#define PREF_INSTANT_OPEN
#define PREF_OPEN_COMPRESSION_PERCENT
boolean ar_clipset
auto-reload
boolean enc_letterbox
encode with letterbox
char * ds_critical_msg(const char *dir, char **mountpoint, uint64_t dsval)
warn about disk space
volatile uint32_t audio_opts
#define is_realtime_aplayer(ptype)
LiVESAdjustment * msg_adj
#define THEME_DETAIL_STYLE
weed_plant_list_leaves_f _weed_plant_list_leaves
int get_frame_count(int idx, int xsize)
sets mainw->files[idx]->frames with current framecount
lives_checkstatus_t has_gconftool_2
#define THEME_SEP_IMG_LITERAL
LIVES_GLOBAL_INLINE boolean weed_palette_is_rgb(int pal)
weed_plant_t * afilter_map
#define LIVES_FILE_EXT_MGK
#define PREF_WARN_FILE_SIZE
LiVESWidget * append_audio
#define PREF_KEEP_ALL_AUDIO
int test_palette_conversions(void)
boolean no_context_update
may be set temporarily to block wodget context updates
int lives_utf8_strcasecmp(const char *s1, const char *s2)
void close_ascrap_file(boolean remove)
LiVESWidget * recaudio_sel
ticks_t cevent_tc
timecode of currently processing event
int * rec_rowstrides
if non-NULL, plugin can set recommended vals, pointer to single value set by host
#define WEED_LEAF_SIGNALLED
boolean mouse_scroll_clips
boolean show_desktop_panel
lives_checkstatus_t has_encoder_plugins
boolean(* play_frame)(weed_layer_t *frame, ticks_t tc, weed_layer_t *ret)
#define WEED_LEAF_HOST_DECODER
#define PREF_MT_ENTER_PROMPT
int rte_keys
which effect is bound to keyboard (m) modechange and ctrl-alt-up-arrow / ctrl-alt-down-arrow param ch...
char def_author[1024]
TODO - add to prefs windo.
lives_audio_buf_t * afb[2]
used for buffering / feeding audio to video generators
int weed_get_idx_for_hashname(const char *hashname, boolean fullname)
fullname includes author and version
#define LIVES_STATUS_FILE_NAME
void set_sel_label(LiVESWidget *label)
int ocp
open_compression_percent : get/set in prefs
boolean ext_triggers_poll(livespointer data)
poll for external playback start
lives_checkstatus_t has_ffprobe
LIVES_GLOBAL_INLINE int64_t disk_monitor_wait_result(const char *dir, ticks_t timeout)
#define THEME_DETAIL_FRAMEBLANK_IMAGE
frames_t fps_mini_measure
show fps stats during playback
lives_proc_thread_t lives_proc_thread_create(lives_thread_attr_t attr, lives_funcptr_t func, int return_type, const char *args_fmt,...)
create the specific plant which defines a background task to be run
#define LIVES_EXT_SRC_DECODER
#define PREF_CDPLAY_DEVICE
#define LIVES_FILE_EXT_NEW
void ce_thumbs_highlight_current_clip(void)
#define textdomain(String)
#define LIVES_IS_INTERACTIVE
char libvis_path[PATH_MAX]
boolean preview_rendering
LIVES_GLOBAL_INLINE boolean pull_frame(weed_layer_t *layer, const char *image_ext, weed_timecode_t tc)
pull a frame from an external source into a layer the WEED_LEAF_CLIP and WEED_LEAF_FRAME leaves must ...
boolean recoverable_layout
#define bindtextdomain(Domain, Directory)
lives_checkstatus_t has_icedax
LIVES_GLOBAL_INLINE int get_int_pref(const char *key)
void d_print(const char *fmt,...)
weed_plant_t ** play_params
LiVESWidget * show_file_comments
char * get_val_from_cached_list(const char *key, size_t maxlen, LiVESList *cache)
LiVESList * disabled_decoders
void close_current_file(int file_to_switch_to)
close current file, and try to switch to file_to_switch_to
lives_painter_surface_t * raudio_drawable
int blend_file
background clip details
void switch_to_file(int old_file, int new_file)
boolean stored_layout_save_all_vals
@ LIVES_DIRECTION_REVERSE
boolean keep_pre
set if previewed frames should be retained as processed frames (for rendered effects / generators)
volatile double rec_aseek
pthread_mutex_t avseek_mutex
#define OMC_DEV_FORCE_RAW_MIDI
#define LIVES_THEME_CAMERA
int afbuffer_clients_read
LiVESWidget * ext_audio_checkbutton
char prefix_dir[PATH_MAX]
LiVESWidget * p_playbutton
int YUV_sampling
plugin can change per frame
#define LIVES_DEF_CONFIG_FILE
in LIVES_DEF_CONFIG_DIR unless overridden
LiVESTargetEntry * target_table
drag and drop target table
#define LIVES_URGENCY_ALARM
int pre_src_audio_file
audio file we were playing before any ext input started
LiVESWidget * preview_box
lives_alarm_t overlay_alarm
char cdplay_device[PATH_MAX]
locale encoding
#define VPP_CAN_RESIZE
type sepcific caps
#define DEF_DL_BANDWIDTH
Kb / sec.
#define PREF_MAX_DISP_VTRACKS
LIVES_GLOBAL_INLINE int filter_mutex_unlock(int key)
LiVESWidgetColor mt_timecode_bg
LIVES_GLOBAL_INLINE void lives_notify_int(int msgnumber, int msgint)
weed_leaf_delete_f _weed_leaf_delete
lives_img_type_t img_type
int frame_width
frame is the surrounding part, including any black border (>=width)
LIVES_GLOBAL_INLINE int weed_layer_get_flags(weed_layer_t *layer)
LIVES_GLOBAL_INLINE boolean startup_message_nonfatal(const char *msg)
void get_basename(char *filename)
int set_boolean_pref(const char *key, boolean value)
LiVESPixbuf * scrap_pixbuf
cached image for speeding up rendering
void do_jack_noopen_warn2(void)
#define DEF_WARNING_MASK
bits 10, 11, 13, 18 and 19 set (off by default)
LIVES_GLOBAL_INLINE int weed_layer_get_palette(weed_layer_t *layer)
void procw_desensitize(void)
ticks_t deltaticks
deltaticks for scratching
weed_error_t weed_plant_free_host(weed_plant_t *plant)
#define PREF_VIDEO_OPEN_COMMAND
boolean lives_make_writeable_dir(const char *newdir)
uint32_t signed_endian
bitfield
char video_open_command[PATH_MAX *2]
LiVESWidget * spinbutton_end
@ CLIP_TYPE_FILE
unimported video, not or partially broken in frames
#define PREF_OMC_JS_FNAME
int pre_src_file
video file we were playing before any ext input started
boolean startup_message_info(const char *msg)
boolean midi_channel_lock
void(* SignalHandlerPointer)(int)
boolean cconx_chain_data(int key, int mode)
#define USEC_WAIT_FOR_SYNC
int num_rendered_effects_custom
boolean pull_frame_at_size(weed_layer_t *layer, const char *image_ext, weed_timecode_t tc, int width, int height, int target_palette)
#define PREF_PBQ_ADAPTIVE
ticks_t origsecs
playback start seconds - subtracted from all other ticks to keep numbers smaller
lives_checkstatus_t has_xdg_screensaver
boolean playing_sel
list of set names in current workdir, mau be NULL
weed_leaf_get_f _weed_leaf_get
LiVESWidget * spinbutton_start
lives_screen_area_t * screen_areas
char omc_js_fname[PATH_MAX]
utf8
#define LIVES_OSC_NOTIFY_FRAME_SYNCH
sent when a frame is displayed
LiVESWidget * recaudio_submenu
frames_t * frame_index
index of frames for CLIP_TYPE_FILE >0 means corresponding frame within original clip -1 means corresp...
boolean msg_area_config(LiVESWidget *widget)
#define AUDIO_PLAYER_JACK
@ CANCEL_NO_MORE_PREVIEW
ran out of preview frames
LIVES_GLOBAL_INLINE void avsync_force(void)
boolean create_empty_pixel_data(weed_layer_t *layer, boolean black_fill, boolean may_contig)
creates pixel data for layer
#define LIVES_DEVICEMAP_DIR
volatile int blend_palette
here we can store the details of the blend file at the insertion point, if nothing changes we can tar...
boolean cs_permitted
set to TRUE to allow overriding of noswitch in limited circumstances
LiVESWidget * trim_submenu
lives_painter_surface_t * ei_surface
set in set_palette_colours()
#define THEME_DETAIL_ALT_BACK
void switch_clip(int type, int newclip, boolean force)
LiVESWidget * open_vcd_menu
int scrap_file
we throw odd sized frames here when recording in real time; used if a source is a generator or stream
LiVESWidget * start_image
#define PREF_SHOW_BUTTON_ICONS
#define PREF_ACTIVE_AUTOTRANS
ulong deduce_file(const char *filename, double start_time, int end)
#define FN_KEYS
number of function keys
#define SPLASH_LEVEL_LOAD_RFX
void insert_audio_event_at(weed_plant_t *event, int track, int clipnum, double seek, double vel)
LiVESWidget * delsel_audio
void cached_list_free(LiVESList **list)
#define PREF_AUTO_TRIM_PAD_AUDIO
#define THEME_DETAIL_FRAME_SURROUND
void reset_clipmenu(void)
LIVES_GLOBAL_INLINE uint8_t * weed_layer_get_pixel_data_packed(weed_layer_t *layer)
char vpp_defs_file[PATH_MAX]
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_set_size(weed_layer_t *layer, int width, int height)
#define DEF_BLENDCHANGE_AMOUNT
adjustment amount for effect parameter via keyboard (TODO: make pref)
LiVESList * stored_layout_undos
#define FX_CANDIDATE_DEINTERLACE
void switch_aud_to_none(boolean set_pref)
volatile int abufs_to_fill
LiVESXWindow * foreign_window
#define PREF_SCFWD_AMOUNT
#define CURRENT_CLIP_HAS_VIDEO
LiVESList * get_list_pref(const char *key)
boolean show_urgency_msgs
#define PREF_AUDIO_PLAYER
boolean resync_audio(double frameno)
resync audio playback to the current video frame
char * lives_fgets(char *s, int size, FILE *stream)
boolean memok
set to FALSE if a segfault is received, ie. we should assume all memory is corrupted and exit ASAP
lives_checkstatus_t has_mplayer
#define PREF_DISABLED_DECODERS
#define FX_DATA_KEY_PLAYBACK_PLUGIN
#define PREF_AUTO_CUT_BORDERS
int playing_file
which number file we are playing (or -1) [generally mainw->current_file]
LIVES_GLOBAL_INLINE int filter_mutex_trylock(int key)
#define PREFIX_DEFAULT
this must match AC_PREFIX_DEFAULT in configure.in TODO - when lives-plugins is a separate package,...
LiVESWidget * p_rewindbutton
#define P_(String, StringPlural, n)
boolean has_devicemap(int has_this_macro)
void get_location(const char *exe, char *val, int maxlen)
startup overrides from commandline
ticks_t flush_audio_tc
reserved space for mbar
int max_modes_per_key
maximum effect modes per key
LiVESWidget * m_loopbutton
lives_clip_t * files[MAX_FILES+1]
+1 for the clipboard
boolean cs_is_permitted
set automatically when cs_permitted can update the clip
boolean add_trash_rb
these are freed when the clip is switched or closed, or when the source frame changes or is updated
char theme[64]
the theme name
weed_error_t weed_leaf_delete_host(weed_plant_t *plant, const char *key)
@ CANCEL_PREVIEW_FINISHED
effect processing finished during preview
const char * image_ext_to_lives_image_type(const char *img_ext)
@ LIVES_STRING_CONSTANT_ANY
char def_image_dir[PATH_MAX]
#define LIVES_DEF_CONFIG_FILE_OLD
pre 3.2.0
lives_decoder_t * track_decoders[MAX_TRACKS]
volatile float volume
audio volume level (for jack and pulse)
#define DEF_SCRATCHBACK_AMOUNT
forward/back scratch value (TODO: make pref)
boolean can_read_from_config
volatile boolean audio_seek_ready
LIVES_GLOBAL_INLINE boolean weed_palette_has_alpha(int pal)
LIVES_GLOBAL_INLINE int64_t get_int64_prefd(const char *key, int64_t defval)
boolean get_colour_pref(const char *key, lives_colRGBA64_t *lcol)
#define PREF_ALLOW_EASING
#define FX_KEYS_PHYSICAL_EXTRA
weed_plant_new_f _weed_plant_new
weed_leaf_set_f _weed_leaf_set
#define THEME_DETAIL_CE_UNSEL
#define PREF_MASTER_VOLUME
boolean mt_load_recovery_layout(lives_mt *mt)
void * pulsed
pulseaudio player
int lives_close_buffered(int fd)
#define WEED_LEAF_RESIZE_THREAD
boolean init_memfuncs(void)
char weed_plugin_path[PATH_MAX]
#define SEPWIN_TYPE_NON_STICKY
double aframeno
and the audio 'frame' for when we are looping
#define WEED_LEAF_HOST_KEY
LiVESWidget * menuitem
the menu item which activates this effect
frames_t rec_vid_frames
values to be written to the event list concurrent with next video ftame event
void animate_multitrack(lives_mt *mt)
int real_main(int argc, char *argv[], pthread_t *gtk_thread, ulong id)
#define DEFAULT_AUDIO_RATE
defaults for when not specifed
pthread_mutex_t event_list_mutex
prevent simultaneous writing to event_list by audio and video threads
_palette * palette
interface colour settings
LIVES_GLOBAL_INLINE void do_optarg_blank_err(const char *what)
lives_render_error_t(* progress_fn)(boolean reset)
boolean force64bit
< force system clock (rather than soundcard) for timing ( better for high framerates )
boolean force_single_monitor
LiVESWidget * delall_audio
LiVESResponseType do_error_dialog_with_check(const char *text, uint64_t warn_mask_number)
#define THEME_DETAIL_AUDCOL
void make_preview_box(void)
boolean show_button_images
double freeze_fps
pb_fps for paused / frozen clips
off_t sget_file_size(const char *name)
void event_list_free(weed_plant_t *event_list)
void load_start_image(int frame)
#define PREF_MT_DEF_HEIGHT
void rte_swap_fg_bg(void)
lives_colRGBA64_t ce_unsel
boolean recording_recovered
weed_event_t * lives_event_list_new(weed_event_t *elist, const char *cdate)
lib-ish stuff
int *(* get_audio_fmts)(void)
error("LSD_RANDFUNC(ptr, size) must be defined")
void weed_generator_end(weed_plant_t *inst)
LiVESWidget * custom_gens_submenu
boolean check_for_executable(lives_checkstatus_t *cap, const char *exec)
char jack_tserver[PATH_MAX]
weed_event_t * stored_event_list
stored mt -> clip editor
#define THEME_DETAIL_CE_SEL
LiVESWidget * open_loc_menu
boolean show_desktop_panel(void)
boolean check_layer_ready(weed_layer_t *layer)
block until layer pixel_data is ready.
void close_scrap_file(boolean remove)
LiVESWidget * m_playbutton
int close_temp_handle(int new_clip)
close cfile and switch to new clip (may be -1)
LiVESWidget * import_theme
int weed_filter_highest_version(const char *pkg, const char *fxname, const char *auth, int *xversion)
boolean get_distro_dets(void)
volatile boolean threaded_dialog
not really threaded ! but threaded_dialog_spin() can be called to animate it
int play_sequence
currticks when last display was shown (used for fixed fps)
boolean backup_recording(char **esave_file, char **asave_file)
boolean rec_desktop_audio
int weed_layer_get_gamma(weed_layer_t *layer)
int delegate
offset in list of current delegate
#define FX_CANDIDATE_RESIZER
WEED_GLOBAL_INLINE uint32_t weed_leaf_clear_flagbits(weed_plant_t *plant, const char *leaf, uint32_t flagbits)
~value ANDed with flags
LIVES_GLOBAL_INLINE ticks_t lives_get_current_ticks(void)
lives_painter_surface_t * laudio_drawable
#define PREF_SHOW_URGENCY
int set_int_pref(const char *key, int value)
#define LIVES_OSC_NOTIFY_CLIP_CLOSED
sent after a clip is closed
lives_checkstatus_t has_dvgrab
LIVES_GLOBAL_INLINE LiVESPixbuf * pull_lives_pixbuf(int clip, int frame, const char *image_ext, weed_timecode_t tc)
#define THEME_DETAIL_MT_TLREG
void load_default_keymap(void)
void get_letterbox_sizes(int *pwidth, int *pheight, int *lb_width, int *lb_height, boolean player_can_upscale)
calculate sizes for letterboxing
void resize_play_window(void)
boolean mt_pertrack_audio
uint64_t lives_thread_attr_t
boolean show_player_stats
boolean gen_to_clipboard
rendered generators
boolean leave_files
TRUE to leave clip files on disk even when closing (default FALSE)
void init_colour_engine(void)
int arps
audio physical sample rate (i.e the "normal" sample rate of the clip when played at 1,...
void splash_msg(const char *msg, double pct)
pthread_mutex_t fbuffer_mutex
LIVES_GLOBAL_INLINE LiVESResponseType do_abort_ok_dialog(const char *text)
#define THEME_DETAIL_NORMAL_BACK
void catch_sigint(int signum)
weed_leaf_get_flags_f _weed_leaf_get_flags
LiVESWidget * framedraw_preview
the 'redraw' button
lives_rfx_t * rfx
pointer to rfx for current delegate (or NULL)
#define lives_strdup_printf(fmt,...)
@ CLIP_TYPE_LIVES2LIVES
type for LiVES to LiVES streaming
volatile boolean ext_audio
using external video playback plugin to stream audio
LiVESWidget * open_lives2lives
#define GUI_SCREEN_HEIGHT
void on_capture2_activate(void)
const char * get_midi_filename(void)
#define SPLASH_LEVEL_BEGIN
boolean(* set_palette)(lives_clip_data_t *)
boolean osc_block
TODO - make this a mutex and more finely grained : things we need to block are (clip switches,...
#define LIVES_DEF_DCLICK_TIME
default double click time (milliseconds), can be overriden by system settings
LiVESWidget * preview_image
#define WEED_LEAF_HOST_PTHREAD
boolean debug
debug crashes and asserts
void set_drawing_area_from_pixbuf(LiVESWidget *widget, LiVESPixbuf *pixbuf, lives_painter_surface_t *surface)
boolean convert_layer_palette(weed_layer_t *layer, int outpl, int op_clamping)
void weed_load_all(void)
load effects
weed_plant_t * render_text_to_layer(weed_layer_t *layer, const char *text, const char *fontname, double size, lives_text_mode_t mode, lives_colRGBA64_t *fg_col, lives_colRGBA64_t *bg_col, boolean center, boolean rising, double top)
boolean deinterlace
auto deinterlace
#define LIVES_IMAGE_TYPE_JPEG
pthread_mutex_t audio_filewriteend_mutex
sync for ending writing audio to file
LIVES_GLOBAL_INLINE weed_plant_t * get_last_event(weed_plant_t *event_list)
#define WEED_LEAF_PROGSCAN
weed_plant_t weed_layer_t
LIVES_GLOBAL_INLINE void do_messages_window(boolean is_startup)
void lives_list_free_all(LiVESList **)
char * ensure_extension(const char *fname, const char *ext) WARN_UNUSED
boolean can_write_to_workdir
LIVES_GLOBAL_INLINE boolean get_boolean_pref(const char *key)
WEED_GLOBAL_INLINE uint32_t weed_leaf_set_flagbits(weed_plant_t *plant, const char *leaf, uint32_t flagbits)
value ORed with flags
char * get_mountpoint_for(const char *dir)
@ CANCEL_KEEP_LOOPING
special cancel for TV toy
uint64_t get_version_hash(const char *exe, const char *sep, int piece)
int hsize
frame width (horizontal) in pixels (NOT macropixels !)
#define LIVES_MAIN_WINDOW_WIDGET
boolean close_keep_frames
special value for when generating to clipboard
#define THEME_FRAME_IMG_LITERAL
int main(int argc, char *argv[])
@ CLIP_TYPE_NULL_VIDEO
generates blank video frames
char ladspa_path[PATH_MAX]
#define FX_KEYS_MAX_VIRTUAL
must be >= FX_KEYS_PHYSICAL, and <=64 (number of bits in a 64bit int mask) (max number of keys accesi...
@ LIVES_TEXT_MODE_FOREGROUND_AND_BACKGROUND
LIVES_GLOBAL_INLINE lives_cancel_t handle_audio_timeout(void)
#define LIVES_THRDATTR_NONE
const lives_decoder_sys_t * decoder
boolean omc_events
send other events
LiVESWidget * show_file_info
LIVES_GLOBAL_INLINE int weed_layer_get_yuv_clamping(weed_layer_t *layer)
@ CANCEL_GENERATOR_END
generator was stopped
boolean do_audio_choice_dialog(short startup_phase)
int seek_flag
plugin can change per frame
int ascrap_file
scrap file for recording audio scraps
boolean stored_event_list_changed
#define PB_QUALITY_MED
default
void close_clip_decoder(int clipno)
boolean get_screen_usable_size(int *w, int *h)
pthread_mutex_t clip_list_mutex
prevent adding/removing to cliplist while another thread could be reading it
#define AUDIO_OPTS_FOLLOW_FPS
#define PREVIEW_BOX_HT
height of preview widgets in sepwin
volatile int uflow_count
experimental values, primarily for testing
#define PREF_SHOW_RECENT_FILES
int img_concat_clip
when opening multiple, image files can get concatenated here (prefs->concat_images)
LiVESWidgetColor fade_colour
weed_layer_t * weed_layer_copy(weed_layer_t *dlayer, weed_layer_t *slayer)
copy source layer slayer to dest layer dlayer
void pull_frame_threaded(weed_layer_t *layer, const char *img_ext, weed_timecode_t tc, int width, int height)
LiVESWidget * utilities_submenu
LiVESWidget * select_invert
#define PREF_MIDI_RCV_CHANNEL
uint64_t ds_warn_level
diskspace warn level bytes
void add_rfx_effects2(lives_rfx_status_t status)
#define SCREEN_AREA_FOREGROUND
boolean block_param_updates
block visual param changes from updating real values
char def_proj_dir[PATH_MAX]
#define PREF_STARTUP_PHASE
LiVESWidget * framedraw
for the framedraw special widget - TODO - use a sub-struct
#define DEF_FRAME_HSIZE_UNSCALED
LIVES_GLOBAL_INLINE size_t lives_strlen(const char *s)
boolean has_custom_utilities
#define DEF_DS_CRIT_LEVEL
_future_prefs * future_prefs
ssize_t lives_popen(const char *com, boolean allow_error, char *buff, ssize_t buflen)
char * wm_type
window manager type, e.g. x11
@ LIVES_STRING_CONSTANT_RECOMMENDED
LIVES_GLOBAL_INLINE int lives_strappend(const char *string, int len, const char *xnew)
#define CURRENT_CLIP_IS_NORMAL
void free_thumb_cache(int fnum, frames_t fromframe)
#define PREF_MT_PERTRACK_AUDIO
#define PREF_CE_THUMB_MODE
lives_timeout_t alarms[LIVES_MAX_ALARMS]
reserve 1 for emergency msgs
char home_dir[PATH_MAX]
home directory - default location for config file - locale encoding
LIVES_GLOBAL_INLINE void ** weed_layer_get_pixel_data(weed_layer_t *layer, int *nplanes)
LiVESWidget * open_device_menu
LiVESList * hdrs_cache
cache of a file header (e.g. header.lives)
int def_width
default sizes for when no file is loaded
boolean add_clear_ds_button
char * subt_save_file
name of file to save subtitles to
LIVES_GLOBAL_INLINE int lives_getuid(void)
weed_leaf_element_size_f _weed_leaf_element_size
#define AUDIO_CODEC_UNKNOWN
volatile boolean in_fs_preview
lives_mt * multitrack
holds a pointer to the entire multitrack environment; NULL in Clip Edit mode
@ CANCEL_CAPTURE_ERROR
image could not be captured
ulong func
menuitem activation function for current delegate
boolean has_session_workdir
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_set_yuv_sampling(weed_layer_t *layer, int sampling)
#define ASERVER_CMD_FILE_OPEN
#define CURRENT_CLIP_IS_VALID
ticks_t lives_alarm_check(lives_alarm_t alarm_handle)
#define PREF_BACK_COMPAT
forces backwards compatibility with earlier versions
boolean is_virtual_frame(int sfileno, frames_t frame)
char backend_path[PATH_MAX]
weed_layer_t * create_blank_layer(weed_layer_t *layer, const char *image_ext, int width, int height, int target_palette)
fills layer with default values.
#define PREF_SAVE_DIRECTORIES
char ar_layout_name[PATH_MAX]
locale
#define LIVES_IMAGE_TYPE_PNG
#define LIVES_SHORT_TIMEOUT
int offset
offset in frames (default 0)
boolean suppress_dprint
tidy up, e.g. by blocking "switched to file..." and "closed file..." messages
#define THEME_DETAIL_INFO_BASE
LiVESWidget * int_audio_checkbutton
@ CLIP_TYPE_YUV4MPEG
yuv4mpeg stream
void disk_monitor_forget(void)
int aud_rec_fd
fd of file we are recording audio to
lives_proc_thread_t disk_monitor_start(const char *dir)
lives_colRGBA64_t frame_surround
volatile boolean record_paused
pause during recording
uint32_t last_grabbable_effect
char vpp_name[64]
new video playback plugin
weed_plant_t weed_event_t
#define SPLASH_LEVEL_LOAD_RTE
LiVESWidget * framedraw_spinbutton
the frame number button
#define EXEC_MIDISTART
shipped
lives_checkstatus_t has_xwininfo
lives_checkstatus_t has_mplayer2
#define RFX_PROPS_MAY_RESIZE
is a tool
void mt_clip_select(lives_mt *mt, boolean scroll)
int last_dprint_file
message output settings
void do_jack_noopen_warn4(void)
pthread_mutex_t fxd_active_mutex
prevent simultaneous writing to active_dummy by audio and video threads
void update_sel_menu(void)
#define PREF_DS_WARN_LEVEL
void remove_from_clipmenu(void)
lives_checkstatus_t has_md5sum
#define PREF_REC_DESKTOP_AUDIO
LIVES_GLOBAL_INLINE void on_render_fx_pre_activate(LiVESMenuItem *menuitem, lives_rfx_t *rfx)
LiVESList * current_layouts_map
map of all layouts for set
int num_tr_applied
number of transitions active
boolean can_write_to_config_new
char * make_image_file_name(lives_clip_t *clip, frames_t frame, const char *img_ext)
lives_image_type can be a string, lives_img_type_t is an enumeration
LIVES_GLOBAL_INLINE int lives_layer_get_clip(weed_layer_t *layer)
LiVESWidget * vj_load_set
int add_messages_to_list(const char *text)
#define MULTI_ENCODER_NAME
@ LIVES_STRING_CONSTANT_DISABLED
void msg_area_scroll(LiVESAdjustment *adj, livespointer userdata)
int midi_check_rate
deprecated
void do_jack_noopen_warn3(void)
LIVES_GLOBAL_INLINE void free_track_decoders(void)
@ LIVES_STRING_CONSTANT_BUILTIN
LIVES_GLOBAL_INLINE weed_layer_t * lives_layer_new_for_frame(int clip, frames_t frame)
#define PREF_RENDER_PROMPT
#define MAX_FILES
max files is actually 1 more than this, since file 0 is the clipboard
#define PREF_MT_EXIT_RENDER
boolean only_close
only close clips - do not exit
void zero_spinbuttons(void)
boolean smog_version_correct
boolean do_workdir_query(void)
@ LIVES_STORAGE_STATUS_NORMAL
lives_checkstatus_t has_jackd
boolean set_palette_colours(boolean force_reload)
LIVES_GLOBAL_INLINE void do_upgrade_error_dialog(void)
LiVESList * gen_cache
general cache of fi
#define LIVES_FILE_EXT_TMP
LiVESWidget * trim_to_pstart
#define MAX_SET_NAME_LEN
sets
lives_checkstatus_t has_sox_sox
ulong open_file(const char *filename)
boolean no_exit
if TRUE, do not exit after saving set
#define JACK_OPTS_TRANSPORT_MASTER
transport master
LiVESWidgetColor dark_orange
char * wm_name
window manager name, may be different from wm_caps.wwm_name
LiVESWidgetColor info_base
uint64_t next_ds_warn_level
current disk space warning level for the tempdir
#define THEME_DETAIL_ALT_FORE
void lives_notify(int msgnumber, const char *msgstring)
boolean stored_event_list_auto_changed
void play_window_set_title(void)
#define THEME_DETAIL_MT_TCBG
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_set_gamma(weed_layer_t *layer, int gamma_type)
#define LIVES_DEF_DCLICK_DIST
default double click dist. (pixels), can be overriden by system settings
void set_signal_handlers(SignalHandlerPointer sigfunc)
boolean ext_playback
using external video playback plugin
char * file_open_params
extra parameters for opening special files
const char * get_image_ext_for_type(lives_img_type_t imgtype)
char sepimg_path[PATH_MAX]
lives_pconnect_t * pconx
list of out -> in param connections
LIVES_GLOBAL_INLINE boolean get_play_screen_size(int *opwidth, int *opheight)
int pre_play_file
the current file before playback started
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_set_palette_yuv(weed_layer_t *layer, int palette, int clamping, int sampling, int subspace)
@ LIVES_STRING_CONSTANT_NONE
lives_cursor_t cursor_style
LiVESList * affected_layouts_map
map of layouts with errors
#define AUDIO_PLAYER_PULSE
used in pref and for external players (e.g -ao pulse, -aplayer pulse)
boolean convert_layer_palette_full(weed_layer_t *layer, int outpl, int oclamping, int osampling, int osubspace, int tgamma)
convert the palette of a layer
boolean multitrack_delete(lives_mt *mt, boolean save_layout)
LiVESWidget * btoolbar
button toolbar - clip editor
lives_painter_surface_t * play_surface
volatile lives_audio_buf_t * audio_frame_buffer
used for buffering / feeding audio to video generators
boolean force_system_clock
#define PREF_MT_DEF_WIDTH
boolean letterbox
playback with letterbox
boolean omc_noisy
send success/fail
LIVES_GLOBAL_INLINE frames_t lives_layer_get_frame(weed_layer_t *layer)
void on_open_yuv4m_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define get_indexed_frame(clip, frame)
boolean resize_layer(weed_layer_t *layer, int width, int height, LiVESInterpType interp, int opal_hint, int oclamp_hint)
resize a layer
LiVESWidget * loop_continue
boolean has_custom_effects
void lives_yuv_stream_stop_read(lives_yuv4m_t *yuv4mpeg)
int check_for_bad_ffmpeg(void)
double pb_fps
current playback rate, may vary from fps, can be 0. or negative
boolean lives_parse_font_string(const char *string, char **font, int *size, char **stretch, char **style, char **weight)
weed_plant_t * frame_layer_preload
predictive caching apparatus
void * lives_pixbuf_save_threaded(void *args)
save frame to pixbuf in a thread.
#define PREF_MT_DEF_ASAMPS
weed_plant_t * fd_layer
framedraw preview layer
#define CURRENT_CLIP_IS_CLIPBOARD
boolean vpp_try_match_palette(_vid_playback_plugin *vpp, weed_layer_t *layer)
void unlock_loop_lock(void)
@ CANCEL_KEEP
user pressed 'Keep'
void lives_struct_test(void)
lives_painter_surface_t * pi_surface
int lives_system(const char *com, boolean allow_error)
char def_audio_dir[PATH_MAX]
int mt_auto_back
time diff to backup (-1 == never, 0 == after every change, > 0 == seconds)
LiVESXDevice * mouse_device
unused for gtk+ < 3.0.0
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_free(weed_layer_t *layer)
frees pixel_data for a layer, then the layer itself
char * get_untitled_name(int number)
#define CLIP_HAS_AUDIO(clip)
char vid_load_dir[PATH_MAX]
#define PREF_LOAD_RFX_BUILTIN
void reget_afilesize(int fileno)
boolean suppress_layout_warnings
weed_leaf_seed_type_f _weed_leaf_seed_type
pthread_mutex_t exit_mutex
prevent multiple threads trying to run cleanup
LiVESWidget * troubleshoot
LIVES_GLOBAL_INLINE char * lives_chomp(char *buff)
lives_checkstatus_t has_sox_play
int num_rendered_effects_test
LiVESResponseType get_utf8_pref(const char *key, char *val, int maxlen)
pthread_mutex_t abuf_frame_mutex
used to synch audio buffer for generators
LIVES_GLOBAL_INLINE void do_bad_theme_error(const char *themefile)
LiVESWidget * resample_video
LIVES_GLOBAL_INLINE int weed_layer_get_width_pixels(weed_layer_t *layer)
lives_fx_candidate_t fx_candidates[MAX_FX_CANDIDATE_TYPES]
< effects which can have candidates from which a delegate is selected (current examples are: audio_vo...
#define PREF_ENCODER_ACODEC
#define DEF_MIDI_RPT
allowed non-reads between reads (raw MIDI only)
void *(* lives_funcptr_t)(void *)
#define SHOWDETx(cap, exec)
double audio_stretch
for fixed fps modes, the value is used to speed up / slow down audio
LiVESTargetEntry target_table[]
void subtitles_free(lives_clip_t *sfile)
volatile uint64_t rte
current max for VJ mode == 64 effects on fg clip
#define THEME_DETAIL_SEPWIN_IMAGE
boolean show_procd
override showing of "processing..." dialog
weed_plant_t * get_prev_frame_event(weed_plant_t *event)
int vsize
frame height (vertical) in pixels
void resize(double scale)
#define PREFIX
if –prefix= was not set, this is set to "NONE"
int frame_gamma
values WEED_GAMMA_UNKNOWN (0), WEED_GAMMA_SRGB (1), WEED_GAMMA_LINEAR (2)
volatile ticks_t lastcheck
LiVESWidget * spinbutton_pb_fps
#define LIVES_FILE_EXT_PRE
#define WEED_LEAF_HOST_SURFACE_SRC
void redraw_timeline(int clipno)
int clipstore[FN_KEYS - 1][2]
stored clips (bookmarks) [0] = clip, [1] = frame
boolean compact_rowstrides(weed_layer_t *layer)
void mt_sensitise(lives_mt *mt)
#define PREF_SCBACK_AMOUNT
LiVESWidget * lock_selwidth
uint64_t aud_data_written
#define PREF_EXTRA_COLOURS
LiVESWidget * ldg_menuitem
void get_play_times(void)
recalculate video / audio lengths and draw the timer bars
char vid_save_dir[PATH_MAX]
#define PREF_USE_SCREEN_GAMMA
corresponds to one clip in the GUI
boolean is_processing
states
int64_t disk_monitor_check_result(const char *dir)
void defer_sigint(int signum)
#define PREF_BLEND_AMOUNT
lives_checkstatus_t has_gdb
boolean render_choice_idle(livespointer data)
#define WEED_GAMMA_MONITOR
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_set_rowstrides(weed_layer_t *layer, int *rowstrides, int nplanes)
int last_transition_loops
#define THEME_DETAIL_FXCOL
void reset_message_area(void)
lives_checkstatus_t has_convert
#define PREF_VID_PLAYBACK_PLUGIN
#define THEME_DETAIL_VIDCOL
#define FFMPEG_ENCODER_NAME
LiVESWidget * normalize_audio
#define PREF_OMC_MIDI_FNAME
boolean switch_aud_to_sox(boolean set_pref)
LIVES_GLOBAL_INLINE int weed_layer_get_rowstride(weed_layer_t *layer)
for packed palettes
LiVESWidget * delaudio_submenu
pthread_t * libthread
current read count. When this reaches abuffer_clients, we swap the read / write buffers
LIVES_GLOBAL_INLINE boolean do_layout_recover_dialog(void)
boolean pconx_chain_data(int key, int mode, boolean is_audio_thread)
boolean has_video_filters(boolean analysers_only)
lives_checkstatus_t has_youtube_dlc
#define PREF_VID_LOAD_DIR
#define EXT_TRIGGER_INTERVAL
LIVES_GLOBAL_INLINE weed_plant_t * render_text_overlay(weed_layer_t *layer, const char *text)
LiVESWidget * load_cdtrack
#define LIVES_SENSE_STATE_PROC_INSENSITIZED
#define FPS_MAX
maximum fps we will allow (double)
boolean deal_with_render_choice(boolean add_deinit)
lives_checkstatus_t has_perl
#define PREF_AUTO_DEINTERLACE
LIVES_GLOBAL_INLINE boolean gamma_convert_layer(int gamma_type, weed_layer_t *layer)
#define PREF_CONCAT_IMAGES
#define EVENT_MARKER_RECORD_START
lives_checkstatus_t has_gzip
volatile ticks_t currticks
wall clock time, updated whenever lives_get_*_ticks is called
void startup_message_fatal(char *msg)
LiVESWidget * custom_tools_submenu
weed_plant_t * filter_map
boolean resize_message_area(livespointer data)
lives_cancel_type_t cancel_type
#define DEF_MSG_TEXTSIZE
(SOFT LIMIT) max space we can use for all our files (0 means unlimited (up to ds_crtical,...
volatile boolean ping_pong
@ LIVES_STRING_CONSTANT_TEST
#define PLUGIN_WEED_FX_BUILTIN
lives_proc_thread_t helper_procthreads[N_HLP_PROCTHREADS]
#define WARN_MASK_NO_ENCODERS
boolean autoclean
remove temp files on shutdown / startup
lives_checkstatus_t has_cdda2wav
LIVES_GLOBAL_INLINE int get_vspace(void)
boolean show_rdet
show render details (frame size, encoder type) before saving to file
#define AUDIO_OPTS_FOLLOW_CLIPS
int asampsize
audio sample size in bits (8 or 16)
char configfile[PATH_MAX]
kept in locale encoding (config settings) [default ~/.local/config/lives)
boolean nervous
some VJ effects / toys
boolean opening_loc
opening location (streaming)
uint64_t agen_samps_count
count of samples since init
LiVESWidget * framedraw_reset
the 'redraw' button
weed_plant_t * weed_layer_create_from_generator(weed_plant_t *inst, weed_timecode_t tc, int clipno)
LiVESWidget * record_perf
volatile int agen_key
which fx key is generating audio [1 based] (or 0 for none)
#define PREF_SCREEN_SCALE
LiVESWidget * run_test_rfx_submenu
#define LIVES_LAYER_HAS_SIZE_NOW
lives_cconnect_t * cconx
list of out -> in alpha channel connections
lives_rfx_t * weed_to_rfx(weed_plant_t *plant, boolean show_reinits)
LIVES_GLOBAL_INLINE LiVESResponseType get_string_pref(const char *key, char *val, int maxlen)
pthread_mutex_t vpp_stream_mutex
prevent from writing audio when stream is closing
#define PREF_SHOW_DEVOPTS
LIVES_GLOBAL_INLINE int lives_getgid(void)
lives_decoder_t * clone_decoder(int fileno)
LIVES_GLOBAL_INLINE void lives_proc_thread_join(lives_proc_thread_t tinfo)
#define IMG_BUFF_SIZE
256 * 1024 < chunk size for reading images
#define SCRATCH_JUMP
jump and resync audio
int osc_enc_width
encode width, height and fps set externally
LiVESPixbuf * layer_to_pixbuf(weed_layer_t *layer, boolean realpalette, boolean fordisplay)
LIVES_GLOBAL_INLINE pid_t lives_getpid(void)
char config_datadir[PATH_MAX]
kept in locale encoding (general config files) (default ~/.local/share/lives)
#define WEED_LAYER_ALPHA_PREMULT
#define LIVES_FILE_EXT_PNG
boolean alpha_post
set to TRUE to force use of post alpha internally
LiVESPixbuf * pull_lives_pixbuf_at_size(int clip, int frame, const char *image_ext, weed_timecode_t tc, int width, int height, LiVESInterpType interp, boolean fordisp)
@ LIVES_STORAGE_STATUS_UNKNOWN
boolean letterbox_mt
playback with letterbox (multitrack)
weed_error_t weed_leaf_set_host(weed_plant_t *plant, const char *key, uint32_t seed_type, weed_size_t num_elems, void *values)
int arate
current audio playback rate (varies if the clip rate is changed)
#define DEF_MT_DISP_TRACKS
boolean lazy_startup_checks(void *data)
#define PREF_MT_DEF_ACHANS
LiVESList * cache_file_contents(const char *filename)
LiVESWidgetColor mt_timecode_fg
boolean can_write_to_config_backup
#define LIVES_THRDATTR_NO_GUI
@ LIVES_STORAGE_STATUS_CRITICAL
boolean pixbuf_to_layer(weed_layer_t *layer, LiVESPixbuf *pixbuf)
turn a (Gdk)Pixbuf into a Weed layer
boolean perm_audio_reader
boolean(* render_frame)(int hsize, int vsize, ticks_t timecode, void **pixel_data, void **return_data, weed_plant_t **play_params)
boolean event_window_show_frame_events
#define LIVES_DEF_CONFIG_DIR
in $HOME : used once to set configfile, and then discarded
#define LIVES_SENSE_STATE_INTERACTIVE
boolean get_theme_colour_pref(const char *key, lives_colRGBA64_t *lcol)
LiVESList * affected_layout_marks
list of pairs of marks in affected_layouts_map, text between them should be deleted when stored_layou...
boolean gamma_convert_sub_layer(int gamma_type, double fileg, weed_layer_t *layer, int x, int y, int width, int height, boolean may_thread)
alter the transfer function of a Weed layer, from current value to gamma_type
#define PREF_FORCE_SINGLE_MONITOR
LIVES_GLOBAL_INLINE double get_double_prefd(const char *key, double defval)
#define CURRENT_CLIP_TOTAL_TIME
LiVESWidget * full_screen
void changed_fps_during_pb(LiVESSpinButton *spinbutton, livespointer user_data)
This is a super important function : almost everything related to velocity direction changes during p...
LIVES_GLOBAL_INLINE boolean has_pref(const char *key)
volatile lives_rfx_t * vrfx_update
single access for updating alarm list
int fixed_fps_numer
fixed fps playback; usually fixed_fpsd==0.
#define WEED_LEAF_HOST_PIXBUF_SRC
#define DEFAULT_AUDIO_CHANS
LIVES_GLOBAL_INLINE int weed_palette_get_pixels_per_macropixel(int pal)
void mt_delete_clips(lives_mt *mt, int file)
void calc_maxspect(int rwidth, int rheight, int *cwidth, int *cheight)
boolean get_machine_dets(void)
lives_direction_t adirection
audio play direction during playback, FORWARD or REVERSE.
#define MAX_FX_CANDIDATE_TYPES
char proj_load_dir[PATH_MAX]
void on_devicemap_load_activate(LiVESMenuItem *, livespointer)
lives_checkstatus_t has_python
boolean clip_can_reverse(int clipno)
#define FX_KEYS_MAX
the rest of the keys are accessible through the multitrack renderer (must, be > FX_KEYS_MAX_VIRTUAL)
uint32_t mt_idle_add(lives_mt *mt)
lives_alarm_t lives_alarm_set(ticks_t ticks)
set alarm for now + delta ticks (10 nanosec) param ticks (10 nanoseconds) is the offset when we want ...
#define IS_NORMAL_CLIP(clip)
#define STYLE_1
turn on theming if set
boolean(* get_frame)(const lives_clip_data_t *, int64_t frame, int *rowstrides, int height, void **pixel_data)
frame starts at 0 in these functions; height is height of primary plane
LiVESWidget * change_speed
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_set_yuv_clamping(weed_layer_t *layer, int clamping)
#define WEED_LEAF_HOST_TC
#define JACK_OPTS_START_TSERVER
start transport server
@ LIVES_RENDER_ERROR_NONE
LiVESWidget * p_loopbutton
void cleanup_old_config(void)
#define PREF_VID_SAVE_DIR
#define PLUGIN_THEMES
smogrify handles the directory differently for themes
#define RFX_TOOL_MENU_POSN
where do we add the builtin tools in the tools menu
int64_t get_cpu_load(int cpun)
percent * 1 million
void on_toy_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define JACK_OPTS_START_ASERVER
start audio server
ticks_t orignsecs
usecs at start of playback - ditto
LIVES_GLOBAL_INLINE char * lives_concat(char *st, char *x)
int achans
number of audio channels (0, 1 or 2)
#define PREF_DEFAULT_IMAGE_TYPE
boolean show_sync_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer keybd)
#define PREF_FPSCHANGE_AMOUNT
#define SCREEN_AREA_USER_DEFINED1
void load_frame_image(int frame)
#define SCR_WIDTH_SAFETY
sepwin/screen size safety margins in pixels
capability * get_capabilities(void)
boolean last_transition_loop_to_fit
boolean weed_layer_create_from_file_progressive(weed_layer_t *layer, const char *fname, int width, int height, int tpalette, const char *img_ext)
LIVES_GLOBAL_INLINE ticks_t lives_get_relative_ticks(ticks_t origsecs, ticks_t orignsecs)
LiVESWidget * gens_submenu
#define MIN_MSG_AREA_SCRNHEIGHT
boolean lives_pixbuf_save(LiVESPixbuf *pixbuf, char *fname, lives_img_type_t imgtype, int quality, int width, int height, LiVESError **gerrorptr)
Save a pixbuf to a file using the specified imgtype and the specified quality/compression value.
LIVES_GLOBAL_INLINE boolean lives_strncmp(const char *st1, const char *st2, size_t len)
returns FALSE if strings match
int set_string_pref(const char *key, const char *value)
int min_frames
for Weed, 1
boolean reconfig
set to TRUE if a monitor / screen size change is detected
#define MAINW_MSG_SIZE
mainw->msg bytesize
boolean foreign
for external window capture
void load_end_image(int frame)
boolean ext_src_used[MAX_FILES]
boolean is_legal_set_name(const char *set_name, boolean allow_dupes, boolean leeway)
boolean ext_cntl[MAX_EXT_CNTL]
external control inputs
LiVESWidget * fade_aud_out
pthread_cond_t avseek_cond
LIVES_GLOBAL_INLINE weed_plant_t * insert_blank_frame_event_at(weed_plant_t *event_list, weed_timecode_t tc, weed_plant_t **shortcut)
boolean mt_idle_show_current_frame(livespointer data)
boolean write_vpp_file
video playback plugin was updated; write settings to a file on exit
void show_playbar_labels(int clipno)
#define PREF_SHOW_TOOLBAR
int set_utf8_pref(const char *key, const char *value)
lives_rfx_t * rendered_fx
rendered fx
LiVESWidget * m_playselbutton
boolean msg_area_configed
#define SCREEN_SCALE_DEF_WIDTH
@ LIVES_STRING_CONSTANT_CUSTOM
LiVESList * new_lmap_errors