Go to the documentation of this file.
30 static int extra_cb_key = 0;
31 static int del_cb_key = 0;
34 static uint64_t event_start;
35 static double audio_start;
36 static boolean accelerators_swapped;
37 static int frames_done;
38 static double disp_fraction_done;
39 static ticks_t proc_start_ticks;
40 static ticks_t last_open_check_ticks;
42 static uint64_t spare_cycles, last_spare_cycles;
45 static frames_t getahead = -1, test_getahead = -1, bungle_frames;
47 static boolean recalc_bungle_frames = 0;
48 static boolean shown_paused_frames;
49 static boolean td_had_focus;
50 static boolean cleanup_preload;
51 static boolean init_timers =
TRUE;
52 static boolean drop_off =
FALSE;
56 #define OPEN_CHECK_TICKS (TICKS_PER_SECOND/10l)
58 static volatile boolean display_ready;
60 static int64_t sttime;
64 static int cache_hits = 0, cache_misses = 0;
65 static double jitter = 0.;
69 static char buff[1024];
70 lives_snprintf(buff, 1024,
"preload caches = %d, hits = %d "
71 "misses = %d,\nframe jitter = %.03f milliseconds.",
72 cache_hits + cache_misses, cache_hits, cache_misses, jitter * 1000.);
84 if ((tbutton = (LiVESWidget *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(togglebutton),
"auto")) != NULL) {
96 static void add_xlays_widget(LiVESBox *box) {
97 char *tmp = (
_(
"Show affected _layouts"));
105 _(
"Do _not show this warning any more\n(can be turned back on from Preferences/Warnings)"),
106 FALSE, LIVES_BOX(box), NULL);
108 lives_signal_sync_connect(LIVES_GUI_OBJECT(checkbutton), LIVES_WIDGET_TOGGLED_SIGNAL,
113 static void add_clear_ds_button(LiVESDialog *dialog) {
115 LIVES_RESPONSE_RETRY);
119 lives_signal_sync_connect(LIVES_GUI_OBJECT(button), LIVES_WIDGET_CLICKED_SIGNAL,
124 static void add_clear_ds_adv(LiVESBox *box) {
135 lives_signal_sync_connect(LIVES_GUI_OBJECT(button), LIVES_WIDGET_CLICKED_SIGNAL,
140 static void add_perminfo(LiVESWidget *dialog) {
166 "Please make a note of this.\n"),
175 static void scan_for_sets(LiVESWidget *button, livespointer data) {
176 LiVESWidget *entry = (LiVESWidget *)data;
178 (LiVESWidget *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(button),
"disp_label");
190 static void extra_cb(LiVESWidget *dialog,
int key) {
193 LiVESWidget *layout, *button, *entry, *hbox, *label;
204 LIVES_BOX(hbox), NULL);
220 (tmp = lives_strdup(H_(
"Scan other directories for "
221 "LiVES Clip Sets. May be slow "
222 "for some directories."))));
224 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(button),
"disp_label", label);
225 lives_signal_sync_connect(LIVES_GUI_OBJECT(button), LIVES_WIDGET_CLICKED_SIGNAL,
226 LIVES_GUI_CALLBACK(scan_for_sets), entry);
232 "current directory,\n"
233 "you can try to recover them by launching\n"
234 " 'Clean up Diskspace / Recover Missing Clips' "
235 "from the File menu.\n"),
FALSE);
248 static void del_event_cb(LiVESWidget *dialog, livespointer data) {
249 int key = LIVES_POINTER_TO_INT(data);
262 LiVESWidget *dialog_vbox;
264 LiVESWidget *cancelbutton = NULL;
265 LiVESWidget *okbutton = NULL, *defbutton = NULL;
266 LiVESWidget *abortbutton = NULL;
268 LiVESAccelGroup *accel_group = NULL;
273 int cb_key = extra_cb_key;
274 int del_key = del_cb_key;
283 LIVES_MESSAGE_WARNING, LIVES_BUTTONS_NONE, NULL);
293 lives_signal_sync_connect(LIVES_GUI_OBJECT(okbutton), LIVES_WIDGET_CLICKED_SIGNAL,
299 LIVES_MESSAGE_ERROR, LIVES_BUTTONS_NONE, NULL);
308 lives_signal_sync_connect(LIVES_GUI_OBJECT(okbutton), LIVES_WIDGET_CLICKED_SIGNAL,
313 LIVES_MESSAGE_INFO, LIVES_BUTTONS_NONE, NULL);
323 lives_signal_sync_connect(LIVES_GUI_OBJECT(okbutton), LIVES_WIDGET_CLICKED_SIGNAL,
329 LIVES_BUTTONS_NONE, NULL);
336 add_clear_ds_button(LIVES_DIALOG(dialog));
345 LIVES_RESPONSE_CANCEL);
353 LIVES_BUTTONS_NONE, NULL);
369 LIVES_BUTTONS_NONE, NULL);
384 LIVES_STOCK_QUIT,
_(
"_Abort"), LIVES_RESPONSE_ABORT);
389 LIVES_RESPONSE_CANCEL);
391 _(
"_Retry"), LIVES_RESPONSE_RETRY);
399 _(
"_Retry"), LIVES_RESPONSE_RETRY);
403 LIVES_RESPONSE_CANCEL);
412 LIVES_BUTTONS_NONE, NULL);
418 LIVES_RESPONSE_CANCEL);
425 _(
"_Retry"), LIVES_RESPONSE_RETRY);
428 _(
"_Browse"), LIVES_RESPONSE_BROWSE);
435 cancelbutton = abortbutton;
440 lives_signal_sync_connect(LIVES_GUI_OBJECT(dialog), LIVES_WIDGET_DESTROY_SIGNAL,
441 LIVES_GUI_CALLBACK(del_event_cb), LIVES_INT_TO_POINTER(del_key));
468 "caret-color", colref);
475 add_perminfo(dialog);
480 add_clear_ds_adv(LIVES_BOX(dialog_vbox));
483 if (warn_mask_number > 0) {
488 add_xlays_widget(LIVES_BOX(dialog_vbox));
493 LIVES_RESPONSE_SHOW_DETAILS);
495 lives_signal_sync_connect(LIVES_GUI_OBJECT(details_button), LIVES_WIDGET_CLICKED_SIGNAL,
500 if (okbutton || cancelbutton) {
507 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
531 if (cb_key) extra_cb(dialog, cb_key);
542 char *xtitle = (
char *)title;
543 if (!xtitle) xtitle =
_(
"Question");
555 va_start(xargs, fmt);
556 textx = lives_strdup_vprintf(fmt, xargs);
571 LiVESWidget *warning;
575 if (warn_mask_number >= (1ul << 48)) {
581 mytext = lives_strdup(text);
591 return (response == LIVES_RESPONSE_OK);
597 LiVESWidget *warning;
601 if (warn_mask_number >= (1ul << 48)) {
607 mytext = lives_strdup(text);
613 }
while (response == LIVES_RESPONSE_RETRY);
618 return (response == LIVES_RESPONSE_YES);
623 LiVESWindow *
transient = NULL;
624 if (!
prefs)
return NULL;
637 LiVESWidget *warning;
642 va_start(xargs, fmt);
643 textx = lives_strdup_vprintf(fmt, xargs);
651 return (response == LIVES_RESPONSE_YES);
657 LiVESWidget *warning;
665 return (response == LIVES_RESPONSE_YES);
669 static LiVESResponseType _do_abort_cancel_retry_dialog(
const char *mytext,
lives_dialog_t dtype) {
670 LiVESResponseType response;
671 LiVESWidget *warning;
680 if (response == LIVES_RESPONSE_ABORT) {
701 }
while (response == LIVES_RESPONSE_ABORT);
737 LiVESResponseType resi;
740 va_start(xargs, fmt);
741 textx = lives_strdup_vprintf(fmt, xargs);
755 static LiVESResponseType _do_info_dialog(
const char *text,
const char *exp_title, LiVESList *exp_list) {
756 LiVESResponseType ret = LIVES_RESPONSE_NONE;
775 LiVESResponseType resi;
778 va_start(xargs, fmt);
779 textx = lives_strdup_vprintf(fmt, xargs);
781 resi = _do_info_dialog(textx, NULL, NULL);
789 return _do_info_dialog(text, NULL, NULL);
794 const char *exp_text, LiVESList *list) {
796 return _do_info_dialog(text, exp_text, list);
802 LiVESWidget *err_box;
803 LiVESResponseType ret = LIVES_RESPONSE_NONE;
805 if (warn_mask_number >= (1ul << 48)) {
823 char *msg, *msgx, *tmp, *tmp2, *mp, *mpstr;
827 else mp = *mountpoint;
829 tmp = lives_markup_escape_text(mp, -1);
832 }
else mpstr = lives_strdup(
"");
833 tmp = lives_filename_to_utf8(dir, -1, NULL, NULL, NULL);
834 tmp2 = lives_markup_escape_text(tmp, -1);
837 _(
"<b>FREE SPACE IN THE PARTITION CONTAINING\n%s\n%sHAS FALLEN BELOW THE CRITICAL LEVEL OF %s\n"
838 "CURRENT FREE SPACE IS %s\n</b>\n\n(Disk warning levels can be configured in Preferences / Warnings.)"),
839 tmp2, mpstr, dscr, dscu);
844 if (!*mountpoint) *mountpoint = mp;
850 char *
ds_warning_msg(
const char *dir,
char **mountpoint, uint64_t dsval, uint64_t cwarn, uint64_t nwarn) {
851 char *msg, *msgx, *tmp, *mp, *mpstr;
856 else mp = *mountpoint;
858 else mpstr = lives_strdup(
"");
860 _(
"Free space in the partition containing\n%s\nhas fallen below the warning level of %s\nCurrent free space is %s\n\n"
861 "(Next warning will be shown at %s. Disk warning levels can be configured in Preferences / Warnings.)"),
862 (tmp = lives_filename_to_utf8(dir, -1, NULL, NULL, NULL)), mpstr, dscw, dscu, dscn);
867 if (!*mountpoint) *mountpoint = mp;
874 char *msg =
lives_strdup_printf(
_(
"%s may not be blank.\nClick Abort to exit LiVES immediately or Ok "
875 "to continue with the default value."), what);
889 char *msg =
lives_strdup_printf(
_(
"Errors were encountered when reloading LiVES' copy of the clip %s\n"
890 "Please click Abort if you wish to exit from LiVES,\n"
891 "or OK to update the clip details in LiVES and continue anyway.\n"),
905 LiVESResponseType response;
910 sizestr = lives_strdup(
"");
913 "Click Abort to exit from LiVES, Cancel to abandon the operation\n"
914 "or Retry to try again. You may need to close some other applications first.\n"), op, sizestr);
927 LiVESResponseType response = LIVES_RESPONSE_NONE;
936 array = lives_strsplit(
mainw->
msg,
"|", numtok);
938 if (numtok > 2 && !strcmp(array[1],
"read")) {
940 if (numtok > 3 && *(array[3])) addinfo = array[3];
946 THREADVAR(read_failed_file) = lives_strdup(array[2]);
948 response = LIVES_RESPONSE_CANCEL;
951 else if (numtok > 2 && !strcmp(array[1],
"write")) {
953 if (numtok > 3 && *(array[3])) addinfo = array[3];
959 THREADVAR(write_failed_file) = lives_strdup(array[2]);
961 response = LIVES_RESPONSE_CANCEL;
964 else if (numtok > 3 && !strcmp(array[1],
"system")) {
966 if (numtok > 4 && *(array[4])) addinfo = array[4];
969 if (numtok > 5 && strstr(addinfo,
"_ASKPERM_")) {
975 response = LIVES_RESPONSE_CANCEL;
980 boolean trysudo =
FALSE;
981 if (addinfo && strstr(addinfo,
"_TRY_SUDO_")) trysudo =
TRUE;
984 if (response == LIVES_RESPONSE_RETRY)
return response;
989 response = LIVES_RESPONSE_CANCEL;
995 for (i = pxstart; i < numtok; i++) {
996 if (!*(array[i]) || !strcmp(array[i],
"ERROR"))
break;
1002 lives_strfreev(array);
1022 char *str_return = NULL;
1028 LiVESError *gerr = NULL;
1030 if (!iochan->is_readable)
return;
1031 g_io_channel_read_to_end(iochan, &str_return, &retlen, &gerr);
1032 if (gerr) lives_error_free(gerr);
1036 QByteArray qba = iochan->readAll();
1037 str_return = strdup(qba.constData());
1038 retlen = strlen(str_return);
1051 boolean linebrk =
FALSE;
1052 char *cptr = str_return;
1060 while (cptr < (str_return + retlen - plen)) {
1063 while (*cptr ==
' ' || *cptr ==
'\n' || *cptr ==
'=') {
1064 if (*cptr ==
'\n') {
1094 boolean did_pause =
FALSE;
1097 char *pausstr = (
_(
"Processing has been paused."));
1132 if (is_processing) {
1149 char *xpausstr = lives_markup_escape_text(pausstr, -1);
1158 if (retval == LIVES_RESPONSE_CANCEL) {
1159 if (is_processing) {
1184 static void cancel_process(
boolean visible) {
1187 if (accelerators_swapped) {
1191 (LiVESXModifierType)0,
1192 LIVES_ACCEL_VISIBLE);
1200 if (!(
cfile->menuentry == NULL)) {
1214 static void disp_fraction(
double fraction_done,
double timesofar,
xprocess * proc) {
1216 #ifdef PROGBAR_IS_ENTRY
1222 if (fraction_done > 1.) fraction_done = 1.;
1223 if (fraction_done < 0.) fraction_done = 0.;
1225 if (fraction_done > disp_fraction_done + .0001)
1228 est_time = timesofar / fraction_done - timesofar;
1229 prog_label =
lives_strdup_printf(
_(
"\n%d%% done. Time remaining: %u sec\n"), (
int)(fraction_done * 100.),
1230 (uint32_t)(est_time + .5));
1231 #ifdef PROGBAR_IS_ENTRY
1242 disp_fraction_done = fraction_done;
1246 static int progress_count;
1247 static double progress_speed;
1248 static int prog_fs_check;
1250 #define PROG_LOOP_VAL 200
1252 static void progbar_pulse_or_fraction(
lives_clip_t *sfile,
int frames_done,
double fraction_done) {
1259 if (fraction_done < 0.)
1264 progress_speed = 4.;
1276 double fraction_done, timesofar;
1277 static double est_time = 0., frac_done = -1;
1288 cfile->opening_frames > 1 ?
cfile->opening_frames : 1);
1289 last_open_check_ticks = currticks;
1290 if (
cfile->opening_frames > 1) {
1291 if (
cfile->frames > 0 &&
cfile->frames != 123456789) {
1292 fraction_done = (double)(
cfile->opening_frames - 1.) / (double)
cfile->frames;
1293 if (fraction_done > 1.) fraction_done = 1.;
1296 est_time = timesofar / fraction_done - timesofar;
1299 if (est_time != -1.) prog_label =
lives_strdup_printf(
_(
"\n%d/%d frames opened. Time remaining %u sec.\n"),
1300 cfile->opening_frames - 1,
cfile->frames, (uint32_t)(est_time + .5));
1306 #ifdef PROGBAR_IS_ENTRY
1332 #define ENABLE_PRECACHE
1335 #define ANIM_LIM 1000000
1339 static frames_t last_req_frame = 0;
1340 static int last_pwidth = 0, last_pheight = 0;
1341 static int64_t last_seek_pos = 0;
1347 boolean show_frame =
FALSE;
1348 boolean did_switch =
FALSE;
1349 int old_current_file, old_playing_file;
1350 #ifdef ENABLE_PRECACHE
1355 double audio_stretch = 1.0;
1360 if (visible)
goto proc_dialog;
1388 init_timers =
FALSE;
1392 last_req_frame = sfile->
frameno - 1;
1393 getahead = test_getahead = -1;
1406 #define ADJUST_AUDIO_RATE
1407 #ifdef ADJUST_AUDIO_RATE
1418 if (audio_ticks == -1) {
1426 audio_stretch > 0.5) {
1437 #ifdef HAVE_PULSE_AUDIO
1442 ((audio_ticks = lives_pulse_get_time(
mainw->
pulsed)) >
1444 if (audio_ticks == -1) {
1512 cleanup_preload =
FALSE;
1524 cancel_process(visible);
1538 cache_hits = cache_misses = 0;
1549 #define SWITCH_COMPENSATION 1.0
1554 last_req_frame = sfile->
frameno - 1;
1574 #ifdef ENABLE_JACK_TRANSPORT
1601 cancel_process(visible);
1608 #define TEST_TRIGGER 9999
1611 #define DROPFRAME_TRIGGER 4
1612 #define JUMPFRAME_TRIGGER 99999999 // we should retain cdata->jump_limit from the initial file open
1628 requested_frame = sfile->
frameno;
1630 if (sfile->
pb_fps != 0.) {
1645 if (requested_frame > sfile->
frameno) {
1652 if (requested_frame < 1 || requested_frame > sfile->
frames)
1653 requested_frame = sfile->
frameno;
1654 else sfile->
frameno = requested_frame;
1659 #ifdef ENABLE_PRECACHE
1661 getahead = test_getahead = -1;
1662 cleanup_preload =
TRUE;
1670 && (requested_frame != last_req_frame || sfile->
frames == 1
1678 #ifdef ENABLE_PRECACHE
1679 if (test_getahead > 0) {
1680 if (recalc_bungle_frames) {
1700 delta = (test_getahead - requested_frame) * dir;
1701 #ifdef SHOW_CACHE_PREDICTIONS
1702 g_print(
"gah (%d) %d, act %d %d, bungle %d, shouldabeen %d %s",
mainw->
effort, test_getahead,
1703 sfile->
frameno, requested_frame,
1704 bungle_frames, bungle_frames - delta, getahead == -1 ?
"(calibrating)" :
"");
1705 if (delta < 0) g_print(
" !!!!!\n");
1706 if (delta == 0) g_print(
" EXACT\n");
1707 if (delta > 0) g_print(
" >>>>\n");
1709 if (delta == 0) bungle_frames++;
1710 if (delta > 0 && delta < 3 && bungle_frames > 1) bungle_frames--;
1711 else bungle_frames += (requested_frame - test_getahead) * dir;
1712 if (bungle_frames <= -dir) bungle_frames = 0;
1713 if (delta >= 0 && getahead > -1) drop_off =
TRUE;
1715 recalc_bungle_frames =
FALSE;
1720 #ifdef USE_GDK_FRAME_CLOCK
1721 if (display_ready) {
1724 display_ready =
FALSE;
1757 last_spare_cycles = spare_cycles;
1761 if (scratch !=
SCRATCH_NONE || getahead > -1 || drop_off) dropped = 0;
1769 if (dropped < 0) dropped = 0;
1771 #ifdef ENABLE_PRECACHE
1772 if (getahead > -1) {
1780 if (sfile->
frameno != getahead) {
1783 cleanup_preload =
TRUE;
1800 #ifdef SHOW_CACHE_PREDICTIONS
1804 g_print(
"decoder: seek flags = %d, jump_limit = %ld, max_fps = %.4f\n", cdata->
seek_flag,
1811 if (bungle_frames <= -dir || bungle_frames == 0) bungle_frames = dir;
1813 test_getahead = requested_frame + bungle_frames * dir;
1814 if (test_getahead < 1 || test_getahead > sfile->
frames) test_getahead = -1;
1816 #ifdef SHOW_CACHE_PREDICTIONS
1817 g_print(
"getahead jumping to %d\n", test_getahead);
1819 recalc_bungle_frames =
TRUE;
1823 getahead = test_getahead;
1827 else sfile->
frameno = getahead;
1836 #ifdef HAVE_PULSE_AUDIO
1838 if (getahead < 0 && new_ticks != mainw->startticks
1847 #ifdef ENABLE_PRECACHE
1851 cleanup_preload =
FALSE;
1852 }
else if (cleanup_preload) {
1857 cleanup_preload =
FALSE;
1860 cleanup_preload =
FALSE;
1869 (sfile->
pb_fps < 0. && pframe <= mainw->actual_frame &&
1874 if (pframe == sfile->
frameno) cache_hits++;
1875 else if (getahead == -1) {
1876 if ((sfile->
pb_fps > 0. && pframe <= mainw->actual_frame)
1878 cleanup_preload =
TRUE;
1880 #ifdef SHOW_CACHE_PREDICTIONS
1881 g_print(
"WASTED cache frame %ld !!!! range was %d to %d or was not ready\n",
1897 if (requested_frame != last_req_frame) {
1899 if (dropped > 0)
update_effort(abs(requested_frame - last_req_frame - 1),
TRUE);
1920 #ifdef SHOW_CACHE_PREDICTIONS
1925 cleanup_preload =
TRUE;
1959 #ifdef HAVE_PULSE_AUDIO
1987 #ifdef SHOW_CACHE_PREDICTIONS
1988 g_print(
"playing frame %d / %d at %ld (%ld : %ld) %.2f %ld %ld\n", sfile->
frameno, requested_frame,
mainw->
currticks,
2008 else spare_cycles++;
2010 last_req_frame = requested_frame;
2012 #ifdef ENABLE_PRECACHE
2017 || (sfile->
pb_fps >= 0. && (pframe <= requested_frame || pframe < sfile->frameno))
2018 || (sfile->
pb_fps < 0. && (pframe >= requested_frame || pframe > sfile->
frameno))) {
2019 cleanup_preload =
TRUE;
2041 sfile->
frameno = requested_frame;
2044 else spare_cycles++;
2047 #ifdef ENABLE_PRECACHE
2048 if (cleanup_preload) {
2059 cleanup_preload =
FALSE;
2071 && ((spare_cycles > 0ul && last_spare_cycles > 0ul) || (getahead > -1 &&
mainw->
pred_frame != -getahead))) {
2072 #ifdef SHOW_CACHE_PREDICTIONS
2075 #ifdef ENABLE_PRECACHE
2098 sfile->
hsize, sfile->
vsize, WEED_PALETTE_END)) {
2104 #ifdef SHOW_CACHE_PREDICTIONS
2110 #ifdef SHOW_CACHE_PREDICTIONS
2121 #ifdef SHOW_CACHE_PREDICTIONS
2146 cfile->fx_frame_pump++;
2188 cancel_process(visible);
2201 cancel_process(visible);
2209 #ifdef USE_GDK_FRAME_CLOCK
2210 static boolean using_gdk_frame_clock;
2211 static GdkFrameClock *gclock;
2212 static void clock_upd(GdkFrameClock * clock, gpointer user_data) {
2213 display_ready =
TRUE;
2218 static boolean reset_timebase(
void) {
2227 #ifdef USE_MONOTONIC_TIME
2233 gettimeofday(&
tv, NULL);
2241 #ifdef HAVE_PULSE_AUDIO
2243 boolean pa_reset =
TRUE;
2281 char *mytext = NULL;
2283 boolean got_err =
FALSE;
2289 if (visible && text) mytext = lives_strdup(text);
2306 if (visible) accelerators_swapped =
FALSE;
2308 disp_fraction_done = 0.;
2310 shown_paused_frames =
FALSE;
2315 progress_speed = 4.;
2323 cleanup_preload =
FALSE;
2373 (LiVESXModifierType)0, (LiVESAccelFlags)0);
2374 accelerators_swapped =
TRUE;
2381 cache_hits = cache_misses = 0;
2398 cfile->progress_end = 0;
2414 #ifdef HAVE_PULSE_AUDIO
2421 cfile->progress_end = 0;
2438 display_ready =
TRUE;
2443 if (!reset_timebase()) {
2469 if (
cfile->achans) {
2473 frames =
cfile->frames;
2499 #ifdef HAVE_PULSE_AUDIO
2518 cfile->frames = frames;
2520 #ifdef USE_GDK_FRAME_CLOCK
2521 using_gdk_frame_clock =
FALSE;
2523 using_gdk_frame_clock =
TRUE;
2524 display_ready =
FALSE;
2526 gdk_frame_clock_begin_updating(gclock);
2527 lives_signal_sync_connect(LIVES_GUI_OBJECT(gclock),
"update",
2528 LIVES_GUI_CALLBACK(clock_upd), NULL);
2532 #ifdef HAVE_PULSE_AUDIO
2555 recalc_bungle_frames =
FALSE;
2563 !lives_file_test(
cfile->info_file, LIVES_FILE_TEST_EXISTS))) {
2571 #ifdef USE_GDK_FRAME_CLOCK
2572 if (using_gdk_frame_clock) {
2573 gdk_frame_clock_end_updating(gclock);
2640 if (prog_fs_check-- <= 0) {
2662 if (visible && (!accelerators_swapped ||
cfile->opening) && cancellable
2663 && (!
cfile->nopreview ||
cfile->keep_without_preview)) {
2672 if (
cfile->opening_loc) {
2690 (LiVESXModifierType)0, (LiVESAccelFlags)0);
2691 accelerators_swapped =
TRUE;
2698 strncmp(
mainw->
msg,
"killed", 6) && (visible ||
2708 char **array = lives_strsplit(
mainw->
msg,
"|", numtok);
2710 if (numtok == 2 && *(array[1]))
cfile->progress_end = atoi(array[1]);
2711 else if (numtok == 5 && *(array[4])) {
2715 cfile->hsize = atoi(array[1]);
2716 cfile->vsize = atoi(array[2]);
2717 cfile->fps =
cfile->pb_fps = strtod(array[3], NULL);
2719 cfile->progress_end = atoi(array[4]);
2721 lives_strfreev(array);
2733 #ifdef USE_GDK_FRAME_CLOCK
2734 if (using_gdk_frame_clock) {
2735 gdk_frame_clock_end_updating(gclock);
2768 #ifdef USE_GDK_FRAME_CLOCK
2769 if (using_gdk_frame_clock) {
2770 gdk_frame_clock_end_updating(gclock);
2775 g_print(
"exit pt 3 %s\n",
mainw->
msg);
2787 if (accelerators_swapped) {
2791 (LiVESXModifierType)0, LIVES_ACCEL_VISIBLE);
2792 accelerators_swapped =
FALSE;
2795 const char *btext = NULL;
2806 if (
cfile->menuentry) {
2817 if (!strncmp(
mainw->
msg,
"error", 5)) {
2835 g_print(
"exiting progress dialog\n");
2842 #define MIN_FLASH_TIME MILLIONS(100)
2849 FILE *infofile = NULL;
2851 uint64_t time = 0, stime = 0;
2854 char *mytext = lives_strdup(text);
2856 int time_rem, last_time_rem = 10000000;
2889 if (type == 0 || type == 2) {
2892 }
else if (type == 1) {
2897 #ifdef HAVE_PULSE_AUDIO
2920 if (time_rem >= 0 && time_rem < last_time_rem) {
2924 last_time_rem = time_rem;
2925 }
else if (time_rem < 0)
break;
2931 if (type == 0 || type == 2) {
2938 if (alarm_handle > 0) {
2947 }
else fclose(infofile);
2962 if (type != 1 && !strncmp(
mainw->
msg,
"error", 5)) {
2980 else extra = lives_strdup(
"");
2983 _(
"Saving the set will cause copies of all loaded clips to remain on the disk%s.\n\n"
2984 "Please press 'Cancel' if that is not what you want.\n"), extra);
3003 _(
"LiVES was unable to write to its working directory.\n\nThe current working directory is:\n\n%s\n\n"
3004 "Please make sure you can write to this directory."),
3005 (tmp = lives_filename_to_utf8(
prefs->
workdir, -1, NULL, NULL, NULL)));
3015 do_error_dialog(
_(
"\nLiVES currently requires either 'mplayer', 'mplayer2', or 'sox' to function. "
3016 "Please install one or other of these, and try again.\n"));
3022 _(
"\nThis function requires either mplayer or mplayer2 to operate.\nYou may wish to install "
3023 "one or other of these and try again.\n"));
3029 _(
"\nThis function requires either mplayer, mplayer2 or mpv to operate.\nYou may wish to install one or other of these "
3030 "and try again.\n"));
3035 do_error_dialog(
_(
"Audio was not loaded; please install mplayer or mplayer2 if you expected audio for this clip.\n"));
3041 _(
"Audio resampling is required for this format.\nPlease install 'sox'\nOr switch to another encoder format in "
3042 "Tools | Preferences | Encoding\n"));
3048 _(
"\n\nThis encoder/format cannot use the requested audio codec.\n"
3049 "Please set the audio codec in Tools|Preferences|Encoding\n"));
3055 _(
"This layout includes generated frames.\nIt cannot be saved, you must render it to a clip first.\n"));
3061 _(
"This layout includes generated or recorded audio.\nIt cannot be saved, you must render it to a clip first.\n"));
3065 boolean rdet_suggest_values(
int width,
int height,
double fps,
int fps_num,
int fps_denom,
int arate,
int asigned,
3066 boolean swap_endian,
boolean anr,
boolean ignore_fps) {
3067 LiVESWidget *prep_dialog;
3070 char *msg2 = lives_strdup(
""), *msg3 = lives_strdup(
""), *msg4 = lives_strdup(
"");
3071 char *msg5 = lives_strdup(
""), *msg6 = lives_strdup(
""), *msg7 = lives_strdup(
"");
3072 char *msg8 = lives_strdup(
"");
3075 boolean ochange =
FALSE;
3081 (fps > 0. && fps !=
rdet->
fps) || (fps_denom > 0 && (fps_num * 1.) / (fps_denom * 1.) !=
rdet->
fps) ||
3085 msg2 = (
_(
"LiVES recommends the following settings:\n\n"));
3087 || (arate > 0 && arate !=
rdet->
arate)) {
3093 else sstring = lives_strdup(
"");
3097 else estring = (
_(
", big-endian"));
3098 }
else estring = lives_strdup(
"");
3108 if (fps > 0 && fps !=
rdet->
fps) {
3111 }
else if (fps_denom > 0 && (fps_num * 1.) / (fps_denom * 1.) !=
rdet->
fps) {
3113 msg4 =
lives_strdup_printf(
_(
"Set video rate to %d:%d frames per second\n"), fps_num, fps_denom);
3122 if (anr || arate < 0) {
3123 if (arate < 1 || ((
rdet->
width != width ||
rdet->
height != height) && height * width > 0)) {
3125 if (!ochange) anr =
FALSE;
3126 msg6 = (
_(
"\nYou may wish to:\n"));
3133 msg8 = (
_(
"disable audio, since the target encoder cannot encode audio\n"));
3137 msg_a = lives_strconcat(msg1, msg2, msg3, msg4, msg5, msg6, msg7, msg8, NULL);
3149 boolean swap_endian,
boolean anr,
boolean save_all) {
3150 LiVESWidget *prep_dialog;
3153 char *msg2 = lives_strdup(
""), *msg3 = lives_strdup(
""), *msg4 = lives_strdup(
"");
3154 char *msg5 = lives_strdup(
""), *msg6 = lives_strdup(
""), *msg7 = lives_strdup(
"");
3155 char *msg_a, *msg_b = NULL;
3161 int carate, chsize, cvsize;
3169 carate =
cfile->arate;
3170 chsize =
cfile->hsize;
3171 cvsize =
cfile->vsize;
3175 if (swap_endian || asigned != 0 || (arate > 0 && arate != carate) || (fps > 0. && fps != cfps) ||
3176 (fps_denom > 0 && (fps_num * 1.) / (fps_denom * 1.) != cfps) || (!anr &&
3177 (chsize != width || cvsize != height) && height * width > 0)) {
3179 msg2 = (
_(
"LiVES must:\n"));
3180 if (swap_endian || asigned != 0 || (arate > 0 && arate != carate)) {
3183 if (asigned == 1) sstring = (
_(
", signed"));
3184 else if (asigned == 2) sstring = (
_(
", unsigned"));
3185 else sstring = lives_strdup(
"");
3189 else estring = (
_(
", big-endian"));
3190 }
else estring = lives_strdup(
"");
3198 if (fps > 0 && fps != cfps) {
3201 }
else if (fps_denom > 0 && (fps_num * 1.) / (fps_denom * 1.) != cfps) {
3203 msg4 =
lives_strdup_printf(
_(
"resample video to %d:%d frames per second\n"), fps_num, fps_denom);
3205 if (!anr && ((chsize != width || cvsize != height) && height * width > 0)) {
3212 if ((chsize != width || cvsize != height) && height * width > 0) {
3215 msg6 = (
_(
"\nYou may wish to:\n"));
3219 msg_a = lives_strconcat(msg1, msg2, msg3, msg4, msg5, msg6, msg7, NULL);
3221 msg_b = lives_strdup(
3222 _(
"\nYou will be able to undo these changes afterwards.\n\nClick `OK` to proceed, `Cancel` to abort.\n\n"));
3224 msg_b = (
_(
"\nChanges applied to the selection will not be permanent.\n\n"));
3239 _(
"\n\nLiVES was unable to record a performance. There is currently insufficient memory available.\n"
3240 "Try recording for just a selection of the file."));
3249 _(
"The playback speed (fps), or the audio rate\n of the clipboard does not match\n"
3250 "the playback speed or audio rate of the clip you are inserting into.\n\n"
3251 "The insertion will be adjusted to fit into the clip.\n\n"
3252 "Please press Cancel to abort the insert, or OK to continue."),
WARN_MASK_FPS);
3257 return do_yesno_dialog(
_(
"Current clips will be added to the clip set.\nIs that what you want ?\n"));
3262 return do_yesno_dialogf(
_(
"I can attempt to restore the frame index from a backup.\n(%s)\nShall I try ?\n"), fname_back);
3267 return do_yesno_dialogf(
P_(
"\nPaste %d frame ?\n",
"Paste %d frames ?\n", lframe), lframe);
3277 _(
"When opening a yuvmpeg stream, you should first create a fifo file, and then write yuv4mpeg frames to it.\n"
3278 "Now you will get a chance to browse for the fifo file here.\nFollowing that,\n"
3279 "LiVES will pause briefly until frames are received.\nYou should only click OK if you understand what you are doing, "
3280 "otherwise, click Cancel."),
3292 boolean encoding =
FALSE;
3296 if (sfile == NULL) sfile =
cfile;
3297 else encoding =
TRUE;
3346 LIVES_BOX(area), NULL);
3347 lives_signal_sync_connect(LIVES_GUI_OBJECT(cb), LIVES_WIDGET_TOGGLED_SIGNAL,
3361 _(
"After upgrading/installing, you may need to adjust the <prefix_dir> setting in your %s file"),
3362 (tmp = lives_filename_to_utf8(
prefs->
configfile, -1, NULL, NULL, NULL)));
3371 _(
"\n\nLiVES could not find any rendered effect plugins.\nPlease make sure you have them installed in\n"
3372 "%s%s%s\nor change the value of <lib_dir> in %s\n"),
3374 (tmp = lives_filename_to_utf8(
prefs->
configfile, -1, NULL, NULL, NULL)));
3382 char *msg = (
_(
"Sorry, unknown audio type.\n\n (Filenames must end in"));
3392 }
else if (i == 0) {
3404 d_print(
_(
"failed (unknown type)\n"));
3410 _(
"\nDo you wish to remove the layout files associated with this set ?\n"
3411 "(They will not be usable without the set).\n")));
3417 _(
"\nA set entitled %s already exists.\n"
3418 "Click OK to add the current clips and layouts to the existing set.\n"
3419 "Click Cancel to pick a new name.\n"), new_set);
3428 _(
"\nFrames from this clip are used in some multitrack layouts.\n"
3429 "Are you sure you wish to continue ?\n."));
3435 _(
"\nAudio from this clip is used in some multitrack layouts.\n"
3436 "Are you sure you wish to continue ?\n."));
3443 "from a future version of LiVES (%s)\n"
3444 "Opening it with the current version may result in a loss of quality\n"
3452 char *tmp, *msg, *endis, *endised;
3456 endis =
_(
"enable");
3457 endised =
_(
"enabled");
3459 endis =
_(
"disable");
3460 endised =
_(
"disabled");
3463 "To preserve the original appearance, I can override\n"
3464 "the current setting and %s letterboxing for this layout\n\n"
3465 "Click 'Yes' to proceed, or 'No' to keep the current setting\n\n"
3466 "(Note: the value for the current layout can be modified at any time\n"
3467 "via the menu option 'Tools' / 'Change Width, Height and Audio Values')\n")),
3476 static LiVESResponseType _do_df_notfound_dialog(
const char *detail,
const char *dfname,
boolean is_dir) {
3477 LiVESWidget *warning;
3478 LiVESResponseType response;
3479 char *xdetail, *msg, *whatitis, *extra;
3481 if (detail) xdetail = (
char *)detail;
3485 xdetail = lives_strdup(
_(
"The file"));
3486 extra =
_(
"could not be found.");
3487 }
else extra = lives_strdup(
"");
3488 whatitis = (
_(
"this file"));
3491 xdetail = lives_strdup(
_(
"The directory"));
3492 extra =
_(
"could not be found.");
3493 }
else extra = lives_strdup(
"");
3494 whatitis = (
_(
"this directory"));
3497 "Click Retry to try again, Browse to browse to the new location.\n"
3498 "otherwise click Skip to skip loading %s.\n"), xdetail, dfname, extra, whatitis);
3510 return _do_df_notfound_dialog(detail, dirname,
TRUE);
3514 return _do_df_notfound_dialog(detail, filename,
FALSE);
3521 _(
"\n\nLiVES could not find a required decoder plugin for the clip\n%s\n"
3522 "The clip could not be loaded.\n"), fname);
3534 "Please ensure that %s is set up correctly on your machine\n"
3535 "and also that the soundcard is not in use by another program\n"
3536 "Automatic jack startup will be disabled now.\n"),
3542 "Please start jack before starting LiVES\n"));
3546 #ifdef HAVE_PULSE_AUDIO
3547 const char *otherbit =
"\"lives -aplayer pulse\"";
3549 const char *otherbit =
"\"lives -aplayer sox\"";
3552 "\"lives -jackopts 16\", or\n\n%s\n"), otherbit);
3556 do_info_dialog(
_(
"\nAlternately, you can restart LiVES and select another audio player.\n"));
3562 _(
"\n\nLiVES needs more backup space for this layout.\nYou can increase "
3563 "the value in Preferences/Multitrack.\n"
3564 "It is recommended to increase it to at least %d MB"),
3573 _(
"\nSome old layouts for the set %s already exist.\n"
3574 "It is recommended that you delete them.\nDo you wish to delete them ?\n"),
3581 _(
"\nLiVES was unable to reserve enough memory for multitrack undo.\n"
3582 "Either close some other applications, or reduce the undo memory\n"
3583 "using Preferences/Multitrack/Undo Memory\n"));
3588 do_error_dialog(
_(
"\nOut of memory for undo.\nYou may need to increase the undo memory\n"
3589 "using Preferences/Multitrack/Undo Memory\n"));
3594 char *msg1 = (
_(
"\nLiVES was unable to reserve enough memory for the multitrack undo buffer.\n"));
3596 char *msg3 = (
_(
"or enter a smaller value.\n"));
3598 if (has_mt) msg2 = (
_(
"Try again from the clip editor, try closing some other applications\n"));
3599 else msg2 = (
_(
"Try closing some other applications\n"));
3608 _(
"Multitrack is set to 0 audio channels, but this layout has audio.\n"
3609 "You should adjust the audio settings from the Tools menu.\n"),
3615 do_error_dialog(
_(
"The current layout has audio, so audio channels may not be set to zero.\n"));
3621 _(
"Multitrack audio preview is only available with the\n\"jack\" or \"pulseaudio\" audio player.\n"
3622 "You can set this in Tools|Preferences|Playback."),
3629 _(
"Errors were detected in the layout (which may be due to transferring from another system, "
3630 "or from an older version of LiVES).\n"
3631 "Should I try to repair the disk copy of the layout ?\n"));
3641 do_error_dialogf(
_(
"The program %s is required to use this feature.\nPlease install it and try again."), progname);
3647 _(
"LiVES currently requires composite from ImageMagick to do letterboxing.\n"
3648 "Please install 'imagemagick' and try again."));
3654 _(
"LiVES currently requires convert from ImageMagick to do letterboxing.\n"
3655 "Please install 'imagemagick' and try again."));
3660 char *extra = lives_strdup(
""), *msg;
3663 extra = lives_strdup(
_(
"\n\nAlternately, LiVES may be able to install\na local user copy "
3664 "of the program.\n"));
3668 "If possible, kindly install it before continuing.%s"), exec, extra);
3672 LiVESResponseType ret;
3676 _(
"Cancel / Install Later"), LIVES_RESPONSE_CANCEL);
3678 _(
"Continue"), LIVES_RESPONSE_YES);
3686 return (ret == LIVES_RESPONSE_YES);
3695 do_info_dialogf(
_(
"Either '%s' or '%s' must be installed for this feature to work.\n"
3696 "If possible, kindly install one or other of these before continuing\n"),
3709 _(
"\nEvent list will be very large\nand may take a long time to display.\n"
3710 "Are you sure you wish to view it ?\n"));
3715 do_error_dialog(
_(
"\n\nYou must install 'dvgrab' to use this function.\n"));
3721 _(
"\n\nAudio recording can only be done using either\nthe \"jack\" "
3722 "or the \"pulseaudio\" audio player.\n"
3723 "You may need to select one of these in Tools/Preferences/Playback.\n"));
3728 do_error_dialog(
_(
"Video playback plugin failed to initialise palette !\n"));
3750 "File|Clean up disk space\n"),
3756 do_error_dialogf(
_(
"Stream frame size is too large for your network buffers.\nYou should do the following as root:\n\n"
3757 "echo %d > /proc/sys/net/core/rmem_max\n"), size);
3760 static LiVESList *tdlglist = NULL;
3774 LiVESList *xtdlglist;
3776 xtdlglist = tdlglist;
3777 tdlglist = tdlglist->next;
3778 if (tdlglist) tdlglist->prev = NULL;
3779 xtdlglist->next = NULL;
3780 xtdlglist->data = NULL;
3781 lives_list_free(xtdlglist);
3792 static void _threaded_dialog_spin(
double fraction) {
3796 if (fraction > 0.) {
3829 NULL,
"d", fraction);
3830 }
else _threaded_dialog_spin(fraction);
3833 static void _do_threaded_dialog(
const char *trans_text,
boolean has_cancel) {
3838 copy_text = lives_strdup(trans_text);
3854 NULL,
"sb", trans_text, has_cancel);
3856 _do_threaded_dialog(trans_text, has_cancel);
3860 static void _end_threaded_dialog(
void) {
3888 else _end_threaded_dialog();
3898 boolean can_retry,
boolean trysudo) {
3903 static boolean norecurse =
FALSE;
3904 char *xcom, *xaddbit, *xbit, *xsudomsg;
3905 char *msg, *tmp, *emsg, *msgx, *bit;
3907 char *bit2 = (retval > 255) ? lives_strdup(
"") :
lives_strdup_printf(
"[%s]", lives_strerror(retval));
3909 char *dsmsg = lives_strdup(
"");
3910 char *sudomsg = lives_strdup(
"");
3915 LiVESResponseType response = LIVES_RESPONSE_NONE;
3927 else addbit = lives_strdup(
"");
3930 else bit = lives_strdup(
"");
3934 if (can_retry) retryop = (
_(
"before clicking 'Retry'"));
3935 else retryop = (
_(
"before retrying the operation"));
3938 "from the commandline %s"),
EXEC_SUDO, com, retryop);
3942 xcom = lives_markup_escape_text(com, -1);
3943 xbit = lives_markup_escape_text(bit, -1);
3944 xaddbit = lives_markup_escape_text(addbit, -1);
3945 xsudomsg = lives_markup_escape_text(sudomsg, -1);
3947 msg =
lives_strdup_printf(
_(
"\nLiVES failed doing the following:\n%s\nPlease check your system for "
3949 xcom, xbit, xaddbit, dsmsg, xsudomsg);
3982 char *dsmsg = lives_strdup(
"");
3985 char *sutf = lives_filename_to_utf8(s, -1, NULL, NULL, NULL), *xsutf, *xaddbit;
3993 lives_snprintf(dirname,
PATH_MAX,
"%s", s);
3995 exists = lives_file_test(dirname, LIVES_FILE_TEST_EXISTS);
4008 else addbit = lives_strdup(
"");
4010 xsutf = lives_markup_escape_text(sutf, -1);
4013 xaddbit = lives_markup_escape_text(addbit, -1);
4016 "Please check for possible error causes.\n%s"),
4017 xsutf, xaddbit, dsmsg);
4037 char *sutf = lives_filename_to_utf8(s, -1, NULL, NULL, NULL);
4040 else addbit = lives_strdup(
"");
4043 "Please check for possible error causes.\n%s"),
4063 LiVESResponseType ret;
4064 char *msg, *emsg, *tmp;
4065 char *sutf = lives_filename_to_utf8(fname, -1, NULL, NULL, NULL), *xsutf;
4066 char *dsmsg = lives_strdup(
"");
4076 lives_snprintf(dirname,
PATH_MAX,
"%s", fname);
4078 exists = lives_file_test(dirname, LIVES_FILE_TEST_EXISTS);
4090 xsutf = lives_markup_escape_text(sutf, -1);
4095 "Please check for possible error causes.\n%s"), xsutf, dsmsg);
4097 char *xerrtext = lives_markup_escape_text(errtext, -1);
4099 msg =
lives_strdup_printf(
_(
"\nLiVES was unable to write to the file\n%s\nThe error was\n%s.\n%s"),
4100 xsutf, xerrtext, dsmsg);
4127 LiVESResponseType ret;
4129 char *sutf = lives_filename_to_utf8(fname, -1, NULL, NULL, NULL);
4134 "Please check for possible error causes.\n"), sutf);
4137 msg =
lives_strdup_printf(
_(
"\nLiVES was unable to read from the file\n%s\nThe error was\n%s.\n"),
4156 LiVESResponseType ret;
4173 LiVESResponseType retval;
4187 LiVESResponseType ret;
4188 char *hname, *key, *msg;
4217 dutf = lives_filename_to_utf8(dir, -1, NULL, NULL, NULL);
4219 "Please check your system for errors.\n"), dutf);
4227 LiVESResponseType resp;
4228 char *msg, *can_cancel;
4230 can_cancel = (
_(
", click Cancel to continue regardless,\n"));
4232 can_cancel = lives_strdup(
"");
4235 "Please check the file permissions and try again."
4236 "%sor click Abort to exit from LiVES"), file_name, can_cancel);
4248 LiVESResponseType resp;
4249 char *msg, *can_cancel;
4251 can_cancel = (
_(
"click Cancel to continue regardless, "));
4253 can_cancel = lives_strdup(
"");
4255 msg =
lives_strdup_printf(
_(
"\nLiVES was unable to either create or write to the directory:\n%s\n"
4256 "Please check the directory permissions and try again,\n"
4257 "%sor click Abort to exit from LiVES"), dir_name, can_cancel);
4271 char *msg =
lives_strdup_printf(
_(
"\nLiVES was unable to read from the directory:\n%s\n"), dir_name);
4278 return do_yesno_dialog(
_(
"\nAbort and exit immediately from LiVES\nAre you sure ?\n"));
4284 "Please select another encoder from the list.\n"),
4290 do_error_dialog(
_(
"\nThis card is already in use and cannot be opened multiple times.\n"));
4296 "- Check the device permissions\n"
4297 "- Check if this device is in use by another program.\n"
4298 "- Check if the device actually exists.\n"), devstr);
4304 "Do you wish to overwrite the existing subtitles ?\n"));
4309 char *msg = (
_(
"\nLiVES currently only supports subtitles of type"));
4335 return do_yesno_dialog(
_(
"\nErase all subtitles from this clip.\nAre you sure ?\n"));
4342 _(
"\nLiVES does not recognise the subtitle file type \"%s\".\n"
4343 "Click Cancel to set another file name\nor OK to continue and save as type \"%s\"\n"),
4352 return do_yesno_dialog(
_(
"\nDo you wish to move the current clip sets to the new directory ?\n("
4353 "If unsure, click Yes)\n"));
4359 _(
"\nWarning - the set %s\nis in use by another copy of LiVES.\n"
4360 "You are strongly advised to close the other copy before clicking Yes to continue\n.\n"
4361 "Click No to cancel loading the set.\n"),
4369 "If you have Sets in another directory, you can either:\n"
4370 " - change the working directory in Preferences, or\n"
4371 " - restart lives with the -workdir switch to set it temporarily"),
4377 char *text = (
_(
"Possible lost clips were detected within the LiVES working directory.\n"
4378 "What would you like me to do with them ?\n"));
4379 char *title = (
_(
"Missing Clips Detected"));
4381 LiVESResponseType ret;
4385 _(
"Maybe later"), LIVES_RESPONSE_NO);
4387 _(
"Try to recover them"), LIVES_RESPONSE_YES);
4395 return (ret == LIVES_RESPONSE_YES);
4410 char *msg = (
_(
"\n\nCLEANING AND COPYING FILES. THIS MAY TAKE SOME TIME.\nDO NOT SHUT DOWN OR "
4411 "CLOSE LIVES !\n"));
4419 LiVESResponseType resp;
4421 "The clip size is %d X %d, however at least one frame has size %d X %d\n"
4422 "What would you like to do ?"), cwidth, cheight, fwidth, fheight);
4430 LIVES_RESPONSE_CANCEL);
4433 LIVES_RESPONSE_ACCEPT);
4436 _(
"Resize images to clip size"),
4437 LIVES_RESPONSE_YES);
4450 LiVESResponseType resp;
4452 "The image format should be %s\n"
4453 "What would you like to do ?"),
4462 LIVES_RESPONSE_CANCEL);
4476 "The theme could not be loaded correctly.\n"), themefile);
4482 _(
"No clips were recovered for set (%s).\n"
4483 "Please check the spelling of the set name and try again.\n"),
4494 "After upgrading, you are advised to run:"
4495 "\n\nFiles -> Clean up Diskspace\n"), LiVES_VERSION);
4501 do_error_dialogf(
_(
"\nYou must have %s installed and in your path to use this toy.\n"
4502 "Consult your package distributor.\n"),
4508 do_error_dialog(
_(
"\nYou must have a minimum of one clip loaded to use this toy.\n"));
4513 do_error_dialog(
_(
"\nLiVES lost its connection to jack and was unable to reconnect.\n"
4514 "Restarting LiVES is recommended.\n"));
4520 _(
"\nLiVES lost its connection to pulseaudio and was unable to reconnect.\n"
4521 "Restarting LiVES is recommended.\n"));
4526 do_error_dialog(
_(
"Please set your CD play device in Tools | Preferences | Misc\n"));
4531 do_error_dialogf(
_(
"\nLiVES was unable to import the theme file\n%s\n(Theme name not found).\n"),
4539 return do_warning_dialog(
_(
"Changes made to this clip have not been saved or backed up.\n\n"
4540 "Really close it ?"));
4545 return lives_strdup(
4546 _(
"You have chosen to change the working directory.\n"
4547 "Please make sure you have no other copies of LiVES open.\n\n"
4548 "If you do have other copies of LiVES open, please close them now, "
4549 "*before* pressing OK.\n\n"
4550 "Alternatively, press Cancel to restore the working directory to its original setting."));
4556 _(
"\nLiVES will now shut down. You need to restart it for the new "
4557 "preferences to take effect.\nClick OK to continue.\n"));
4562 return do_yesno_dialogf(
_(
"\nA custom theme with the name\n%s\nalready exists. "
4563 "Would you like to overwrite it ?\n"), themename);
4575 "\n\nResizing of clips is no longer necessary, "
4576 "as LiVES will internally adjust frame sizes as "
4577 "needed at the appropriate moments.\n\n"
4578 "However, physically reducing the frame size may in some cases "
4579 "lead to improved playback \n"
4580 "and processing rates.\n\n"));
4593 _(
"\nLiVES would like to open a local network connection (UDP port %d),\n"
4594 "to let other applications connect to it.\n"
4595 "Do you wish to allow this (for this session only) ?\n"),
4608 LiVESResponseType ret;
4609 char *text, *title, *prname, *errtxt, *errtxt2, *xsudt;
4610 char *tmp, *action, *verb;
4611 int nrem = argc - offs;
4621 if (nrem < 4)
return FALSE;
4631 " %s %s\n from a commandline terminal\n"),
4633 xsudt = lives_markup_escape_text(sudotext, -1);
4635 }
else xsudt = lives_strdup(
"");
4637 prname = lives_markup_escape_text(argv[offs], -1);
4638 errtxt = lives_markup_escape_text(argv[3], -1);
4640 if (errtxt && *errtxt)
4642 "\n\n'%s'\n\n"), prname, errtxt);
4649 verb =
_(
"download");
4650 action =
_(
"by downloading");
4652 verb =
_(
"copying");
4653 action = lives_strdup(
_(
"by creating"));
4657 "<b>Alternately, it may be possible to fix this "
4658 "%s an individual copy of the program\n%s to your "
4659 "home directory</b>\n"
4660 "Please consider the options "
4661 "and then decide how to proceed.\n"),
4662 errtxt2, prname, action, prname);
4665 title = (
_(
"Problem Detected"));
4674 LIVES_RESPONSE_CANCEL);
4678 LIVES_RESPONSE_YES);
4685 if (ret == LIVES_RESPONSE_CANCEL) {
4700 _(
"\nLiVES has detected a multitrack layout from a previous session.\n"
4701 "Would you like to try and recover it ?\n"))) {
char * lives_format_storage_space_string(uint64_t space)
boolean lives_freep(void **ptr)
#define LIVES_GLOBAL_INLINE
void * jackd
jack audio player / transport
void clear_mainw_msg(void)
boolean internal_messaging
internal fx
boolean activate_x11_window(const char *wid)
LiVESWidget * stop_button
void do_dir_perm_access_error(const char *dir_name)
volatile ticks_t startticks
effective ticks when current frame was (should have been) displayed
#define EFFORT_RANGE_MAX
if set to TRUE during playback then a new frame (or possibly the current one) will be displayed ASAP
LIVES_GLOBAL_INLINE boolean do_event_list_warning(void)
ticks_t lives_get_current_playback_ticks(ticks_t origsecs, ticks_t origusecs, lives_time_source_t *time_source)
char * ds_warning_msg(const char *dir, char **mountpoint, uint64_t dsval, uint64_t cwarn, uint64_t nwarn)
LIVES_GLOBAL_INLINE boolean do_please_install(const char *exec, uint64_t gflags)
ticks_t last_display_ticks
void do_write_failed_error_s(const char *s, const char *addinfo)
LiVESIOChannel * iochan
encoder text output
double fixed_fpsd
<=0. means free playback
void update_effort(int nthings, boolean badthings)
void run_diskspace_dialog(void)
LiVESWidgetColor normal_back
LIVES_GLOBAL_INLINE boolean do_erase_subs_warning(void)
#define PLUGIN_RENDERED_EFFECTS_BUILTIN
external rendered fx plugins (RFX plugins)
volatile off64_t aseek_pos
audio seek posn. (bytes) for when we switch clips
#define WARN_MASK_LAYOUT_LB
frames_t calc_new_playback_position(int fileno, ticks_t otc, ticks_t *ntc)
LiVESWidgetColor light_red
LIVES_GLOBAL_INLINE void do_after_invalid_warning(void)
void update_visual_params(lives_rfx_t *rfx, boolean update_hidden)
apply internal value changes to interface widgets
const char * get_cache_stats(void)
LiVESResponseType do_file_notfound_dialog(const char *detail, const char *filename)
uint32_t get_approx_ln(uint32_t val) GNU_CONST
LIVES_GLOBAL_INLINE void do_jack_lost_conn_error(void)
_vid_playback_plugin * open_vid_playback_plugin(const char *name, boolean in_use)
lives_mgeometry_t * mgeom
multi-head support
boolean do_progress_dialog(boolean visible, boolean cancellable, const char *text)
boolean do_yesno_dialogf(const char *fmt,...)
#define SWITCH_COMPENSATION
@ LIVES_STORAGE_STATUS_OVER_QUOTA
LIVES_GLOBAL_INLINE boolean do_theme_exists_warn(const char *themename)
@ LIVES_DIALOG_CANCEL_RETRY_BROWSE
LiVESList * xlays
immediately (to be) affected layout maps
char workdir[PATH_MAX]
kept in locale encoding
#define ENC_DETAILS_WIN_V
LIVES_GLOBAL_INLINE void do_mt_audchan_error(int warn_mask)
boolean do_close_changed_warn(void)
volatile boolean is_exiting
set during shutdown (inverse of only_close then)
#define IS_VALID_CLIP(clip)
LIVES_GLOBAL_INLINE void do_audio_warning(void)
void on_cleardisk_advanced_clicked(LiVESWidget *widget, livespointer user_data)
LiVESWidget * splash_window
splash window
LIVES_GLOBAL_INLINE void do_need_mplayer_dialog(void)
lives_storage_status_t get_storage_status(const char *dir, uint64_t warn_level, int64_t *dsval, int64_t ds_resvd)
LiVESWidgetColor dark_red
_vid_playback_plugin * vpp
video plugin
LiVESResponseType do_file_perm_error(const char *file_name, boolean allow_cancel)
ticks_t last_startticks
effective ticks when lasty frame was (should have been) displayed
LIVES_GLOBAL_INLINE boolean do_please_install_either(const char *exec, const char *exec2)
LiVESResponseType do_info_dialogf(const char *fmt,...)
void * ext_src
points to opaque source for non-disk types
boolean do_abort_check(void)
LIVES_GLOBAL_INLINE boolean do_set_rename_old_layouts_warning(const char *new_set)
#define JUMPFRAME_TRIGGER
LIVES_GLOBAL_INLINE boolean do_set_locked_warning(const char *setname)
void get_dirname(char *filename)
int new_clip
clip we should switch to during playback; switch will happen at the designated SWITCH POINT
lives_checkstatus_t has_wmctrl
boolean do_warning_dialog_with_check(const char *text, uint64_t warn_mask_number)
LIVES_GLOBAL_INLINE void do_lb_convert_error(void)
frames_t frames
number of video frames
void pump_io_chan(LiVESIOChannel *iochan)
lives_clip_type_t clip_type
LIVES_GLOBAL_INLINE void do_abortblank_error(const char *what)
void reset_frame_and_clip_index(void)
TODO: split into player, progress, dialogs.
void ce_thumbs_apply_rfx_changes(void)
LIVES_GLOBAL_INLINE void do_dev_busy_error(const char *devstr)
LIVES_GLOBAL_INLINE double get_inst_fps(void)
frames_t virtual_to_images(int sfileno, frames_t sframe, frames_t eframe, boolean update_progress, LiVESPixbuf **pbr)
volatile boolean video_seek_ready
lives_funcptr_t abort_hook_func
can be set to point to a function to be run before abort, for critical functions
@ LIVES_DIALOG_RETRY_CANCEL
#define PREF_LIVES_WARNING_MASK
#define is_layer_ready(layer)
LiVESResponseType do_read_failed_error_s_with_retry(const char *fname, const char *errtext)
LiVESWidget * create_encoder_prep_dialog(const char *text1, const char *text2, boolean opt_resize)
#define CLIP_HAS_VIDEO(clip)
LIVES_GLOBAL_INLINE void do_vpp_fps_error(void)
ticks_t firstticks
ticks when audio started playing (for non-realtime audio plugins)
#define LIVES_FILE_EXT_SUB
LIVES_GLOBAL_INLINE void do_after_crash_warning(void)
frames_t record_frame
frame number to insert in recording
boolean do_comments_dialog(int fileno, char *filename)
text_window * create_text_window(const char *title, const char *text, LiVESTextBuffer *textbuffer, boolean add_buttons)
boolean ask_permission_dialog(int what)
boolean noswitch
value set automatically to prevent 'inopportune' clip switching
ticks_t timeout_ticks
incremented if effect/rendering is paused/previewed
LIVES_GLOBAL_INLINE LiVESResponseType do_info_dialog(const char *text)
boolean lives_alarm_clear(lives_alarm_t alarm_handle)
#define TICKS_PER_SECOND_DBL
actually microseconds / 100.
boolean check_backend_return(lives_clip_t *sfile)
uint64_t ds_crit_level
diskspace critical level bytes
@ CANCEL_KILL
normal - kill background processes working on current clip
LIVES_GLOBAL_INLINE void do_mt_no_jack_error(int warn_mask)
frames_t actual_frame
actual / last frame being displayed
size_t get_token_count(const char *string, int delim)
LIVES_GLOBAL_INLINE void do_rmem_max_error(int size)
void do_quick_switch(int new_file)
@ CANCEL_USER
user pressed stop
LIVES_GLOBAL_INLINE boolean do_move_workdir_dialog(void)
LIVES_GLOBAL_INLINE boolean do_existing_subs_warning(void)
#define LIVES_PERM_OSC_PORTS
boolean check_storage_space(int clipno, boolean is_processing)
_fx_dialog * fx_dialog[2]
LiVESWidget * preview_button
#define TICKS_PER_SECOND
ticks per second - GLOBAL TIMEBASE
void do_chdir_failed_error(const char *dir)
volatile boolean agen_needs_reinit
#define LIVES_DIRECTION_SIG(dir)
boolean do_auto_dialog(const char *text, int type)
@ LIVES_DIALOG_SKIP_RETRY_BROWSE
#define ENC_DETAILS_WIN_H
vertical size in pixels of the encoder output window
LIVES_GLOBAL_INLINE void do_vpp_palette_error(void)
#define lives_nanosleep(nanosec)
LiVESWidgetColor light_green
weed_event_t * event_list
current event_list, for recording
boolean rte_window_hidden(void)
void response_ok(LiVESButton *button, livespointer user_data)
char * dump_messages(int start, int end)
volatile int rec_aclip
recording values - to be inserted at the following video frame
_encoder encoder
from main.h
LIVES_GLOBAL_INLINE LiVESResponseType do_error_dialog(const char *text)
LIVES_GLOBAL_INLINE char * get_upd_msg(void)
char * unhash_version(uint64_t version)
boolean do_header_write_error(int clip)
void end_threaded_dialog(void)
LIVES_GLOBAL_INLINE void do_do_not_close_d(void)
void threaded_dialog_spin(double fraction)
char * clip_detail_to_string(lives_clip_details_t what, size_t *maxlenp)
lives_render_error_t render_error
lives_img_type_t img_type
void on_cancel_keep_button_clicked(LiVESButton *button, livespointer user_data)
int pheight
playback height
@ CLIP_TYPE_DISK
imported video, broken into frames
boolean do_encoder_restrict_dialog(int width, int height, double fps, int fps_num, int fps_denom, int arate, int asigned, boolean swap_endian, boolean anr, boolean save_all)
#define LIVES_OSC_NOTIFY_QUIT
sent when app quits
boolean do_yesno_dialog_with_check(const char *text, uint64_t warn_mask_number)
lives_checkstatus_t has_xdotool
boolean rdet_suggest_values(int width, int height, double fps, int fps_num, int fps_denom, int arate, int asigned, boolean swap_endian, boolean anr, boolean ignore_fps)
LIVES_GLOBAL_INLINE void do_no_loadfile_error(const char *fname)
volatile lives_whentostop_t whentostop
LiVESResponseType do_dir_perm_error(const char *dir_name, boolean allow_cancel)
@ LIVES_STORAGE_STATUS_WARNING
lives_direction_t
use REVERSE / FORWARD when a sign is used, BACKWARD / FORWARD when a parity is used
LIVES_GLOBAL_INLINE void do_mt_undo_mem_error(void)
lives_permmgr_t * permmgr
boolean ask_permission_dialog_complex(int what, char **argv, int argc, int offs, const char *sudocom)
LIVES_GLOBAL_INLINE boolean do_gamma_import_warn(uint64_t fv, int gamma_type)
volatile boolean loop_cont
@ MISSING
not yet implemented (TODO)
volatile lives_cancel_t cancelled
void do_jack_noopen_warn(void)
ticks_t offsetticks
offset for multitrack playback start
char * ds_critical_msg(const char *dir, char **mountpoint, uint64_t dsval)
warn about disk space
#define is_realtime_aplayer(ptype)
#define EXEC_AUTOLIVES_PL
shipped
void recover_layout_cancelled(boolean is_startup)
int get_frame_count(int idx, int xsize)
sets mainw->files[idx]->frames with current framecount
LIVES_GLOBAL_INLINE void do_encoder_sox_error(void)
@ CANCEL_ERROR
cancelled because of error
boolean recover_layout(void)
ticks_t cevent_tc
timecode of currently processing event
void on_cleardisk_activate(LiVESWidget *widget, livespointer user_data)
void threaded_dialog_pop(void)
LIVES_GLOBAL_INLINE void do_no_sets_dialog(const char *dir)
#define WARN_MASK_CLEAN_INVALID
LIVES_GLOBAL_INLINE void do_set_noclips_error(const char *setname)
frames_t fps_mini_measure
show fps stats during playback
void workdir_warning(void)
LIVES_GLOBAL_INLINE LiVESWindow * get_transient_full(void)
LIVES_GLOBAL_INLINE void do_locked_in_vdevs_error(void)
#define LIVES_IS_INTERACTIVE
boolean preview_rendering
void d_print(const char *fmt,...)
char name[CLIP_NAME_MAXLEN]
the display name
volatile double rec_aseek
LiVESWidget * p_playbutton
LiVESList * get_set_list(const char *dir, boolean utf8)
LiVESWidget * preview_box
#define INSTALL_CANLOCAL
install guidance flags
LIVES_GLOBAL_INLINE boolean do_layout_alter_frames_warning(void)
LiVESResponseType do_header_missing_detail_error(int clip, lives_clip_details_t detail)
LiVESTextView * optextview
volatile ticks_t clock_ticks
unadjusted system time since pb start, measured concurrently with currticks
LIVES_GLOBAL_INLINE void do_program_not_found_error(const char *progname)
LIVES_GLOBAL_INLINE void do_audrate_error_dialog(void)
void do_jack_noopen_warn2(void)
LIVES_GLOBAL_INLINE void do_mt_no_audchan_error(void)
void on_preview_clicked(LiVESButton *button, livespointer user_data)
void procw_desensitize(void)
ticks_t deltaticks
deltaticks for scratching
LiVESWidget * create_message_dialog(lives_dialog_t diat, const char *text, int warn_mask_number)
boolean do_sub_type_warning(const char *ext, const char *type_ext)
size_t lives_fread_string(char *buff, size_t stlen, const char *fname)
@ CLIP_TYPE_FILE
unimported video, not or partially broken in frames
boolean startup_message_info(const char *msg)
void reinit_audio_gen(void)
boolean pull_frame_at_size(weed_layer_t *layer, const char *image_ext, weed_timecode_t tc, int width, int height, int target_palette)
ticks_t origsecs
playback start seconds - subtracted from all other ticks to keep numbers smaller
boolean playing_sel
list of set names in current workdir, mau be NULL
LIVES_GLOBAL_INLINE void do_pulse_lost_conn_error(void)
@ CANCEL_NO_MORE_PREVIEW
ran out of preview frames
boolean cs_permitted
set to TRUE to allow overriding of noswitch in limited circumstances
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 do_save_clipset_warn(void)
#define SCRATCH_JUMP_NORESYNC
jump with no audio resync
boolean do_clipboard_fps_warning(void)
char info_file[PATH_MAX]
used for asynch communication with externals
LiVESResponseType do_memory_error_dialog(char *op, size_t bytes)
LIVES_GLOBAL_INLINE void do_rendered_fx_dialog(void)
weed_plant_t * process_events(weed_plant_t *next_event, boolean process_audio, weed_timecode_t curr_tc)
int playing_file
which number file we are playing (or -1) [generally mainw->current_file]
#define P_(String, StringPlural, n)
LIVES_GLOBAL_INLINE void do_layout_ascrap_file_error(void)
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
@ CANCEL_PREVIEW_FINISHED
effect processing finished during preview
const char * image_ext_to_lives_image_type(const char *img_ext)
lives_cancel_t
cancel reason
boolean save_clip_value(int which, lives_clip_details_t, void *val)
@ LIVES_DIALOG_ABORT_RETRY
void * main_thread_execute(lives_funcptr_t func, int return_type, void *retval, const char *args_fmt,...)
volatile boolean audio_seek_ready
frames_t fps_measure
show fps stats after playback
LIVES_GLOBAL_INLINE void do_layout_scrap_file_error(void)
void * pulsed
pulseaudio player
LIVES_GLOBAL_INLINE LiVESResponseType do_retry_cancel_dialog(const char *text)
LIVES_GLOBAL_INLINE boolean do_warning_dialog(const char *text)
int64_t jump_limit
for internal use
double aframeno
and the audio 'frame' for when we are looping
void do_encoder_img_fmt_error(render_details *rdet)
LIVES_GLOBAL_INLINE void do_no_in_vdevs_error(void)
LiVESWidget * add_list_expander(LiVESBox *box, const char *title, int width, int height, LiVESList *xlist)
LiVESAccelGroup * accel_group
_palette * palette
interface colour settings
LIVES_GLOBAL_INLINE void do_optarg_blank_err(const char *what)
lives_render_error_t(* progress_fn)(boolean reset)
LIVES_GLOBAL_INLINE void too_many_files(void)
LIVES_GLOBAL_INLINE ticks_t q_gint64(ticks_t in, double fps)
LiVESResponseType do_error_dialog_with_check(const char *text, uint64_t warn_mask_number)
#define LIVES_CLIP_HEADER
boolean do_set_duplicate_warning(const char *new_set)
void update_progress(boolean visible)
LIVES_GLOBAL_INLINE void do_cd_error_dialog(void)
LIVES_GLOBAL_INLINE void do_no_decoder_error(const char *fname)
#define LIVES_AUDIO_LOAD_FILTER
boolean check_layer_ready(weed_layer_t *layer)
block until layer pixel_data is ready.
LiVESWidget * m_playbutton
LIVES_GLOBAL_INLINE void do_clip_divergence_error(int fileno)
ticks_t adjticks
used to equalise the timecode between alternate timer sources (souce -> clock adjustment)
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)
#define WARN_MASK_SAVE_SET
int calc_frame_from_time4(int filenum, double time)
nearest frame, no maximum
LIVES_GLOBAL_INLINE ticks_t lives_get_current_ticks(void)
int set_int_pref(const char *key, int value)
boolean do_foundclips_query(void)
boolean show_player_stats
void do_threaded_dialog(const char *trans_text, boolean has_cancel)
int arps
audio physical sample rate (i.e the "normal" sample rate of the clip when played at 1,...
LiVESWidget * trash_rb(LiVESButtonBox *parent)
LIVES_GLOBAL_INLINE LiVESResponseType do_abort_ok_dialog(const char *text)
int lives_rmdir(const char *dir, boolean force)
#define lives_strdup_printf(fmt,...)
void on_effects_paused(LiVESButton *button, livespointer user_data)
LIVES_GLOBAL_INLINE weed_timecode_t get_event_timecode(weed_plant_t *plant)
LIVES_GLOBAL_INLINE void do_dvgrab_error(void)
void reset_playback_clock(void)
void handle_cached_keys(void)
smooth the key repeat for scratching
LIVES_GLOBAL_INLINE void do_shutdown_msg(void)
LiVESWidget * pause_button
LIVES_GLOBAL_INLINE void do_lb_composite_error(void)
LIVES_GLOBAL_INLINE void do_messages_window(boolean is_startup)
void add_warn_check(LiVESBox *box, int warn_mask_number)
void lives_list_free_all(LiVESList **)
char * get_mountpoint_for(const char *dir)
int hsize
frame width (horizontal) in pixels (NOT macropixels !)
#define LIVES_MAIN_WINDOW_WIDGET
void on_warn_mask_toggled(LiVESToggleButton *togglebutton, livespointer user_data)
void do_audio_import_error(void)
LIVES_GLOBAL_INLINE lives_cancel_t handle_audio_timeout(void)
#define MAX_MSG_WIDTH_CHARS
max width of text on warning/error labels
int seek_flag
plugin can change per frame
int ascrap_file
scrap file for recording audio scraps
LIVES_GLOBAL_INLINE void do_no_mplayer_sox_error(void)
frames_t last_vframe_played
void pull_frame_threaded(weed_layer_t *layer, const char *img_ext, weed_timecode_t tc, int width, int height)
void event_list_add_end_events(weed_event_t *event_list, boolean is_final)
boolean ignore_clipswitch
LIVES_GLOBAL_INLINE size_t lives_strlen(const char *s)
LIVES_GLOBAL_INLINE int lives_strappend(const char *string, int len, const char *xnew)
@ CANCEL_AUDIO_ERROR
cancelled because of soundcard error
#define LIVES_SUBS_FILTER
boolean add_clear_ds_button
char * subt_save_file
name of file to save subtitles to
lives_mt * multitrack
holds a pointer to the entire multitrack environment; NULL in Clip Edit mode
LIVES_GLOBAL_INLINE char * workdir_ch_warning(void)
#define CURRENT_CLIP_IS_VALID
ticks_t lives_alarm_check(lives_alarm_t alarm_handle)
boolean is_virtual_frame(int sfileno, frames_t frame)
#define DEF_BUTTON_HEIGHT
void d_print_cancelled(void)
void disk_monitor_forget(void)
LIVES_GLOBAL_INLINE void do_encoder_acodec_error(void)
lives_proc_thread_t disk_monitor_start(const char *dir)
volatile boolean record_paused
pause during recording
LiVESWidget * framedraw_spinbutton
the frame number button
#define WARN_MASK_MT_BACKUP_SPACE
LiVESResponseType do_write_failed_error_s_with_retry(const char *fname, const char *errtext)
void do_jack_noopen_warn4(void)
LIVES_GLOBAL_INLINE void do_mt_backup_space_error(lives_mt *mt, int memreq_mb)
LiVESResponseType do_header_read_error_with_retry(int clip)
void do_jack_noopen_warn3(void)
LIVES_GLOBAL_INLINE LiVESWidget * create_question_dialog(const char *title, const char *text)
LIVES_GLOBAL_INLINE weed_layer_t * lives_layer_new_for_frame(int clip, frames_t frame)
#define MAX_FILES
max files is actually 1 more than this, since file 0 is the clipboard
@ LIVES_DIALOG_WARN_WITH_CANCEL
boolean only_close
only close clips - do not exit
LIVES_GLOBAL_INLINE void do_upgrade_error_dialog(void)
LIVES_GLOBAL_INLINE char * lives_strtrim(const char *buff)
boolean no_exit
if TRUE, do not exit after saving set
LiVESWidgetColor dark_orange
LiVESWidget * progressbar
uint64_t next_ds_warn_level
current disk space warning level for the tempdir
weed_plant_t * get_frame_event_at(weed_plant_t *event_list, weed_timecode_t tc, weed_plant_t *shortcut, boolean exact)
void lives_notify(int msgnumber, const char *msgstring)
#define WARN_MASK_DUPLICATE_SET
boolean do_mt_lb_warn(boolean lb)
LIVES_GLOBAL_INLINE boolean prompt_remove_layout_files(void)
boolean ext_playback
using external video playback plugin
LIVES_GLOBAL_INLINE void do_mt_undo_buf_error(void)
LIVES_GLOBAL_INLINE LiVESResponseType do_imgfmts_error(lives_img_type_t imgtype)
const char * get_image_ext_for_type(lives_img_type_t imgtype)
lives_subtitle_type_t type
LIVES_GLOBAL_INLINE LiVESResponseType do_resize_dlg(int cwidth, int cheight, int fwidth, int fheight)
LIVES_GLOBAL_INLINE void do_bad_layout_error(void)
boolean do_warning_dialogf(const char *fmt,...)
LIVES_GLOBAL_INLINE void do_autolives_needs_clips_error(void)
#define WARN_MASK_RENDERED_FX
#define LIVES_PERM_COPY_LOCAL
double pb_fps
current playback rate, may vary from fps, can be 0. or negative
@ CANCEL_INTERNAL_ERROR
software error: e.g set mainw->current_file directly during pb instead of mainw->new_clip
char * get_extension(const char *filename)
void lives_kill_subprocesses(const char *dirname, boolean kill_parent)
weed_plant_t * frame_layer_preload
predictive caching apparatus
void add_resnn_label(LiVESDialog *dialog)
lives_storage_status_t
disk/storage status values
#define EXEC_SUDO
other executables
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_free(weed_layer_t *layer)
frees pixel_data for a layer, then the layer itself
#define CLIP_HAS_AUDIO(clip)
#define WARN_MASK_OPEN_YUV4M
@ CANCEL_EVENT_LIST_END
event_list completed
LiVESWidget * cancel_button
lives_checkstatus_t has_sox_play
#define LIVES_PERM_DOWNLOAD_LOCAL
LIVES_GLOBAL_INLINE void do_bad_theme_error(const char *themefile)
LIVES_GLOBAL_INLINE LiVESResponseType do_abort_retry_dialog(const char *text)
void *(* lives_funcptr_t)(void *)
void do_invalid_subs_error(void)
boolean do_yesno_dialog(const char *text)
double audio_stretch
for fixed fps modes, the value is used to speed up / slow down audio
LIVES_GLOBAL_INLINE void do_bad_theme_import_error(const char *theme_file)
int vsize
frame height (vertical) in pixels
#define LIVES_FILE_EXT_SRT
const char * weed_gamma_get_name(int gamma)
void do_read_failed_error_s(const char *s, const char *addinfo)
@ CANCEL_SOFT
just cancel in GUI (for keep, etc)
corresponds to one clip in the GUI
boolean is_processing
states
int64_t disk_monitor_check_result(const char *dir)
LiVESWidget * scrolledwindow
char * insert_newlines(const char *text, int maxwidth)
boolean lives_ask_permission(char **argv, int argc, int offs)
LIVES_GLOBAL_INLINE boolean do_mt_rect_prompt(void)
LiVESResponseType do_dir_notfound_dialog(const char *detail, const char *dirname)
LIVES_GLOBAL_INLINE LiVESResponseType do_abort_cancel_retry_dialog(const char *text)
void threaded_dialog_push(void)
LiVESResponseType handle_backend_errors(boolean can_retry)
LIVES_GLOBAL_INLINE boolean do_layout_recover_dialog(void)
#define DROPFRAME_TRIGGER
_commentsw * create_comments_dialog(lives_clip_t *sfile, char *filename)
volatile ticks_t currticks
wall clock time, updated whenever lives_get_*_ticks is called
lives_time_source_t
timebase sources
@ CANCEL_NO_PROPOGATE
cancel but keep opening
lives_cancel_type_t cancel_type
LiVESWidget * prefs_dialog
int asampsize
audio sample size in bits (8 or 16)
char configfile[PATH_MAX]
kept in locale encoding (config settings) [default ~/.local/config/lives)
volatile int agen_key
which fx key is generating audio [1 based] (or 0 for none)
LIVES_GLOBAL_INLINE void do_card_in_use_error(void)
#define WARN_MASK_CLEAN_AFTER_CRASH
LIVES_GLOBAL_INLINE void do_need_mplayer_mpv_dialog(void)
LIVES_GLOBAL_INLINE boolean do_reload_set_query(void)
#define SCRATCH_JUMP
jump and resync audio
int process_one(boolean visible)
LIVES_GLOBAL_INLINE void do_aud_during_play_error(void)
LIVES_GLOBAL_INLINE void perf_mem_warning(void)
boolean is_loaded
should we continue loading if we come back to this clip
LIVES_GLOBAL_INLINE boolean findex_bk_dialog(const char *fname_back)
LIVES_GLOBAL_INLINE boolean do_layout_alter_audio_warning(void)
boolean save_clip_values(int which_file)
int arate
current audio playback rate (varies if the clip rate is changed)
@ LIVES_DIALOG_ABORT_CANCEL_RETRY
LIVES_GLOBAL_INLINE void do_nojack_rec_error(void)
LIVES_GLOBAL_INLINE void do_abort_dialog(const char *text)
@ LIVES_STORAGE_STATUS_CRITICAL
LIVES_GLOBAL_INLINE LiVESResponseType do_info_dialog_with_expander(const char *text, const char *exp_text, LiVESList *list)
LIVES_GLOBAL_INLINE boolean paste_enough_dlg(int lframe)
LIVES_GLOBAL_INLINE void do_decoder_palette_error(void)
boolean nokeep
don't show the 'keep' button - e.g. for operations which resize frames
volatile lives_rfx_t * vrfx_update
single access for updating alarm list
int last_play_sequence
updated only when FINISHING playing a clip (either by switching or ending playback,...
boolean clip_can_reverse(int clipno)
void toggle_sets_pref(LiVESWidget *widget, livespointer prefidx)
callback to set to make a togglebutton or check_menu_item directly control a boolean pref widget is e...
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)
@ LIVES_TIME_SOURCE_SOUNDCARD
float max_decode_fps
optional info ////////////////
LiVESResponseType do_error_dialogf(const char *fmt,...)
@ LIVES_RENDER_ERROR_NONE
LiVESResponseType do_system_failed_error(const char *com, int retval, const char *addinfo, boolean can_retry, boolean trysudo)
int lives_rm(const char *file)
xprocess * create_threaded_dialog(char *text, boolean has_cancel, boolean *td_had_focus)
ticks_t orignsecs
usecs at start of playback - ditto
int achans
number of audio channels (0, 1 or 2)
void load_frame_image(int frame)
LIVES_GLOBAL_INLINE void do_mt_set_mem_error(boolean has_mt)
LIVES_GLOBAL_INLINE ticks_t lives_get_relative_ticks(ticks_t origsecs, ticks_t orignsecs)
boolean do_yuv4m_open_warning(void)
LIVES_GLOBAL_INLINE boolean lives_strncmp(const char *st1, const char *st2, size_t len)
returns FALSE if strings match
size_t lives_fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
#define MAINW_MSG_SIZE
mainw->msg bytesize
boolean foreign
for external window capture
xprocess * create_processing(const char *text)
LIVES_GLOBAL_INLINE void do_no_autolives_error(void)