Go to the documentation of this file.
30 #ifdef LIBAV_TRANSCODE
54 lives_osc_notify(msgnumber, msgstring);
91 static void cleanup_set_dir(
const char *set_name) {
97 char *lfiles, *ofile, *sdir;
100 if (lives_file_test(sdir, LIVES_FILE_TEST_IS_DIR))
105 if (lives_file_test(sdir, LIVES_FILE_TEST_IS_DIR))
125 sdir = lives_build_path(
prefs->
workdir, set_name, NULL);
141 #define lives_free(a) (mainw->is_exiting ? a : _lives_free(a))
149 if (!
mainw) _exit(0);
155 #ifdef HAVE_PULSE_AUDIO
261 #ifdef HAVE_PULSE_AUDIO
328 cfile->event_list =
cfile->event_list_back = NULL;
332 if (
cfile->laudio_drawable) {
335 cfile->laudio_drawable = NULL;
338 if (
cfile->raudio_drawable) {
341 cfile->raudio_drawable = NULL;
351 cfile->layout_map = NULL;
568 #define lives_free _lives_free
573 static void open_sel_range_activate(
int frames,
double fps) {
575 LiVESWidget *opensel_dialog;
578 mainw->
fx2_val = frames > 1000. ? 1000. : (double)frames;
584 static boolean read_file_details_generic(
const char *fname) {
586 char *tmpdir, *dirname, *com;
587 const char *prefix =
"_fsp";
589 if (dirname) tmpdir = lives_build_path(
prefs->
workdir, dirname, NULL);
592 tmpdir = lives_build_path(
prefs->
workdir, dirname, NULL);
621 LiVESWidget *chooser;
625 int resp, npieces, frames;
646 if (resp != LIVES_RESPONSE_ACCEPT) {
665 lives_snprintf(file_name,
PATH_MAX,
"%s", (tmp = lives_filename_to_utf8(fname, -1, NULL, NULL, NULL)));
679 if (!read_file_details_generic(fname)) {
699 array = lives_strsplit(
mainw->
msg,
"|", npieces);
700 frames = atoi(array[2]);
701 fps = lives_strtod(array[7], NULL);
702 lives_strfreev(array);
705 do_error_dialog(
"LiVES could not extract any video frames from this file.\nSorry.\n");
716 open_sel_range_activate(frames, fps);
721 LiVESWidget *vcdtrack_dialog;
722 int type = LIVES_POINTER_TO_INT(device_type);
806 #ifndef ALLOW_NONFREE_CODECS
823 if (lives_file_test(tmpdir, LIVES_FILE_TEST_EXISTS)) {
840 pno = LIVES_POINTER_TO_INT(user_data);
860 char **array = lives_strsplit(file,
"\n", 2);
861 lives_snprintf(file,
PATH_MAX,
"%s", array[0]);
864 lives_strfreev(array);
868 char **array = lives_strsplit(file,
"|", 3);
869 lives_snprintf(file,
PATH_MAX,
"%s", array[0]);
870 start = lives_strtod(array[1], NULL);
871 end = atoi(array[2]);
872 lives_strfreev(array);
911 char *com, *full_dfile = NULL, *tmp, *ddir, *dest = NULL;
912 char *overrdkey = NULL;
913 char *mpf = NULL, *mpt = NULL;
916 boolean keep_old_dir =
FALSE;
917 boolean forcecheck =
FALSE;
919 boolean badfile =
FALSE;
929 ddir = lives_build_path(tmpdir, req->
fname, NULL);
931 if (lives_file_test(ddir, LIVES_FILE_TEST_IS_DIR)) {
937 LiVESResponseType resp;
938 char *xdir = lives_build_path(tmpdir,
"*", NULL);
942 resp = LIVES_RESPONSE_NONE;
945 if (resp == LIVES_RESPONSE_CANCEL)
goto cleanup_ut;
947 }
while (resp == LIVES_RESPONSE_RETRY);
959 if (!manage_ds && ddir != req->
save_dir) {
961 if (mpf && *mpf && mpt && *mpt) {
981 if (manage_ds == 2) manage_ds = 3;
1019 if (!lives_file_test(to, LIVES_FILE_TEST_IS_EXECUTABLE)) {
1045 com =
lives_strdup_printf(
"%s download_clip \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" %d %d %d \"%s\" %d "
1051 : (tmp = lives_strdup(
"")));
1106 "NB: Obtaining the address by right clicking on the target itself "
1107 "can sometimes work better\n\n\nAlso, please note that downloading of 'Private' videos "
1108 "from Youtube is not possible,\nthey need to be changed to 'Unlisted' "
1109 "in order for the download to succeed.\n"), req->
URI);
1122 #ifdef ALLOW_NONFREE_CODECS
1128 if (hasnone || hasalts) {
1132 _(
"\nLiVES was unable to download the clip.\nPlease check the clip URL and make sure you have \n"
1133 "the latest youtube-dl installed.\n"));
1135 #ifdef ALLOW_NONFREE_CODECS
1137 _(
"\nLiVES was unable to download the clip in the desired format\nWould you like to try using an alternate "
1138 "format selection ?"))) {
1158 char **array = lives_strsplit(
mainw->
msg,
"|", 3);
1159 lives_snprintf(req->
vidchoice, 512,
"%s", array[1]);
1160 lives_snprintf(req->
audchoice, 512,
"%s", array[2]);
1161 lives_strfreev(array);
1170 if (manage_ds == 1) {
1182 lives_snprintf(req->
ext, 16,
"%s", req->
format);
1190 dest = lives_build_filename(req->
save_dir, full_dfile, NULL);
1193 char *from = lives_build_filename(ddir, full_dfile, NULL);
1195 if (!lives_file_test(from, LIVES_FILE_TEST_EXISTS) || (clipsize =
sget_file_size(from)) <= 0) {
1198 if (manage_ds == 2 || manage_ds == 3) {
1199 LiVESResponseType resp;
1203 resp = LIVES_RESPONSE_OK;
1207 lives_strdup_printf(
_(
"There is insufficient disk space in %s to move the downloaded clip.\n"), mpt);
1208 }
else if (manage_ds != 3) {
1210 msg =
lives_strdup_printf(
_(
"Moving the downloaded clip to\n%s\nwill bring free disk space in %s\n"
1211 "below the %s level of %s\n"), mpt);
1219 "You can either try deleting some files from %s and clicking on Retry\n"
1220 "or else click Cancel to cancel the download.\n", msg, vs, cs, mpt);
1225 }
while (resp == LIVES_RESPONSE_RETRY);
1226 if (resp == LIVES_RESPONSE_CANCEL) {
1233 LiVESResponseType resp;
1244 resp = LIVES_RESPONSE_NONE;
1245 if (!lives_file_test(dest, LIVES_FILE_TEST_EXISTS)) {
1250 }
while (resp == LIVES_RESPONSE_RETRY);
1251 if (resp == LIVES_RESPONSE_CANCEL) {
1264 _(
"\nLiVES was unable to download the clip.\nPlease check the clip URL and make sure you have \n"
1265 "the latest youtube-dl installed.\n(Note: try right-clicking on the clip itself to copy its address)\n"));
1276 boolean recheck =
FALSE;
1277 boolean tempdir_removed =
FALSE;
1291 if (!forcecheck) recheck =
TRUE;
1297 tempdir_removed =
TRUE;
1314 if (!tempdir_removed) {
1373 #ifdef HAVE_PULSE_AUDIO
1399 if (
cfile->frames == 0) {
1407 #ifdef LIBAV_TRANSCODE
1408 void on_transcode_activate(LiVESMenuItem * menuitem, livespointer user_data) {
1421 static void check_remove_layout_files(
void) {
1459 if (strlen(title) > 128) {
1461 title = (
_(
"This file"));
1463 if (acurrent) extra = (
_(
",\n - including the current layout - "));
1464 else extra = lives_strdup(
"");
1465 if (!only_current) warn =
lives_strdup_printf(
_(
"\n%s\nis used in some multitrack layouts%s.\n\nReally close it ?"),
1467 else warn =
lives_strdup_printf(
_(
"\n%s\nis used in the current layout.\n\nReally close it ?"), title);
1482 if (
cfile->changed) {
1510 boolean has_layout_map =
FALSE;
1514 has_layout_map =
TRUE;
1517 if (has_layout_map) {
1518 check_remove_layout_files();
1522 d_print(
_(
"Removing set %s since it is now empty..."));
1541 char *proj_file =
choose_file(NULL, NULL, filt, LIVES_FILE_CHOOSER_ACTION_OPEN, NULL, NULL);
1548 if (!proj_file)
return;
1569 new_set = lives_strdup(
mainw->
msg);
1570 set_dir = lives_build_filename(
prefs->
workdir, new_set, NULL);
1572 if (lives_file_test(set_dir, LIVES_FILE_TEST_IS_DIR)) {
1574 _(
"\nA set called %s already exists.\nIn order to import this project, you must rename or delete the existing set.\n"
1575 "You can do this by File|Reload Set, and giving the set name\n%s\n"
1576 "then File|Close/Save all Clips and provide a new set name or discard it.\n"
1577 "Once you have done this, you will be able to import the new project.\n"),
1589 d_print(
_(
"Importing the project %s as set %s..."), proj_file, new_set);
1642 if (response == LIVES_RESPONSE_CANCEL) {
1671 proj_file =
choose_file(NULL, def_file, filt, LIVES_FILE_CHOOSER_ACTION_SAVE, NULL, NULL);
1674 if (!proj_file)
return;
1676 lives_rm((tmp = lives_filename_from_utf8(proj_file, -1, NULL, NULL, NULL)));
1679 d_print(
_(
"Exporting project %s..."), proj_file);
1705 char theme_name[128];
1707 char *file_name, *tmp, *tmp2, *com, *fname;
1708 char *sepimg_ext, *frameimg_ext, *sepimg, *frameimg;
1709 char *themedir, *thfile, *themefile;
1721 if (response == LIVES_RESPONSE_CANCEL)
return;
1728 }
while (!
do_std_checks(U82F(theme_name),
_(
"Theme"), 64, NULL));
1733 LIVES_FILE_CHOOSER_ACTION_SAVE,
_(
"Choose a directory to export to"), NULL);
1750 themedir = lives_build_filename(
prefs->
workdir, thfile, NULL);
1751 themefile = lives_build_filename(themedir,
THEME_HEADER, NULL);
1753 #if !GTK_CHECK_VERSION(3, 0, 0)
1755 themefile = lives_build_filename(themedir,
THEME_HEADER_2, NULL);
1761 sepimg = lives_build_filename(themedir, thfile, NULL);
1765 frameimg = lives_build_filename(themedir, thfile, NULL);
1819 d_print(
_(
"Exporting theme as %s..."), file_name);
1848 (tmp = lives_filename_from_utf8(file_name, -1, NULL, NULL, NULL)),
1849 (tmp2 = lives_filename_from_utf8(themedir, -1, NULL, NULL, NULL)));
1877 char *importcheckdir, *themeheader, *themedir;
1883 theme_file =
choose_file(NULL, NULL, filt, LIVES_FILE_CHOOSER_ACTION_OPEN, NULL, NULL);
1928 d_print(
_(
"Importing theme \"%s\" from %s..."), tname, theme_file);
1941 if (lives_file_test(themedir, LIVES_FILE_TEST_IS_DIR)) {
1971 lives_snprintf(
prefs->
theme, 64,
"%s", tname);
1999 char *defname, *text;
2006 LIVES_FILE_CHOOSER_ACTION_SAVE, text, NULL);
2011 if (!file_name)
return;
2023 char *file_name, *text;
2028 LIVES_FILE_CHOOSER_ACTION_OPEN, text, NULL);
2032 if (!file_name)
return;
2096 check_remove_layout_files();
2110 msg = lives_strdup(
_(
"Deleting set..."));
2135 boolean legal_set_name;
2139 if (user_data && LIVES_POINTER_TO_INT(user_data) == 1) {
2192 LiVESResponseType resp;
2194 legal_set_name =
TRUE;
2198 if (resp == LIVES_RESPONSE_RETRY)
continue;
2200 if (resp == LIVES_RESPONSE_CANCEL) {
2211 if (resp == LIVES_RESPONSE_ACCEPT) {
2238 resp = LIVES_RESPONSE_RETRY;
2242 if (resp == LIVES_RESPONSE_RESET) {
2248 expl = lives_strdup(
"");
2250 what = (
_(
"All currently open clips"));
2251 expl = (
_(
"<b>(Note: original source material will NOT be affected !)</b>"));
2254 if (!
do_warning_dialogf(
_(
"\n\n%s will be permanently deleted from the disk.\nAre you sure ?\n\n%s"), what, expl)) {
2255 resp = LIVES_RESPONSE_ABORT;
2261 }
while (resp == LIVES_RESPONSE_ABORT || resp == LIVES_RESPONSE_RETRY);
2278 boolean bad_header =
FALSE;
2281 int ostart =
cfile->start;
2282 int oend =
cfile->end;
2284 int switch_file = current_file;
2285 int asigned, aendian;
2308 double start =
cfile->undo1_dbl;
2310 if (
cfile->old_laudio_time < start)
cfile->undo1_dbl =
cfile->old_laudio_time;
2314 cfile->undo1_dbl = start;
2318 int reset_achans = 0;
2321 if (
cfile->audio_waveform) {
2329 cfile->signed_endian =
cfile->undo_signed_endian;
2334 if (
cfile->frames == 0) {
2342 reset_achans =
cfile->undo_achans;
2347 else com =
lives_strdup_printf(
"%s insert \"%s\" \"%s\" %.8f 0. %.8f \"%s\" 2 0 0 0 0 %d %d %d %d %d -1",
2357 com =
lives_strdup_printf(
"%s insert \"%s\" \"%s\" %d %d %d \"%s\" %d %d 0 0 %.3f %d %d %d %d %d -1",
2392 if (
cfile->frames > 0) {
2393 if (
cfile->start == 0) {
2396 if (
cfile->end == 0) {
2400 if (
cfile->frame_index_back) {
2406 if (reset_achans > 0) {
2407 if (
cfile->audio_waveform) {
2414 cfile->achans = reset_achans;
2455 if (lives_file_test(audfile, LIVES_FILE_TEST_EXISTS)) {
2475 if (
cfile->frame_index_back) {
2476 int *tmpindex =
cfile->frame_index;
2478 cfile->frame_index =
cfile->frame_index_back;
2483 cfile->frame_index_back = NULL;
2487 cfile->frame_index_back = tmpindex;
2501 cfile->progress_start =
cfile->old_frames + 1;
2526 double dfps = (double)cdata->
fps;
2551 if (
cfile->insert_start ==
cfile->undo_start) {
2565 cfile->start = ostart;
2566 if (ostart >=
cfile->insert_start) {
2568 if (
cfile->start <
cfile->insert_start - 1) {
2573 if (oend >=
cfile->insert_start) {
2673 if (
cfile->audio_waveform) {
2684 cfile->signed_endian =
cfile->undo_signed_endian;
2711 double dfps = (double)cdata->
fps;
2746 double dfps = (double)cdata->
fps;
2787 if (current_file > 0) {
2794 cfile->event_list_back = NULL;
2809 int ostart =
cfile->start;
2810 int oend =
cfile->end;
2877 cfile->start = ostart;
2899 if (
cfile->audio_waveform) {
2965 int *tmpindex =
cfile->frame_index;
2966 cfile->frame_index =
cfile->frame_index_back;
2967 cfile->frame_index_back = tmpindex;
3004 d_print(
_(
"Copying frames %d to %d (with sound) to the clipboard..."),
cfile->start,
cfile->end);
3013 start =
cfile->start;
3089 lives_snprintf(
clipboard->type, 40,
"Frames");
3121 uint32_t chk_mask = 0;
3125 char *tmp = (
_(
"Cutting"));
3185 msg = (
_(
"Pulling frames from clipboard..."));
3202 cfile->progress_start =
cfile->start = cbframes > 0 ? 1 : 0;
3206 d_print(
_(
"Pasting %d frames to new clip %s..."), lframe,
cfile->name);
3210 com =
lives_strdup_printf(
"%s insert \"%s\" \"%s\" 0 1 %d \"%s\" %d 0 0 0 %.3f %d %d %d %d %d",
3217 com =
lives_strdup_printf(
"%s insert \"%s\" \"%s\" 0 1 %d \"%s\" %d 0 0 0 %.3f 0 0 0 0 0",
3234 render_audio_segment(1, &zero,
mainw->
current_file, &avels, &aseeks, 0, tc, &chvols, 1., 1., NULL);
3262 if (
cfile->audio_waveform) {
3323 double times_to_insert;
3324 double audio_stretch;
3329 boolean bad_header =
FALSE;
3330 boolean insert_silence =
FALSE;
3333 boolean cb_audio_change =
FALSE;
3334 boolean cb_video_change =
FALSE;
3336 boolean virtual_ins =
FALSE;
3337 boolean all_virtual =
FALSE;
3339 uint32_t chk_mask = 0;
3341 int where =
cfile->start - 1;
3342 int start =
cfile->start, ostart = start;
3343 int end =
cfile->end, oend = end;
3345 int hsize =
cfile->hsize;
3346 int vsize =
cfile->vsize;
3348 int cfile_signed = 0, cfile_endian = 0, clipboard_signed = 0, clipboard_endian = 0;
3351 int orig_frames =
cfile->frames;
3353 int leave_backup = 1;
3354 int remainder_frames;
3356 int cb_start = 1, cb_end =
clipboard->frames;
3375 _(
"This operation requires resizing or converting of frames.\n"
3376 "Please install 'convert' from the Image-magick package, and then restart LiVES.\n"));
3399 times_to_insert = (
cfile->laudio_time - (
cfile->frames > 0 ? (double)
cfile->end /
cfile->fps : 0.)) / ((
3406 _(
"\n\nVideo is longer than audio.\nTry selecting all frames, and then using \n"
3407 "the 'Trim Audio' function from the Audio menu."));
3423 cfile_signed != clipboard_signed || cfile_endian != clipboard_endian ||
3428 do_error_dialog(
_(
"LiVES cannot insert because the audio rates do not match.\n"
3429 "Please install 'sox', and try again."));
3438 else insert_start =
cfile->start;
3441 char *tmp = (
_(
"Insertion"));
3473 cfile->insert_start = insert_start;
3483 if (
cfile->achans > 0) insert_silence =
TRUE;
3490 cfile_signed != clipboard_signed ||
3491 cfile_endian != clipboard_endian ||
cfile->arate !=
clipboard->arate)) {
3493 cb_audio_change =
TRUE;
3498 (
double)
cfile->arate / (
double)
cfile->arps) != 1.) {
3499 if (audio_stretch < 0.) {
3516 render_audio_segment(1, &zero,
mainw->
current_file, &avels, &aseeks, 0, tc, &chvols, volx, volx, NULL);
3532 clipboard_signed, clipboard_endian,
cfile->arps,
clipboard->achans,
3533 clipboard->asampsize, clipboard_signed, clipboard_endian, audio_stretch);
3559 cfile->asampsize !=
clipboard->asampsize || cfile_signed != clipboard_signed ||
3560 cfile_endian != clipboard_endian)) {
3565 clipboard_endian,
cfile->arps,
cfile->achans,
cfile->asampsize, cfile_signed, cfile_endian);
3597 (
_(
"\n\nLiVES was unable to resample the clipboard audio. \nClipboard audio has been erased.\n"));
3611 (
_(
"\n\nLiVES was unable to resample the clipboard audio.\n"
3612 "Do you wish to continue with the insert \nusing unchanged audio ?\n"))) {
3621 char *msg = (
_(
"Pulling frames from clipboard..."));
3639 cb_video_change =
TRUE;
3646 times_to_insert = (
cfile->laudio_time -
cfile->frames > 0 ? (double)
cfile->frames /
cfile->fps : 0.) / ((
3656 if (with_sound &&
cfile->achans == 0) {
3676 remainder_frames = (int)(times_to_insert - (
double)(int)times_to_insert) *
clipboard->frames;
3679 if (virtual_ins) end = -end;
3682 d_print(
_(
"Inserting %d%s frames from the clipboard..."), remainder_frames,
3683 times_to_insert > 1. ?
" remainder" :
"");
3685 com =
lives_strdup_printf(
"%s insert \"%s\" \"%s\" %d %d %d \"%s\" %d %d %d %d %.3f %d %d %d %d %d",
3702 cfile->progress_start = 1;
3703 cfile->progress_end = remainder_frames;
3718 clipboard->frames - remainder_frames + 1);
3721 cfile->frames += remainder_frames;
3722 where += remainder_frames;
3724 cfile->insert_end += remainder_frames;
3727 cfile->start += remainder_frames;
3728 cfile->end += remainder_frames;
3738 if ((
int)times_to_insert > 1) {
3740 d_print(
_(
"Inserting %d times from the clipboard%s..."), (
int)times_to_insert, with_sound ?
3741 " (with sound)" :
"");
3742 }
else if ((
int)times_to_insert > 0) {
3744 d_print(
_(
"Inserting %d frames from the clipboard%s..."), cb_end - cb_start + 1, with_sound ?
3745 " (with sound)" :
"");
3748 if (virtual_ins) cb_end = -cb_end;
3754 com =
lives_strdup_printf(
"%s insert \"%s\" \"%s\" %d %d %d \"%s\" %d %d %d %d %.3f %d %d %d %d %d %d",
3761 if (virtual_ins) cb_end = -cb_end;
3763 cfile->progress_start = 1;
3764 cfile->progress_end = (cb_end - cb_start + 1) * (
int)times_to_insert +
cfile->frames - where;
3792 where + (cb_end - cb_start + 1) * (
int)times_to_insert,
cfile->frames,
3799 cfile->start = ostart;
3816 if (cb_video_change) {
3838 cb_start * leave_backup);
3841 cfile->frames += (cb_end - cb_start + 1) * (
int)times_to_insert;
3842 where += (cb_end - cb_start + 1) * (
int)times_to_insert;
3843 cfile->insert_end += (cb_end - cb_start + 1) * (
int)times_to_insert;
3846 cfile->start += (cb_end - cb_start + 1) * (
int)times_to_insert;
3847 cfile->end += (cb_end - cb_start + 1) * (
int)times_to_insert;
3850 if (with_sound == 1) {
3858 d_print(
_(
"Inserting %d%s frames from the clipboard..."), remainder_frames,
3859 times_to_insert > 1. ?
" remainder" :
"");
3861 if (virtual_ins) remainder_frames = -remainder_frames;
3863 com =
lives_strdup_printf(
"%s insert \"%s\" \"%s\" %d %d %d \"%s\" %d %d %d %d %3f %d %d %d %d %d",
3879 if (virtual_ins) remainder_frames = -remainder_frames;
3881 cfile->progress_start = 1;
3882 cfile->progress_end = remainder_frames;
3898 cfile->frames += remainder_frames;
3899 cfile->insert_end += remainder_frames;
3903 cfile->start += remainder_frames;
3904 cfile->end += remainder_frames;
3912 if (insert_silence) {
3916 cfile->undo_signed_endian =
cfile->signed_endian;
3932 if (
cfile->frames > 0 && orig_frames == 0) {
3933 lives_snprintf(
cfile->type, 40,
"Frames");
3944 double dfps = (double)cdata->
fps;
3965 cfile->undo1_boolean = with_sound;
3986 if (cb_video_change) {
4061 LiVESList *xlays = NULL;
4062 uint32_t ret_mask = 0, mask = *in_mask;
4063 boolean cancelled =
FALSE;
4067 if (start < 1) start = 1;
4078 (
_(
"%s will cause missing frames in some multitrack layouts.\nAre you sure you wish to continue ?\n"), operation)) {
4100 (
_(
"%s will cause missing audio in some multitrack layouts.\nAre you sure you wish to continue ?\n"), operation)) {
4122 (
_(
"%s will cause frames to shift in some multitrack layouts.\nAre you sure you wish to continue ?\n"),
4145 (
_(
"%s will cause audio to shift in some multitrack layouts.\nAre you sure you wish to continue ?\n"),
4203 *in_mask = ret_mask;
4211 boolean bad_header =
FALSE;
4213 uint32_t chk_mask = 0;
4215 int frames_cut =
cfile->end -
cfile->start + 1;
4216 int start =
cfile->start;
4217 int end =
cfile->end;
4227 (
_(
"\nDeleting all frames will close this file.\nAre you sure ?")))
close_current_file(0);
4233 char *tmp = (
_(
"Deletion"));
4283 cfile->frames -= frames_cut;
4286 cfile->undo_signed_endian =
cfile->signed_endian;
4295 if (
cfile->frames == 0) {
4296 if (
cfile->afilesize == 0l) {
4300 lives_snprintf(
cfile->type, 40,
"Audio");
4312 if (--start == 0 &&
cfile->frames > 0) {
4317 cfile->start = start;
4358 cfile->stored_layout_audio != 0.))) {
4402 if (
cfile->start == 1) {
4458 if (end >
cfile->frames) end =
cfile->frames;
4459 if (end < cfile->start) end =
cfile->start;
4500 if (
cfile->frames > 0) {
4502 cfile->pointer_time);
4505 cfile->pointer_time);
4545 if (orig_play_frame >
mainw->
play_start && orig_play_frame < mainw->play_end) {
4574 if (LIVES_POINTER_TO_INT(user_data))
play_file();
4653 #ifdef HAVE_PULSE_AUDIO
4684 #ifdef HAVE_PULSE_AUDIO
4705 d_print(
_(
"Ready to record. Use 'control' and cursor keys during playback to record your performance.\n"
4706 "(To cancel, press 'r' or click on Play|Record Performance again before you play.)\n"));
4719 livespointer user_data) {
4721 boolean start = (
boolean)LIVES_POINTER_TO_INT(user_data);
4780 LiVESList *encoder_capabilities = NULL;
4781 LiVESList *ofmt_all = NULL;
4782 LiVESList *ofmt = NULL;
4789 LiVESList *dummy_list;
4791 if (!strlen(new_encoder_name))
return;
4794 LiVESList *ofmt = NULL;
4808 lives_list_free(ofmt);
4833 (
_(
"\n\nUnable to find the 'init' method in the %s plugin.\nThe plugin may be broken or not installed correctly."),
4895 for (i = 0; i < lives_list_length(ofmt_all); i++) {
4896 if (
get_token_count((
char *)lives_list_nth_data(ofmt_all, i),
'|') > 2) {
4897 array = lives_strsplit((
char *)lives_list_nth_data(ofmt_all, i),
"|", -1);
4898 ofmt = lives_list_append(ofmt, lives_strdup(array[1]));
4899 lives_strfreev(array);
4921 lives_list_free(ofmt);
4924 array = lives_strsplit((
char *)lives_list_nth_data(ofmt_all, 0),
"|", -1);
4944 lives_strfreev(array);
4963 static int loop_lock_frame = -1;
4975 loop_lock_frame = -1;
4996 boolean dirchange_callback(LiVESAccelGroup * group, LiVESWidgetObject * obj, uint32_t keyval, LiVESXModifierType mod,
4997 livespointer area_enum) {
4998 int area = LIVES_POINTER_TO_INT(area_enum);
5000 if (!(mod & LIVES_ALT_MASK) && (mod & LIVES_CONTROL_MASK) &&
mainw->
loop_locked) {
5001 boolean do_ret =
FALSE;
5005 if (do_ret)
return TRUE;
5012 if (
cfile->play_paused) {
5055 livespointer area_enum) {
5085 loop_lock_frame = -1;
5097 else cfile->vol -= .01;
5105 boolean fps_reset_callback(LiVESAccelGroup * group, LiVESWidgetObject * obj, uint32_t keyval, LiVESXModifierType mod,
5106 livespointer area_enum) {
5112 area = LIVES_POINTER_TO_INT(area_enum);
5132 if (
cfile->play_paused) {
5150 boolean prevclip_callback(LiVESAccelGroup * group, LiVESWidgetObject * obj, uint32_t keyval, LiVESXModifierType mod,
5151 livespointer user_data) {
5152 LiVESList *list_index;
5154 int num_tried = 0, num_clips;
5168 if (user_data) type = LIVES_POINTER_TO_INT(user_data);
5185 if (num_tried++ == num_clips)
return TRUE;
5186 if (!list_index || ((list_index = list_index->prev) == NULL)) list_index = lives_list_last(
mainw->
cliplist);
5187 i = LIVES_POINTER_TO_INT(list_index->data);
5199 boolean nextclip_callback(LiVESAccelGroup * group, LiVESWidgetObject * obj, uint32_t keyval, LiVESXModifierType mod,
5200 livespointer user_data) {
5201 LiVESList *list_index;
5203 int num_tried = 0, num_clips;
5214 if (user_data) type = LIVES_POINTER_TO_INT(user_data);
5231 if (num_tried++ == num_clips)
return TRUE;
5232 if (!list_index || ((list_index = list_index->next) == NULL)) list_index =
mainw->
cliplist;
5233 i = LIVES_POINTER_TO_INT(list_index->data);
5245 static LiVESResponseType rewrite_orderfile(
boolean is_append,
boolean add,
boolean * got_new_handle) {
5248 char *cwd = lives_get_current_dir();
5250 char *dfile, *ord_entry;
5252 char new_handle[256] = {0};
5253 LiVESResponseType retval;
5254 LiVESList *cliplist;
5259 retval = LIVES_RESPONSE_NONE;
5263 ord_fd = open(ordfile_new, O_CREAT | O_WRONLY | O_APPEND,
DEF_FILE_PERMS);
5268 if (retval == LIVES_RESPONSE_CANCEL) {
5278 char *oldval, *newval;
5280 for (cliplist =
mainw->
cliplist; cliplist; cliplist = cliplist->next) {
5285 i = LIVES_POINTER_TO_INT(cliplist->data);
5298 new_dir = lives_build_path(
prefs->
workdir, new_handle, NULL);
5299 if (lives_file_test(new_dir, LIVES_FILE_TEST_IS_DIR)) {
5308 newval = lives_build_path(
prefs->
workdir, new_handle, NULL);
5324 *got_new_handle =
TRUE;
5338 if (
THREADVAR(write_failed) == ord_fd) {
5343 }
while (retval == LIVES_RESPONSE_RETRY);
5347 if (retval == LIVES_RESPONSE_CANCEL)
lives_rm(ordfile_new);
5348 else lives_cp(ordfile_new, ordfile);
5373 char *layout_map_file, *layout_map_dir, *new_clips_dir, *current_clips_dir;
5378 char *osetn, *nsetn, *dfile;
5380 boolean is_append =
FALSE;
5382 boolean got_new_handle =
FALSE;
5402 if (response == LIVES_RESPONSE_CANCEL)
return FALSE;
5410 }
else lives_snprintf(new_set_name,
MAX_SET_NAME_LEN,
"%s", (
char *)user_data);
5422 if (lives_file_test(new_clips_dir, LIVES_FILE_TEST_IS_DIR)) {
5437 if (lives_file_test(layout_map_file, LIVES_FILE_TEST_EXISTS)) {
5460 && lives_file_test(current_clips_dir, LIVES_FILE_TEST_IS_DIR)) {
5497 retval = rewrite_orderfile(is_append,
TRUE, &got_new_handle);
5499 if (retval == LIVES_RESPONSE_CANCEL) {
5513 if (lives_file_test(layout_map_file, LIVES_FILE_TEST_EXISTS)) {
5519 got_new_handle =
FALSE;
5528 if (lives_file_test(osetn, LIVES_FILE_TEST_EXISTS)) {
5539 if (lives_file_test(osetn, LIVES_FILE_TEST_IS_DIR)) {
5551 cleanup_set_dir(old_set);
5558 if (lives_file_test(layout_map_file, LIVES_FILE_TEST_EXISTS))
save_layout_map(NULL, NULL, NULL, layout_map_dir);
5560 got_new_handle =
FALSE;
5592 char *set_name = NULL;
5593 LiVESResponseType resp;
5610 if (resp == LIVES_RESPONSE_OK) {
5619 if (resp == LIVES_RESPONSE_OK) {
5640 char *setdir = lives_build_path(
prefs->
workdir, set_name, NULL);
5641 if (lives_file_test(setdir, LIVES_FILE_TEST_IS_DIR)) {
5671 char *msg, *com, *ordfile, *cwd, *clipdir, *handle = NULL;
5673 boolean added_recovery =
FALSE;
5674 boolean keep_threaded_dialog =
FALSE;
5675 boolean hadbad =
FALSE;
5677 int last_file = -1, new_file = -1;
5720 orderfile = fopen(ordfile,
"r");
5729 cwd = lives_get_current_dir();
5751 if (orderfile) fclose(orderfile);
5756 if (last_file > 0) {
5775 if (hadbad) rewrite_orderfile(
FALSE,
FALSE, NULL);
5777 d_print(
_(
"%d clips and %d layouts were recovered from set (%s).\n"),
5814 char *recovery_entry = lives_build_filename(set_name,
"*", NULL);
5817 added_recovery =
TRUE;
5824 if (!lives_file_test(clipdir, LIVES_FILE_TEST_IS_DIR)) {
5831 handle = lives_strndup(
mainw->
msg, 256);
5931 boolean isok =
TRUE;
5939 if (
cfile->frames == -1) {
5949 if (
cfile->achans > 0 &&
cfile->afilesize == 0) {
5954 last_file = new_file;
5956 if (++clipnum == 1) {
5974 if (
cfile->needs_update ||
cfile->needs_silent_update) {
5996 if (
cfile->pointer_time >
cfile->video_time)
cfile->pointer_time = 0.;
5998 if (
cfile->achans) {
5999 cfile->aseek_pos = (off64_t)((
double)(
cfile->real_pointer_time *
cfile->arate) *
cfile->achans *
6000 (
cfile->asampsize / 8));
6037 static void recover_lost_clips(LiVESList * reclist) {
6056 for (start_file =
MAX_FILES; start_file > 0; start_file--) {
6067 static boolean handle_remnants(LiVESList * recnlist,
const char *trashremdir, LiVESList **rem_list) {
6068 LiVESResponseType resp;
6069 LiVESList *list = recnlist;
6072 "These items can be deleted or moved to the directory\n%s\n"
6073 "What would you like to do with them ?"), unrecdir);
6079 LIVES_RESPONSE_CANCEL);
6096 if (resp == LIVES_RESPONSE_CANCEL)
return FALSE;
6098 if (resp == LIVES_RESPONSE_OK) {
6100 char *from, *to, *norem;
6103 if (!lives_file_test(ucdir, LIVES_FILE_TEST_IS_DIR))
return FALSE;
6107 for (; list; list = list->next) {
6108 from = lives_build_path(
prefs->
workdir, (
char *)list->data, NULL);
6109 to = lives_build_path(ucdir, (
char *)list->data, NULL);
6122 for (; list; list = list->next) {
6123 tfile = lives_build_filename(trashremdir, (
char *)list->data, NULL);
6131 fdets->
name = lives_strdup((
char *)list->data);
6132 *rem_list = lives_list_prepend(*rem_list, fdets);
6143 LiVESTextBuffer *tbuff;
6144 LiVESWidget *top_vbox;
6146 LiVESList *lists[3];
6147 LiVESList **left_list, **rec_list, **rem_list;
6150 int64_t bytes = 0, fspace = -1;
6156 char *trashdir = NULL, *full_trashdir = NULL;
6158 char *markerfile, *filedir;
6159 char *com, *msg, *tmp;
6160 char *extra = lives_strdup(
"");
6162 LiVESResponseType retval = LIVES_RESPONSE_NONE, resp;
6164 boolean gotsize =
FALSE;
6168 int i, ntok, nitems = 0;
6176 rec_list = &lists[0];
6177 rem_list = &lists[1];
6178 left_list = &lists[2];
6180 *rec_list = *rem_list = *left_list = NULL;
6186 extra = (
_(
"\n\nIf potential missing clips are detected, you will be provided "
6187 "the option to try to recover them\n"
6188 "before they are removed permanently from the disk.\n\n"
6189 "<b>You will also have an opportunity to view and revise the list of items to be removed "
6190 "before continuing.</b>\n"));
6194 _(
"LiVES will attempt to recover some disk space.\n"
6195 "Unnecessary files will be removed from %s\n"
6196 "You should <b>ONLY</b> run this if you have no other copies of LiVES running on this machine.\n"
6197 "%s\nClick OK to proceed.\n"), tmp = lives_markup_escape_text(
prefs->
workdir, -1), extra)) {
6211 d_print(
_(
"Cleaning up disk space..."));
6238 if (lives_file_test(filedir, LIVES_FILE_TEST_IS_DIR)) {
6245 retval = LIVES_RESPONSE_NONE;
6246 marker_fd = creat(markerfile, S_IRUSR | S_IWUSR);
6247 if (marker_fd < 0) {
6250 }
while (retval == LIVES_RESPONSE_RETRY);
6251 if (marker_fd >= 0) close(marker_fd);
6253 if (retval == LIVES_RESPONSE_CANCEL)
goto cleanup;
6258 full_trashdir = lives_build_path(
prefs->
workdir, trashdir, NULL);
6261 resp = LIVES_RESPONSE_NONE;
6264 if (resp == LIVES_RESPONSE_CANCEL)
goto cleanup;
6266 }
while (resp == LIVES_RESPONSE_RETRY);
6287 "si",
_(
"Analysing Disk"), 0);
6298 char **array = lives_strsplit(
mainw->
msg,
"|", 2);
6299 if (!strcmp(array[0],
"completed")) {
6300 nitems = atoi(array[1]);
6302 lives_strfreev(array);
6309 if (lives_file_test(filedir, LIVES_FILE_TEST_IS_DIR)) {
6327 LiVESWidget *button, *accb, *hbox, *label;
6329 char *remtrashdir, *op, *from, *to;
6333 char *dirname = lives_build_path(full_trashdir,
TRASH_RECOVER, NULL);
6339 dirname = lives_build_path(full_trashdir,
TRASH_REMOVE, NULL);
6345 dirname = lives_build_path(full_trashdir,
TRASH_LEAVE, NULL);
6351 *rec_list = lives_list_append(*rec_list, NULL);
6352 *rem_list = lives_list_append(*rem_list, NULL);
6353 *left_list = lives_list_append(*left_list, NULL);
6376 msg =
_(
"No items to be removed or recovered were detected.\n");
6397 LIVES_STOCK_CANCEL, nitems ? NULL :
6401 LIVES_KEY_Escape, (LiVESXModifierType)0, (LiVESAccelFlags)0);
6405 LIVES_STOCK_EDIT, nitems ?
_(
"_Check and Filter Results")
6406 :
_(
"Show Results"), LIVES_RESPONSE_BROWSE);
6421 if (retval != LIVES_RESPONSE_CANCEL) {
6422 retval =
filter_cleanup(full_trashdir, rec_list, rem_list, left_list);
6434 if (retval == LIVES_RESPONSE_CANCEL) {
6449 for (list = *rem_list; list && list->data; list = list->next) {
6452 if (orig == 1)
break;
6459 from = lives_build_path(full_trashdir,
TRASH_LEAVE, filedets->
name, NULL);
6470 for (list = *left_list; list && list->data; list = list->next) {
6472 orig = filedets->
type;
6473 if (orig == 2)
break;
6474 to = lives_build_path(full_trashdir,
TRASH_LEAVE, filedets->
name, NULL);
6480 from = lives_build_path(full_trashdir,
TRASH_REMOVE, filedets->
name, NULL);
6493 if (list && list->data) {
6496 LiVESList *recnlist = NULL;
6498 for (; list && list->data; list = list->next) {
6500 if (*filedets->
name)
6501 recnlist = lives_list_prepend(recnlist, lives_strdup(filedets->
name));
6503 recnlist = lives_list_reverse(recnlist);
6509 recover_lost_clips(recnlist);
6516 int clipno = LIVES_POINTER_TO_INT(list->data);
6517 LiVESList *list2 = recnlist;
6518 for (; list2; list2 = list2->next) {
6520 if (list2->prev) list2->prev->next = list2->next;
6521 if (list2->next) list2->next->prev = list2->prev;
6522 if (recnlist == list2) recnlist = list2->next;
6523 list2->next = list2->prev = NULL;
6524 lives_list_free(list2);
6541 remtrashdir = lives_build_path(full_trashdir,
TRASH_REMOVE, NULL);
6545 bresp = handle_remnants(recnlist, remtrashdir, rem_list);
6550 for (list = recnlist; list; list = list->next) {
6552 fdets->
name = lives_strdup((
char *)list->data);
6553 *left_list = lives_list_prepend(*left_list, fdets);
6562 if (list && list->data) {
6564 else op = lives_strdup(
"delete");
6566 remtrashdir = lives_build_path(trashdir,
TRASH_REMOVE, NULL);
6571 "si",
_(
"Clearing Disk"), 0);
6599 if (full_trashdir) {
6609 if (bytes < 0) bytes = 0;
6612 if (gotsize && retval != LIVES_RESPONSE_CANCEL && !
THREADVAR(com_failed) && fspace > -1) {
6613 LiVESWidget *dialog, *tview;
6626 if (list && list->data) {
6638 if (list && list->data) {
6639 char *text = NULL, *item;
6641 "if desired.\nClick for details:\n"));
6648 for (; list && list->data; list = list->next) {
6661 LIVES_BOX(top_vbox), tview);
6707 LiVESWidget *dialog;
6714 }
while (response == LIVES_RESPONSE_RETRY);
6725 char *msg = (
_(
"Pre-decoding all frames in this clip..."));
6743 boolean bad_header =
FALSE;
6752 i = LIVES_POINTER_TO_INT(clip_list->data);
6764 }
else clip_list = clip_list->next;
6780 char *sigs, *ends, *tmp;
6786 if (
cfile->frames > 0) {
6788 lives_snprintf(buff, 512,
_(
"External: %s\nInternal: %s (%d bpp) / %s"),
cfile->type,
6798 const char *decname = dpsys->
name;
6803 lives_snprintf(buff, 512,
" %.3f%s",
cfile->fps,
cfile->ratio_fps ?
"..." :
"");
6807 lives_snprintf(buff, 512,
" %dx%d",
cfile->hsize,
cfile->vsize);
6810 if ((
cfile->opening && !
cfile->opening_audio &&
cfile->frames == 0) ||
cfile->frames == 123456789) {
6811 lives_snprintf(buff, 512,
"%s",
_(
" Opening..."));
6813 lives_snprintf(buff, 512,
" %d",
cfile->frames);
6815 if (
cfile->frame_index) {
6828 if ((
cfile->opening && !
cfile->opening_audio &&
cfile->frames == 0) ||
cfile->frames == 123456789) {
6829 lives_snprintf(buff, 512,
"%s",
_(
" Opening..."));
6831 lives_snprintf(buff, 512,
_(
" %.2f sec."),
cfile->video_time);
6835 if (
cfile->f_size > 0l) {
6837 lives_snprintf(buff, 512,
" %s", file_ds);
6839 }
else lives_snprintf(buff, 512,
"%s",
_(
" Unknown"));
6843 if (
cfile->achans > 0) {
6844 if (
cfile->opening) {
6845 lives_snprintf(buff, 512,
"%s",
_(
" Opening..."));
6847 lives_snprintf(buff, 512,
_(
" %.2f sec."),
cfile->laudio_time);
6852 else sigs = (
_(
"signed"));
6855 else ends = (
_(
"little-endian"));
6857 lives_snprintf(buff, 512,
_(
" %d Hz %d bit\n%s %s"),
cfile->arate,
cfile->asampsize, sigs, ends);
6864 if (
cfile->achans > 1) {
6866 else sigs = (
_(
"signed"));
6869 else ends = (
_(
"little-endian"));
6871 lives_snprintf(buff, 512,
_(
" %d Hz %d bit\n%s %s"),
cfile->arate,
cfile->asampsize, sigs, ends);
6877 if (
cfile->opening) {
6878 lives_snprintf(buff, 512,
"%s",
_(
" Opening..."));
6880 lives_snprintf(buff, 512,
_(
" %.2f sec."),
cfile->raudio_time);
6980 #if GTK_CHECK_VERSION(2, 14, 0)
6982 "This program is free software; you can redistribute it and/or modify\n"
6983 "it under the terms of the GNU General Public License as published by\n"
6984 "the Free Software Foundation; either version 3 of the License, or\n"
6985 "(at your option) any later version.\n"
6987 "This program is distributed in the hope that it will be useful,\n"
6988 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
6989 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
6990 "GNU General Public License for more details.\n"
6992 "You should have received a copy of the GNU General Public License\n"
6993 "along with this program; if not, write to the Free Software\n"
6994 "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA.\n"));
6996 char *comments = (
_(
"A video editor and VJ program."));
6997 char *title = (
_(
"About LiVES"));
6999 char *translator_credits = (
_(
"translator_credits"));
7001 #if GTK_CHECK_VERSION(3, 0, 0)
7004 gtk_about_dialog_set_url_hook(
activate_url, NULL, NULL);
7005 gtk_about_dialog_set_email_hook(
activate_url, NULL, NULL);
7010 "name", PACKAGE_NAME,
7011 "version", LiVES_VERSION,
7012 "comments", comments,
7017 "translator_credits", translator_credits,
7018 #
if GTK_CHECK_VERSION(3, 0, 0)
7020 "license-type", GTK_LICENSE_GPL_3_0,
7033 "(c) G. Finch (salsaman) %s\n\n"
7034 "Released under the GPL 3 or later (http://www.gnu.org/licenses/gpl.txt)\n"
7035 "LiVES is distributed WITHOUT WARRANTY\n\n"
7036 "Contact the author at:\n%s\n"
7074 static char *fsp_ltext;
7075 static char *fsp_info_file;
7076 static char *file_open_params;
7078 static boolean fs_preview_idle(
void *data) {
7079 LiVESWidget *widget = (LiVESWidget *)data;
7083 == LIVES_RESPONSE_NONE) {
7089 if (LIVES_IS_BUTTON(widget))
7102 if (LIVES_IS_WIDGET(widget))
7110 double start_time = 0.;
7116 int preview_frames = 0;
7117 int preview_type = LIVES_POINTER_TO_INT(user_data);
7118 int height = 0, width = 0;
7119 int fwidth = -1, fheight = -1;
7120 int owidth, oheight, npieces, border = 0;
7123 char *thm_dir = NULL;
7128 file_open_params = NULL;
7148 lives_snprintf(file_name,
PATH_MAX,
"%s",
7149 (tmp = lives_filename_to_utf8((tmp2
7151 -1, NULL, NULL, NULL)));
7157 if (!read_file_details_generic(file_name))
return;
7164 array = lives_strsplit(
mainw->
msg,
"|", npieces);
7165 type = lives_strdup(array[3]);
7168 width = atoi(array[4]);
7169 height = atoi(array[5]);
7171 lives_strfreev(array);
7188 fheight,
prefs->
image_ext, (tmp = lives_filename_from_utf8(file_name, -1, NULL, NULL, NULL)));
7201 array = lives_strsplit(
mainw->
msg,
"|", 3);
7202 width = atoi(array[1]);
7203 height = atoi(array[2]);
7204 lives_strfreev(array);
7205 }
else height = width = 0;
7211 if (height > 0 && width > 0) {
7214 LiVESError *
error = NULL;
7216 char *thumb = lives_build_filename(
prefs->
workdir, thm_dir, thumbfile, NULL);
7222 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(
mainw->
fs_playimg),
"pixbuf", pixbuf);
7228 width = (width >> 1) << 1;
7229 height = (height >> 1) << 1;
7231 if (width > owidth || height > oheight) {
7236 if (width < 4 || height < 4) {
7243 (
float)height / (
float)fheight);
7244 border = MIN(fwidth - width, fheight - height);
7249 if (LIVES_IS_XWINDOW(xwin)) {
7260 lives_error_free(
error);
7283 msg = (
_(
"\n\nYou need to install mplayer, mplayer2 or mpv to be able to preview this file.\n"));
7285 msg = (
_(
"\n\nYou need to install mplayer, mplayer2, mpv or imageMagick to be able to preview this file.\n"));
7306 if (!strcmp(type,
"Audio")) {
7307 preview_frames = -1;
7309 if (height == 0 || width == 0) {
7322 width = (width >> 1) << 1;
7323 height = (height >> 1) << 1;
7325 if (width > owidth || height > oheight) {
7330 if (width < 4 || height < 4) {
7338 (
float)height / (
float)fheight);
7339 border = MIN(fwidth - width, fheight - height);
7343 }
else preview_frames = -1;
7379 if (file_open_params) {
7381 xwin, width, height, start_time, preview_frames, (
int)(
prefs->
volume * 100.),
7382 (tmp = lives_filename_from_utf8(file_name, -1, NULL, NULL, NULL)), file_open_params);
7386 xwin, width, height, start_time, preview_frames, (
int)(
prefs->
volume * 100.),
7387 (tmp = lives_filename_from_utf8(file_name, -1, NULL, NULL, NULL)));
7404 tmp = (
_(
"\nStop Preview\n"));
7414 lives_idle_add_simple(fs_preview_idle, (livespointer)widget);
7420 LiVESWidget *chooser;
7421 LiVESResponseType resp;
7450 LiVESSList *ofnames;
7457 if (!fnames)
return;
7459 if (!fnames->data) {
7480 lives_snprintf(file_name,
PATH_MAX,
"%s", (
char *)fnames->data);
7483 fnames = fnames->next;
7486 lives_slist_free(ofnames);
7504 GtkSelectionData * data, uint32_t info, uint32_t time, livespointer user_data) {
7505 GSList *fnames = NULL;
7506 #if GTK_CHECK_VERSION(3, 0, 0)
7507 char *filelist = (
char *)gtk_selection_data_get_data(data);
7509 char *filelist = (
char *)data->data;
7511 char *nfilelist, **array;
7525 nfilelist =
subst(filelist,
"file://",
"");
7528 array = lives_strsplit(nfilelist,
"\n", nfiles);
7531 for (i = 0; i < nfiles; i++) {
7532 fnames = lives_slist_append(fnames, array[i]);
7541 gtk_drag_finish(dcon,
TRUE,
FALSE, time);
7548 boolean needs_idlefunc;
7572 static boolean singleton =
FALSE;
7575 if (singleton)
return;
7581 LiVESPixbuf *pixbuf = NULL;
7582 pixbuf = (LiVESPixbuf *)lives_widget_object_get_data(LIVES_WIDGET_OBJECT(
mainw->
fs_playarea),
"pixbuf");
7584 lives_widget_object_set_data(LIVES_WIDGET_OBJECT(
mainw->
fs_playarea),
"pixbuf", NULL);
7616 LiVESTextView *textview = (LiVESTextView *)user_data;
7621 boolean needs_idlefunc;
7634 if ((fd = creat(
save_file, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) == -1) {
7636 if ((fd = creat(
save_file, S_IRUSR | S_IWUSR)) == -1) {
7685 boolean needs_idlefunc;
7705 uint32_t keep_frames = 0;
7707 boolean killprocs =
FALSE;
7785 }
else keep_frames =
cfile->frames + 1;
7814 cfile->undo_end = keep_frames - 1;
7852 static void _on_full_screen_activate(LiVESMenuItem * menuitem, livespointer user_data) {
7882 if (
cfile->frames == 1 ||
cfile->play_paused) {
7934 if (
cfile->frames == 1 ||
cfile->play_paused) {
8279 boolean *ppref = (
boolean *)user_data;
8348 #ifdef HAVE_PULSE_AUDIO
8368 #ifdef HAVE_PULSE_AUDIO
8392 boolean mute_audio_callback(LiVESAccelGroup * group, LiVESWidgetObject * obj, uint32_t keyval, LiVESXModifierType mod,
8393 livespointer user_data) {
8422 #ifdef HAVE_PULSE_AUDIO
8448 #ifdef HAVE_PULSE_AUDIO
8472 #ifdef HAVE_PULSE_AUDIO
8480 #define GEN_SPB_LINK(n, bit) case n: mainw->fx##n##_##bit = \
8481 lives_spin_button_get_value(LIVES_SPIN_BUTTON(spinbutton)); break
8482 #define GEN_SPB_LINK_I(n, bit) case n: mainw->fx##n##_##bit = \
8483 lives_spin_button_get_value_as_int(LIVES_SPIN_BUTTON(spinbutton)); break
8487 switch (LIVES_POINTER_TO_INT(user_data)) {
8498 switch (LIVES_POINTER_TO_INT(user_data)) {
8509 switch (LIVES_POINTER_TO_INT(user_data)) {
8520 switch (LIVES_POINTER_TO_INT(user_data)) {
8536 char *msg = (
_(
"Pulling frames from clipboard..."));
8548 d_print(
_(
"Reversing clipboard..."));
8557 cfile->progress_start = 1;
8580 char *subfname, *isubfname;
8592 ttl = (
_(
"Load Subtitles"));
8596 }
else subfile =
choose_file(NULL, NULL, filt, LIVES_FILE_CHOOSER_ACTION_OPEN, ttl, NULL);
8599 if (!subfile)
return;
8601 lives_snprintf(filename, 512,
"%s", subfile);
8606 lfile_name = lives_filename_from_utf8(isubfname, -1, NULL, NULL, NULL);
8608 if (lives_file_test(lfile_name, LIVES_FILE_TEST_EXISTS)) {
8615 lfile_name = lives_filename_from_utf8(isubfname, -1, NULL, NULL, NULL);
8617 if (lives_file_test(isubfname, LIVES_FILE_TEST_EXISTS)) {
8651 d_print(
_(
"Loaded subtitle file: %s\n"), isubfname);
8672 subfile =
choose_file(xfname, xfname2, NULL, LIVES_FILE_CHOOSER_ACTION_SAVE, NULL, NULL);
8674 if (!subfile)
return;
8688 switch (
cfile->subt->type) {
8711 d_print(
_(
"Subtitles were erased.\n"));
8717 LiVESWidget *chooser;
8719 LiVESResponseType resp;
8753 uint32_t chk_mask = 0;
8758 int asigned, aendian;
8760 boolean bad_header =
FALSE;
8761 boolean preparse =
FALSE;
8762 boolean gotit =
FALSE;
8768 tmp = (
_(
"Loading new audio"));
8782 cfile->undo_signed_endian =
cfile->signed_endian;
8785 oundo_start =
cfile->undo_start;
8786 oundo_end =
cfile->undo_end;
8790 lives_snprintf(file_name,
PATH_MAX,
"%s", (tmp = lives_filename_to_utf8(filename, -1, NULL, NULL, NULL)));
8793 }
else lives_snprintf(file_name,
PATH_MAX,
"%s", (
char *)user_data);
8803 if (strlen(a_type)) {
8805 for (i = 0; filt[i]; i++) {
8806 if (!lives_ascii_strcasecmp(a_type, filt[i] + 2)) gotit =
TRUE;
8812 (tmp = lives_filename_from_utf8(file_name, -1, NULL, NULL, NULL)));
8831 array = lives_strsplit(
mainw->
msg,
"|", -1);
8832 cfile->arate = atoi(array[9]);
8833 cfile->achans = atoi(array[10]);
8834 cfile->asampsize = atoi(array[11]);
8836 lives_strfreev(array);
8854 d_print(
_(
"Opening audio %s, type %s..."), file_name, a_type);
8865 cfile->signed_endian =
cfile->undo_signed_endian;
8867 cfile->undo_start = oundo_start;
8868 cfile->undo_end = oundo_end;
8881 cfile->undo_start = 1;
8901 cfile->signed_endian =
cfile->undo_signed_endian;
8903 cfile->undo_start = oundo_start;
8904 cfile->undo_end = oundo_end;
8918 cfile->afilesize = 0;
8921 array = lives_strsplit(
mainw->
msg,
"|", 7);
8922 cfile->arate = atoi(array[1]);
8923 cfile->achans = atoi(array[2]);
8924 cfile->asampsize = atoi(array[3]);
8926 cfile->afilesize = atol(array[6]);
8927 lives_strfreev(array);
8936 if (
cfile->afilesize == 0) {
8953 cfile->signed_endian =
cfile->undo_signed_endian;
8955 cfile->undo_start = oundo_start;
8956 cfile->undo_end = oundo_end;
8970 d_print(
P_(
"New audio: %d Hz %d channel %d bps\n",
"New audio: %d Hz %d channels %d bps\n",
8986 cfile->signed_endian =
cfile->undo_signed_endian;
8988 cfile->undo_start = oundo_start;
8989 cfile->undo_end = oundo_end;
9045 LiVESWidget *cdtrack_dialog;
9083 boolean was_new =
FALSE;
9085 uint32_t chk_mask = 0;
9088 int asigned, endian;
9090 boolean bad_header =
FALSE;
9097 char *tmp = (
_(
"Loading new audio"));
9126 cfile->undo_signed_endian =
cfile->signed_endian;
9140 cfile->signed_endian =
cfile->undo_signed_endian;
9167 cfile->signed_endian =
cfile->undo_signed_endian;
9187 d_print(
_(
"Error loading CD track\n"));
9204 cfile->signed_endian =
cfile->undo_signed_endian;
9216 array = lives_strsplit(
mainw->
msg,
"|", 5);
9217 cfile->arate = atoi(array[1]);
9218 cfile->achans = atoi(array[2]);
9219 cfile->asampsize = atoi(array[3]);
9220 cfile->afilesize = strtol(array[4], NULL, 10);
9221 lives_strfreev(array);
9229 if (
cfile->afilesize == 0l) {
9230 d_print(
_(
"Error loading CD track\n"));
9246 cfile->signed_endian =
cfile->undo_signed_endian;
9272 cfile->signed_endian =
cfile->undo_signed_endian;
9299 d_print(
P_(
"New audio: %d Hz %d channel %d bps\n",
"New audio: %d Hz %d channels %d bps\n",
cfile->achans),
9331 open_sel_range_activate(0, 0.);
9338 LiVESWidget *button;
9341 uint32_t chk_mask = 0;
9345 if (!menuitem && user_data) {
9347 chk_mask = (uint32_t)LIVES_POINTER_TO_INT(user_data);
9362 lives_signal_sync_connect(LIVES_GUI_OBJECT(button), LIVES_WIDGET_CLICKED_SIGNAL,
9370 LIVES_RESPONSE_CANCEL);
9374 LIVES_INT_TO_POINTER(
FALSE));
9379 _(
"_Delete affected layouts"), LIVES_RESPONSE_CANCEL);
9410 boolean cancelled =
FALSE;
9419 goto autolives_fail;
9426 goto autolives_fail;
9431 goto autolives_fail;
9440 goto autolives_fail;
9446 goto autolives_fail;
9451 goto autolives_fail;
9457 char *inst = (
char *)typep;
9461 goto autolives_fail;
9467 goto autolives_fail;
9474 else apb = lives_strdup(
"");
9476 else mute = lives_strdup(
"");
9485 debug = lives_strdup(
" -debug");
9487 debug = lives_strdup(
"");
9523 boolean bad_header =
FALSE;
9529 }
else lives_snprintf(title, 256,
"%s", (
char *)user_data);
9531 if (!(strlen(title)))
return;
9540 lives_snprintf(
cfile->name, 256,
"%s", title);
9551 if (menuitem &&
mainw->
toy_type == LIVES_POINTER_TO_INT(user_data)) {
9631 static volatile boolean updated =
FALSE;
9633 if (updated)
return;
9714 if (
cfile->achans > 0) {
9716 if (audframe <= cfile->frames && audframe >=
cfile->start && audframe !=
cfile->end)
9725 boolean rdrw_bars =
TRUE;
9726 static volatile boolean updated =
FALSE;
9728 if (updated)
return;
9742 ostart =
cfile->start;
9743 cfile->start = start;
9747 int new_end =
cfile->end +
cfile->start - ostart;
9749 if (new_end >
cfile->frames) {
9754 if (
cfile->start < ostart &&
cfile->fps > 0.) {
9777 if (rdrw_bars &&
cfile->fps > 0.) {
9778 if (
cfile->start < ostart)
9791 boolean rdrw_bars =
TRUE;
9792 static volatile boolean updated =
FALSE;
9794 if (updated)
return;
9813 int new_start =
cfile->start +
cfile->end - oend;
9815 if (new_start < 1) {
9844 if (rdrw_bars &&
cfile->fps > 0.) {
9845 if (
cfile->end > oend)
9856 boolean all_expose(LiVESWidget * widget, lives_painter_t *cr, livespointer psurf) {
9857 lives_painter_surface_t **surf = (lives_painter_surface_t **)psurf;
9895 frame =
cfile->frames;
9897 if (
cfile->frames > 0 && (which == 0 || which == 1)) {
9919 #ifdef HAVE_PULSE_AUDIO
9931 if (
cfile->achans > 0) {
9941 if (
cfile->achans > 1 && (which == 0 || which == 3)) {
9958 boolean all_expose_pb(LiVESWidget * widget, lives_painter_t *cr, livespointer psurf) {
9976 boolean config_vid_draw(LiVESWidget * widget, LiVESXEventConfigure * event, livespointer user_data) {
9992 boolean config_laud_draw(LiVESWidget * widget, LiVESXEventConfigure * event, livespointer user_data) {
9995 lives_painter_surface_t *laudio_drawable;
10001 if (laudio_drawable) {
10018 boolean config_raud_draw(LiVESWidget * widget, LiVESXEventConfigure * event, livespointer user_data) {
10021 lives_painter_surface_t *raudio_drawable;
10027 if (raudio_drawable) {
10035 boolean config_event2(LiVESWidget * widget, LiVESXEventConfigure * event, livespointer user_data) {
10042 boolean all_config(LiVESWidget * widget, LiVESXEventConfigure * event, livespointer ppsurf) {
10043 lives_painter_surface_t **psurf = (lives_painter_surface_t **)ppsurf;
10046 if (!psurf)
return FALSE;
10050 #ifdef USE_SPECIAL_BUTTONS
10051 if (LIVES_IS_DRAWING_AREA(widget)) {
10054 sbutt_render(parent, 0, NULL);
10090 boolean config_event(LiVESWidget * widget, LiVESXEventConfigure * event, livespointer user_data) {
10096 int scr_width, scr_height;
10099 if (event->width != scr_width || event->height != scr_height) {
10104 g_printerr(
"VALLS %d %d %d %d %d %d\n", event->width, event->height, scr_width, scr_height,
10124 const char *stockim;
10133 if (!
cfile->opening) {
10141 if (!
cfile->opening) {
10157 if (!
cfile->nokeep) {
10160 if (!
cfile->opening) {
10161 ltext = (
_(
"Keep"));
10163 ltext = (
_(
"Enough"));
10165 stockim = LIVES_STOCK_KEEP;
10170 (
_(
"\nPaused\n(click %s to keep what you have and stop)\n(click "
10171 "Resume to continue processing)"), ltext)));
10183 if (
cfile->achans > 1) {
10194 #ifdef HAVE_PULSE_AUDIO
10206 stockim = LIVES_STOCK_CANCEL;
10216 #ifdef HAVE_PULSE_AUDIO
10231 #ifdef HAVE_PULSE_AUDIO
10257 static volatile boolean in_preview_func =
FALSE;
10259 boolean resume_after;
10262 int ostart =
cfile->start;
10263 int oend =
cfile->end;
10269 if (in_preview_func) {
10281 in_preview_func =
TRUE;
10295 if (
cfile->opening) {
10296 if (!
cfile->opening_only_audio) {
10311 resume_after =
FALSE;
10315 if (
cfile->opening) {
10346 if (
cfile->achans > 1) {
10361 resume_after =
TRUE;
10372 if (!
cfile->opening) {
10378 if (
cfile->opening ||
cfile->opening_only_audio) {
10386 if (ointernal_messaging) {
10398 cfile->next_event = NULL;
10418 cfile->start = ostart;
10435 if (!
cfile->opening) {
10456 if (ointernal_messaging) {
10482 in_preview_func =
FALSE;
10489 "Enabling VJ restart will have the following effects:\n"
10490 "\n\n - On startup, audio source will be set to external. "
10491 "Clips willl reload without audio (although the audio files will remain on the disk).\n"
10492 "Additionally, when playing external audio, LiVES uses the system clock for frame timings "
10493 "(rather than the soundcard) which may allow for slightly smoother playback.\n"
10494 "\n - only the lightest of checks will be done when reloading clips (unless a problem is detected "
10495 "during the reload.)\n\n"
10496 "Startup will be almost instantaneous, however in the rare occurence of corruption to "
10497 "a clip audio file, this will not be detected, as the file will not be loaded."
10498 "\nOn startup, LiVES will grab the keyboard and screen focus if it can,"
10499 "\n - Shutdown will be slightly more rapid as no cleanup of the working directory will be attempted"
10500 "\n - Rendered effects will not be loaded, which will further reduce the startup time. "
10501 "(Realtime effects will still be loaded as usual)\n"
10502 "\n - Any crash recovery files will be auto reloaded "
10503 "making it convenient to terminate LiVES using ctrl-c or simply shutting down the machine\n"
10504 "\n - Continuous looping of video will be enabled automatically on startup"),
10531 if (!user_data && ((!
cfile->play_paused &&
cfile->pb_fps == new_fps) || (
cfile->play_paused && new_fps == 0.))) {
10538 if (new_fps !=
cfile->pb_fps && fabs(new_fps) > .001 && !
cfile->play_paused) {
10543 delta_ticks = (
ticks_t)((
double)delta_ticks + fabs(
cfile->pb_fps / new_fps));
10548 cfile->pb_fps = new_fps;
10567 #ifdef HAVE_PULSE_AUDIO
10587 if (
cfile->play_paused && new_fps != 0.) {
10588 cfile->freeze_fps = new_fps;
10594 if (
cfile->pb_fps == 0. && !
cfile->play_paused) {
10602 boolean on_mouse_scroll(LiVESWidget * widget, LiVESXEventScroll * event, livespointer user_data) {
10603 lives_mt *mt = (lives_mt *)user_data;
10604 LiVESXModifierType kstate = (LiVESXModifierType)event->state;
10610 if ((kstate & LIVES_DEFAULT_MOD_MASK) == LIVES_CONTROL_MASK) {
10622 mt->display, NULL, NULL);
10637 if ((kstate & LIVES_DEFAULT_MOD_MASK) == (LIVES_CONTROL_MASK | LIVES_SHIFT_MASK)) type = 2;
10638 else if ((kstate & LIVES_DEFAULT_MOD_MASK) == LIVES_CONTROL_MASK) type = 0;
10641 LIVES_INT_TO_POINTER(type));
10643 LIVES_INT_TO_POINTER(type));
10654 int x, sel_current;
10788 #ifdef ENABLE_GIW_3
10789 void on_hrule_value_changed(LiVESWidget * widget, livespointer user_data) {
10795 if (pfile->
frames > 0) {
10797 giw_timeline_get_value(GIW_TIMELINE(widget)));
10806 if (
cfile->pointer_time > 0.) {
10827 boolean on_hrule_update(LiVESWidget * widget, LiVESXEventMotion * event, livespointer user_data) {
10828 LiVESXModifierType modmask;
10829 LiVESXDevice *device;
10838 if (!(modmask & LIVES_BUTTON1_MASK))
return TRUE;
10849 boolean on_hrule_reset(LiVESWidget * widget, LiVESXEventButton * event, livespointer user_data) {
10862 if (
cfile->frames > 0) {
10865 if (
cfile->pointer_time > 0.) {
10884 boolean on_hrule_set(LiVESWidget * widget, LiVESXEventButton * event, livespointer user_data) {
10902 g_print(
"HRSET\n");
10909 boolean frame_context(LiVESWidget * widget, LiVESXEventButton * event, livespointer which) {
10912 LiVESWidget *save_frame_as;
10924 if (event->button != 3)
return FALSE;
10927 switch (LIVES_POINTER_TO_INT(which)) {
10930 frame =
cfile->start;
10934 frame =
cfile->end;
10953 lives_signal_sync_connect(LIVES_GUI_OBJECT(save_frame_as), LIVES_WIDGET_ACTIVATE_SIGNAL,
10955 LIVES_INT_TO_POINTER(frame));
10972 if (
cfile->next_event)
return;
10982 double change = 1., new_fps;
10991 if (
cfile->next_event)
return;
10996 type = LIVES_POINTER_TO_INT(user_data);
11006 if (button) change *= 4.;
11007 if (sfile->
pb_fps == 0.)
return;
11008 if (sfile->
pb_fps > 0.) {
11010 new_fps = sfile->
pb_fps - change;
11012 else sfile->
pb_fps = new_fps;
11016 else sfile->
pb_fps -= change;
11025 if (
cfile->next_event)
return;
11035 double change = 1.;
11043 if (
cfile->next_event)
return;
11048 type = LIVES_POINTER_TO_INT(user_data);
11056 sfile->
pb_fps = -.00000001;
11063 if (button) change *= 4.;
11065 if (sfile->
pb_fps >= 0.) {
11087 if (
cfile->next_event)
return;
11090 if (
cfile->real_pointer_time > 0.) {
11091 cfile->real_pointer_time--;
11092 if (
cfile->real_pointer_time < 0.)
cfile->real_pointer_time = 0.;
11099 type = LIVES_POINTER_TO_INT(user_data);
11114 if (
cfile->next_event)
return;
11118 cfile->real_pointer_time++;
11126 type = LIVES_POINTER_TO_INT(user_data);
11135 boolean freeze_callback(LiVESAccelGroup * group, LiVESWidgetObject * obj, uint32_t keyval, LiVESXModifierType mod,
11136 livespointer user_data) {
11137 weed_timecode_t tc;
11138 static boolean norecurse =
FALSE;
11140 if (norecurse)
return TRUE;
11153 if (
cfile->play_paused) {
11176 cfile->pb_fps = 0.;
11194 if (
cfile->play_paused) {
11201 #ifdef ENABLE_JACK_TRANSPORT
11202 if (
cfile->play_paused) jack_pb_stop();
11203 else jack_pb_start(-1.);
11207 #ifdef HAVE_PULSE_AUDIO
11214 if (
cfile->play_paused) {
11231 boolean nervous_callback(LiVESAccelGroup * group, LiVESWidgetObject * obj, uint32_t keyval, LiVESXModifierType mod,
11232 livespointer clip_number) {
11248 boolean aud_lock_callback(LiVESAccelGroup * group, LiVESWidgetObject * obj, uint32_t keyval, LiVESXModifierType mod,
11249 livespointer statep) {
11250 boolean state = LIVES_POINTER_TO_INT(statep);
11274 char *palname = NULL;
11286 weed_plant_t *inst = (weed_plant_t *)sfile->
ext_src;
11290 int clamping, subspace, pal;
11299 lives_vdev_t *ldev = (lives_vdev_t *)sfile->
ext_src;
11306 if (!palname) palname = lives_strdup(
"??????");
11311 boolean show_sync_callback(LiVESAccelGroup * group, LiVESWidgetObject * obj, uint32_t keyval, LiVESXModifierType mod,
11312 livespointer keybd) {
11326 #ifdef USE_LIVES_MFUNCS
11344 boolean storeclip_callback(LiVESAccelGroup * group, LiVESWidgetObject * obj, uint32_t keyval, LiVESXModifierType mod,
11345 livespointer clip_number) {
11347 int clip = LIVES_POINTER_TO_INT(clip_number) - 1;
11357 for (i = 0; i <
FN_KEYS - 1; i++) {
11402 double rec_end_time = -1.;
11406 LiVESResponseType response;
11409 #if !GTK_CHECK_VERSION(3, 0, 0)
11410 #ifndef GDK_WINDOWING_X11
11412 _(
"\n\nThis function will only work with X11.\nPlease send a patch to get it working on other platforms.\n\n"));
11418 do_error_dialog(
_(
"\n\nYou must install \"xwininfo\" before you can use this feature\n\n"));
11444 if (response != LIVES_RESPONSE_OK) {
11490 if (rec_end_time == 0.) {
11508 _(
"Capture an External Window:\n\nClick on 'OK', then click on any desktop window to select it\n"
11509 "Click 'Cancel' to cancel\n\n")))) {
11514 d_print(
_(
"External window was released.\n"));
11557 "When a blank LiVES window appears behind it, "
11558 "then it is being recorded.\n\n"
11559 "<b><big>To end recording, switch focus to the LiVES window,\n"
11560 "and press the 'q' key.</big></b>\n"));
11576 array = lives_strsplit(
mainw->
msg,
"|", -1);
11580 #if GTK_CHECK_VERSION(3, 0, 0) || defined GUI_QT
11590 lives_strfreev(array);
11596 d_print(
_(
"\nExternal window captured. Width=%d, height=%d, bpp=%d. *Do not resize*\n\n"
11597 "Stop or 'q' to finish.\n(Default of %.3f frames per second will be used.)\n"),
11638 char *capfile = lives_build_filename(
prefs->
workdir, capfilename, NULL);
11650 if (!retval) exit(2);
11657 capture_fd = creat(capfile, S_IRUSR | S_IWUSR);
11658 if (capture_fd < 0) {
11667 lives_snprintf(buf, 32,
"%d",
cfile->frames);
11684 LiVESList *ofmt_all = NULL;
11688 const char *new_fmt;
11703 for (i = 0; i < lives_list_length(ofmt_all); i++) {
11704 if (
get_token_count((
char *)lives_list_nth_data(ofmt_all, i),
'|') > 2) {
11705 array = lives_strsplit((
char *)lives_list_nth_data(ofmt_all, i),
"|", -1);
11707 if (!strcmp(array[1], new_fmt)) {
11723 lives_strfreev(array);
11726 lives_strfreev(array);
11753 char *filename, *file_name;
11758 int nrate =
cfile->arps;
11761 if (
cfile->end > 0 && !LIVES_POINTER_TO_INT(user_data)) {
11763 filt, LIVES_FILE_CHOOSER_ACTION_SAVE,
_(
"Export Selected Audio as..."), NULL);
11766 filt, LIVES_FILE_CHOOSER_ACTION_SAVE,
_(
"Export Audio as..."), NULL);
11769 if (!filename)
return;
11776 _(
"\n\nThe audio playback speed has been altered for this clip.\nClick 'OK' to export at the new speed, "
11777 "or 'Cancel' to export at the original rate.\n"))) {
11778 nrate =
cfile->arate;
11782 if (
cfile->start *
cfile->end > 0 && !LIVES_POINTER_TO_INT(user_data)) {
11795 start, end,
cfile->arps,
cfile->achans,
cfile->asampsize, asigned, nrate,
11796 (tmp = lives_filename_from_utf8(file_name, -1, NULL, NULL, NULL)));
11830 d_print(
_(
"Normalising audio..."));
11883 LiVESWidget *chooser;
11887 char *com, *tmp, *tmp2;
11892 boolean gotit =
FALSE;
11914 if (resp != LIVES_RESPONSE_ACCEPT) {
11920 lives_snprintf(file_name,
PATH_MAX,
"%s",
11923 -1, NULL, NULL, NULL)));
11936 if (strlen(a_type)) {
11938 for (i = 0; filt[i]; i++) {
11939 if (!lives_ascii_strcasecmp(a_type, filt[i] + 2)) gotit =
TRUE;
11945 a_type,
cfile->arate,
11946 cfile->achans,
cfile->asampsize, asigned, aendian,
11947 (tmp = lives_filename_from_utf8(file_name, -1, NULL, NULL, NULL)));
12057 char *com, *msg, *tmp;
12063 int type = LIVES_POINTER_TO_INT(user_data);
12072 end =
cfile->pointer_time;
12075 tmp = (
_(
"Deletion"));
12083 if (end >
cfile->laudio_time && end >
cfile->raudio_time)
12092 start, end,
cfile->arate,
12137 double startt, endt, startv, endv, time = 0.;
12138 char *msg, *msg2, *utxt, *com;
12140 uint32_t chk_mask = 0;
12150 cfile->undo1_int = type = LIVES_POINTER_TO_INT(user_data);
12161 type =
cfile->undo1_int;
12164 if (!menuitem || !aud_d->
is_sel) {
12166 endt =
cfile->undo1_dbl;
12167 startt =
cfile->undo2_dbl;
12170 cfile->undo2_dbl = startt = 0.;
12171 cfile->undo1_dbl = endt = time;
12173 cfile->undo1_dbl = endt =
cfile->laudio_time;
12174 cfile->undo2_dbl = startt =
cfile->laudio_time - time;
12178 cfile->undo2_dbl = startt = ((double)
cfile->start - 1.) /
cfile->fps;
12185 msg2 = (
_(
"Fading audio in"));
12186 utxt = (
_(
"Fade audio in"));
12190 msg2 = (
_(
"Fading audio out"));
12191 utxt = (
_(
"Fade audio out"));
12203 msg =
lives_strdup_printf(
_(
"%s from time %.2f seconds to %.2f seconds..."), msg2, startt, endt);
12260 char *com, *tmp, *msg = NULL;
12262 uint32_t chk_mask = 0;
12264 boolean bad_header =
FALSE;
12272 start =
cfile->undo1_dbl;
12273 end =
cfile->undo2_dbl;
12275 if (LIVES_POINTER_TO_INT(user_data)) {
12276 tmp = (
_(
"Deleting all audio"));
12289 msg = (
_(
"Deleting all audio..."));
12295 start *= (double)
cfile->arate / (
double)
cfile->arps;
12296 end *= (double)
cfile->arate / (
double)
cfile->arps;
12298 tmp = (
_(
"Deleting audio"));
12306 cfile->undo1_dbl = start;
12307 cfile->undo2_dbl = end;
12311 cfile->undo_signed_endian =
cfile->signed_endian;
12350 if (
cfile->laudio_time == 0. ||
cfile->raudio_time == 0.) {
12351 if (
cfile->audio_waveform) {
12357 else cfile->achans = 1;
12408 static uint32_t lmap_error_recsel;
12413 lmap_error_recsel = 0;
12425 lmap_error_recsel = chk_mask;
12429 if (
cfile->achans > 0) {
12449 double aud_start, aud_end, vel = 1., vol = 1.;
12453 boolean backr =
FALSE;
12455 int asigned = 1, aendian = 1;
12457 int type = LIVES_POINTER_TO_INT(user_data);
12458 int oachans = 0, oarate = 0, oarps = 0, ose = 0, oasamps = 0;
12507 if (
cfile->arate <= 0) {
12523 asigned = !asigned;
12526 lives_snprintf(
cfile->type, 40,
"Audio");
12555 #ifdef HAVE_PULSE_AUDIO
12599 aud_end =
cfile->laudio_time;
12601 if (aud_end == 0.) {
12605 d_print(
"nothing recorded...");
12685 chk_mask = lmap_error_recsel;
12687 lmap_error_recsel = 0;
12695 double start = 0, end = 0;
12698 uint32_t chk_mask = 0;
12700 boolean has_new_audio =
FALSE;
12707 has_new_audio =
TRUE;
12713 if (
cfile->audio_waveform) {
12719 start =
cfile->undo1_dbl;
12720 end =
cfile->undo2_dbl;
12722 cfile->signed_endian =
cfile->undo_signed_endian;
12728 if (!
cfile->achans) {
12741 cfile->undo_signed_endian =
cfile->signed_endian;
12747 char *tmp = (
_(
"Inserting silence"));
12760 d_print(
_(
"Inserting silence from %.2f to %.2f seconds..."), start, end);
12763 cfile->undo1_dbl = start;
12764 start *= (double)
cfile->arate / (
double)
cfile->arps;
12765 cfile->undo2_dbl = end;
12766 end *= (double)
cfile->arate / (
double)
cfile->arps;
12769 cfile->old_laudio_time =
cfile->laudio_time;
12770 cfile->old_raudio_time =
cfile->raudio_time;
12773 com =
lives_strdup_printf(
"%s insert \"%s\" \"%s\" %.8f 0. %.8f \"%s\" 2 0 0 0 0 %d %d %d %d %d 1",
12799 if (has_new_audio) {
12801 cfile->signed_endian =
cfile->undo_signed_endian;
12831 int asigned = 1, aendian = 1;
12832 boolean bad_header =
FALSE;
12848 if (
cfile->arate <= 0) {
12865 boolean close = LIVES_POINTER_TO_INT(user_data);
12899 char *msg =
lives_strdup_printf(
P_(
"\nDelete %d layout...are you sure ?\n",
"\nDelete %d layouts...are you sure ?\n", num_maps),
char * lives_format_storage_space_string(uint64_t space)
boolean lives_freep(void **ptr)
LiVESWidget * select_to_end
#define LIVES_GLOBAL_INLINE
LiVESTextBuffer * layout_textbuffer
stores layout errors
void * jackd
jack audio player / transport
LiVESList * layout_frame_is_affected(int clipno, int start, int end, LiVESList *xlays)
void clear_mainw_msg(void)
boolean internal_messaging
internal fx
void fade_background(void)
void on_open_activate(LiVESMenuItem *menuitem, livespointer user_data)
double blend_factor
keyboard control parameter
void on_save_as_activate(LiVESMenuItem *menuitem, livespointer user_data)
pthread_mutex_t instance_ref_mutex
refcounting for instances
boolean on_LiVES_delete_event(LiVESWidget *widget, LiVESXEventDelete *event, livespointer user_data)
LiVESWidget * stop_button
void on_export_audio_activate(LiVESMenuItem *menuitem, livespointer user_data)
volatile ticks_t startticks
effective ticks when current frame was (should have been) displayed
const char * name
plugin name
void on_pause_clicked(void)
void on_loop_button_activate(LiVESMenuItem *menuitem, livespointer user_data)
boolean dirchange_lock_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer area_enum)
set in / out points for video looping during free playback, it is possible to set in / out points for...
#define EFFORT_RANGE_MAX
if set to TRUE during playback then a new frame (or possibly the current one) will be displayed ASAP
void migrate_layouts(const char *old_set_name, const char *new_set_name)
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
void set_theme_colour_pref(const char *themefile, const char *key, lives_colRGBA64_t *lcol)
LiVESWidget * select_submenu
boolean record_toggle_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer user_data)
LIVES_GLOBAL_INLINE boolean do_please_install(const char *exec, uint64_t gflags)
boolean pref_factory_int(const char *prefidx, int newval, boolean permanent)
LiVESWidget * fs_playalign
LiVESList * cliplist
hash table of clips in menu order
boolean show_in_out_images(livespointer user_data)
LiVESWidget * m_mutebutton
void unload_decoder_plugins(void)
int swapped_clip
maintains the current cliplist postion even if we swap fg and bg clips
boolean recover_files(char *recovery_file, boolean auto_recover)
#define THEME_DETAIL_MT_MARK
void do_write_failed_error_s(const char *s, const char *addinfo)
LiVESIOChannel * iochan
encoder text output
void lives_exit(int signum)
double lives_ce_update_timeline(int frame, double x)
pointer position in timeline
#define GUI_SCREEN_PHYS_HEIGHT
boolean check_dir_access(const char *dir, boolean leaveit)
void set_undoable(const char *what, boolean sensitive)
#define HAS_EXTERNAL_PLAYER
LiVESWidgetColor normal_back
boolean prepare_to_play_foreign(void)
#define LIVES_FILE_EXT_TEXT
LIVES_GLOBAL_INLINE boolean do_erase_subs_warning(void)
void on_full_screen_activate(LiVESMenuItem *menuitem, livespointer user_data)
boolean start_playback(int type)
#define JACK_OPTS_NOPLAY_WHEN_PAUSED
play audio even when transport paused
void on_loop_video_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESWidget * m_stopbutton
double period
timing variables
volatile off64_t aseek_pos
audio seek posn. (bytes) for when we switch clips
void on_delete_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define WARN_MASK_LAYOUT_ALTER_FRAMES
off by default on a fresh install
void on_lock_selwidth_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_redo_activate(LiVESWidget *menuitem, livespointer user_data)
void on_import_proj_activate(LiVESMenuItem *menuitem, livespointer user_data)
LIVES_GLOBAL_INLINE LiVESList * plugin_request_by_line(const char *plugin_type, const char *plugin_name, const char *request)
#define WARN_MASK_LAYOUT_CLOSE_FILE
char * choose_file(const char *dir, const char *fname, char **const filt, LiVESFileChooserAction act, const char *title, LiVESWidget *extra_widget)
@ CLIP_TYPE_VIDEODEV
frames from video device
void on_change_speed_ok_clicked(LiVESButton *button, livespointer user_data)
char * get_worktmp(const char *prefix)
void on_rename_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define PREF_REC_EXT_AUDIO
boolean nervous_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer clip_number)
weed_plant_t * audio_event
void on_restore_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define THEME_DETAIL_MT_TCFG
lives_mgeometry_t * mgeom
multi-head support
lives_size_match_t matchsize
boolean do_progress_dialog(boolean visible, boolean cancellable, const char *text)
LIVES_GLOBAL_INLINE char * lives_get_audio_file_name(int fnum)
void mt_desensitise(lives_mt *mt)
void set_default_comment(lives_clip_t *sfile, const char *extrat)
void on_capture_activate(LiVESMenuItem *menuitem, livespointer user_data)
@ CANCEL_USER_PAUSED
cancelled and paused
void lives_sync(int times)
LIVES_GLOBAL_INLINE boolean do_theme_exists_warn(const char *themename)
pthread_mutex_t abuf_mutex
mutices
LiVESList * xlays
immediately (to be) affected layout maps
int64_t render_audio_segment(int nfiles, int *from_files, int to_file, double *avels, double *fromtime, weed_timecode_t tc_start, weed_timecode_t tc_end, double *chvol, double opvol_start, double opvol_end, lives_audio_buf_t *obuf)
render a chunk of audio, apply effects and mixing it
lives_painter_surface_t * laudio_drawable
char workdir[PATH_MAX]
kept in locale encoding
LiVESWidget * p_mutebutton
void lock_set_file(const char *set_name)
void activate_url_inner(const char *link)
#define LIVES_SEEK_FAST
good
LiVESWidget * atrigger_button
lives_checkstatus_t has_pulse_audio
#define EXTRA_DETAILS_EMPTY_DIRS
LiVESWidget * encoder_combo
void stop_audio_stream(void)
#define EXTRA_DETAILS_CLIPHDR
LiVESWidget * select_last
boolean do_close_changed_warn(void)
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)
void pref_change_xcolours(void)
void on_select_invert_activate(LiVESMenuItem *menuitem, livespointer user_data)
boolean ignore_screen_size
applied during frame reconfig events
boolean crash_recovery
TRUE==maintain mainw->recovery file.
lives_checkstatus_t has_autolives
void on_cleardisk_advanced_clicked(LiVESWidget *widget, livespointer user_data)
#define WARN_MASK_VJMODE_ENTER
LiVESWidget * fit_checkbutton
int lives_cp(const char *from, const char *to)
#define SET_LOCK_FILES(set_name)
lives_storage_status_t get_storage_status(const char *dir, uint64_t warn_level, int64_t *dsval, int64_t ds_resvd)
void on_back_pressed(LiVESButton *button, livespointer user_data)
void play_file(void)
play the current clip from 'mainw->play_start' to 'mainw->play_end'
boolean after_foreign_play(void)
void on_close_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESWidget * select_from_start
void on_resample_vid_ok(LiVESButton *, LiVESEntry *entry)
LiVESWidget * m_rewindbutton
void on_showsubs_toggled(LiVESWidgetObject *obj, livespointer user_data)
void pconx_delete_all(void)
_vid_playback_plugin * vpp
video plugin
void on_erase_subs_activate(LiVESMenuItem *menuitem, livespointer user_data)
lives_checkstatus_t has_youtube_dl
void on_toolbar_hide(LiVESButton *button, livespointer user_data)
#define DEFAULT_AUDIO_SAMPS
LiVESWidget * rb_unsigned
void do_keys_window(void)
LiVESResponseType do_info_dialogf(const char *fmt,...)
void * ext_src
points to opaque source for non-disk types
#define LIVES_AUTHOR_EMAIL
boolean show_overlay_msgs
#define WARN_MASK_LAYOUT_DELETE_AUDIO
int count_resampled_frames(int in_frames, double orig_fps, double resampled_fps)
LIVES_GLOBAL_INLINE LiVESList * plugin_request(const char *plugin_type, const char *plugin_name, const char *request)
void on_opensel_range_ok_clicked(LiVESButton *button, livespointer user_data)
#define LIVES_FILE_EXT_WAV
LIVES_GLOBAL_INLINE boolean do_set_rename_old_layouts_warning(const char *new_set)
#define DVD_AUDIO_CHAN_DEFAULT
boolean all_expose(LiVESWidget *widget, lives_painter_t *cr, livespointer psurf)
#define RFX_WINSIZE_H
size of the fx dialog windows scrollwindow
boolean check_for_layout_del(lives_mt *mt, boolean exiting)
LiVESWidget * clear_button
#define GEN_SPB_LINK_I(n, bit)
@ CANCEL_APP_QUIT
application quit
void on_recaudclip_ok_clicked(LiVESButton *button, livespointer user_data)
boolean restore_clip_binfmt(int clipno)
double lives_fix(double val, int decimals) GNU_CONST
int lives_cat(const char *from, const char *to, boolean append)
void update_play_times(void)
like get_play_times, but will force redraw of audio waveforms
lives_colRGBA64_t mt_evbox
int current_palette
plugin should init this to palettes[0] if URI changes
void get_dirname(char *filename)
int new_clip
clip we should switch to during playback; switch will happen at the designated SWITCH POINT
int calc_frame_from_time(int filenum, double time)
nearest frame [1, frames]
lives_checkstatus_t has_identify
int bpp
bits per pixel of the image frames, 24 or 32
boolean fatal
got fatal signal
LiVESWidgetColor normal_fore
void on_volume_slider_value_changed(LiVESScaleButton *sbutton, livespointer user_data)
boolean clip_switched
for recording - did we switch clips ?
frames_t frames
number of video frames
lives_clip_type_t clip_type
void on_rename_clip_name(LiVESButton *button, livespointer user_data)
boolean on_stop_activate_by_del(LiVESWidget *widget, LiVESXEventDelete *event, livespointer user_data)
void on_sepwin_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_playclip_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESWidget * play_window
lives_remote_clip_request_t * run_youtube_dialog(lives_remote_clip_request_t *req)
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]
void on_about_activate(LiVESMenuItem *menuitem, livespointer user_data)
void polymorph(lives_mt *mt, lives_mt_poly_state_t poly)
void stored_event_list_free_undos(void)
#define LAYOUT_MAP_FILENAME
void on_open_sel_activate(LiVESMenuItem *menuitem, livespointer user_data)
@ NUM_LIVES_STRING_CONSTANTS
boolean record_starting
start recording at next frame
void on_select_to_aend_activate(LiVESMenuItem *menuitem, livespointer user_data)
char proj_save_dir[PATH_MAX]
boolean check_clip_integrity(int fileno, const lives_clip_data_t *cdata, frames_t maxframe)
char * recovery_file
the filename of our recover file
weed_plant_t * frame_layer
void * struct_from_template(lives_struct_type st_type)
boolean all_expose_pb(LiVESWidget *widget, lives_painter_t *cr, livespointer psurf)
void on_rb_audrec_time_toggled(LiVESToggleButton *togglebutton, livespointer user_data)
weed_plant_t * blend_layer
lives_checkstatus_t has_mktemp
void on_prv_link_toggled(LiVESToggleButton *togglebutton, livespointer user_data)
char * weed_palette_get_name_full(int pal, int clamping, int subspace)
void wipe_layout(lives_mt *mt)
#define CLIP_ORDER_FILENAME
void on_spinbutton_end_value_changed(LiVESSpinButton *spinbutton, livespointer user_data)
#define LIVES_COPYRIGHT_YEARS
#define CLIP_HAS_VIDEO(clip)
@ LIVES_STRING_CONSTANT_CL
"the current layout"
boolean config_event(LiVESWidget *widget, LiVESXEventConfigure *event, livespointer user_data)
weed_plantptr_t lives_proc_thread_t
lives proc_threads API
#define LIVES_FILE_EXT_SUB
boolean pause_effect_during_preview
mt_opts multi_opts
some multitrack options that survive between mt calls
@ LIVES_DIRECTION_FORWARD
#define WARN_MASK_LAYOUT_DELETE_FRAMES
void get_monitors(boolean reset)
boolean do_comments_dialog(int fileno, char *filename)
text_window * create_text_window(const char *title, const char *text, LiVESTextBuffer *textbuffer, boolean add_buttons)
#define LOOP_LOCK_MIN_FRAMES
void restore_frame_index_back(int sfileno)
void on_voladj_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define SEPWIN_TYPE_STICKY
pthread_mutex_t alarmlist_mutex
append / remove with file_buffer list
boolean noswitch
value set automatically to prevent 'inopportune' clip switching
boolean on_mouse_sel_start(LiVESWidget *widget, LiVESXEventButton *event, livespointer user_data)
LiVESWidget * entry_arate
#define USE_MPV
some shared structures
ticks_t timeout_ticks
incremented if effect/rendering is paused/previewed
LiVESWidgetColor menu_and_bars_fore
int calc_frame_from_time2(int filenum, double time)
nearest frame [1, frames+1]
boolean all_expose_overlay(LiVESWidget *widget, lives_painter_t *creb, livespointer psurf)
boolean add_lmap_error(lives_lmap_error_t lerror, const char *name, livespointer user_data, int clipno, int frameno, double atime, boolean affects_current)
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.
boolean mute_audio_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer user_data)
void on_export_theme_activate(LiVESMenuItem *menuitem, livespointer user_data)
void delete_frames_from_virtual(int sfileno, frames_t start, frames_t end)
lives_colRGBA64_t mt_timeline_reg
#define LIVES_OSC_NOTIFY_CLIPSET_OPENED
sent after a clip set is opened
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
void mt_init_clips(lives_mt *mt, int orig_file, boolean add)
LiVESWidget * entry_asamps
void on_encoder_entry_changed(LiVESCombo *combo, livespointer ptr)
boolean pref_trash
user prefers trash to delete
int osc_auto
bypass user choices automatically
frames_t actual_frame
actual / last frame being displayed
double blendchange_amount
boolean used_in_current_layout(lives_mt *mt, int file)
void event_list_free_undos(lives_mt *mt)
LiVESWidgetColor menu_and_bars
size_t get_token_count(const char *string, int delim)
boolean mt_nextclip(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer user_data)
@ CLIP_TYPE_GENERATOR
frames from generator plugin
void on_copy_activate(LiVESMenuItem *menuitem, livespointer user_data)
void add_to_clipmenu(void)
void set_main_title(const char *file, int untitled)
boolean lives_buffered_rdonly_set_reversed(int fd, boolean val)
@ CANCEL_USER
user pressed stop
LIVES_GLOBAL_INLINE boolean do_move_workdir_dialog(void)
LiVESWidget * fps_spinbutton
LIVES_GLOBAL_INLINE boolean do_existing_subs_warning(void)
#define LIVES_PERM_OSC_PORTS
boolean opening_multi
flag to indicate multiple file selection
boolean check_storage_space(int clipno, boolean is_processing)
LiVESWidget * textview_rtime
double calc_time_from_frame(int clip, int frame)
void load_preview_image(boolean update_always)
LiVESWidget * preview_button
boolean on_hrule_update(LiVESWidget *widget, LiVESXEventMotion *event, livespointer user_data)
LiVESWidget * create_cleardisk_advanced_dialog(void)
void on_ok_file_open_clicked(LiVESFileChooser *chooser, LiVESSList *fnames)
void on_ins_silence_details_clicked(LiVESButton *button, livespointer user_data)
volatile boolean agen_needs_reinit
boolean check_if_non_virtual(int fileno, frames_t start, frames_t end)
boolean do_auto_dialog(const char *text, int type)
void on_insert_pre_activate(LiVESMenuItem *menuitem, livespointer user_data)
ulong fsp_func
fileselector preview expose (for image thumbnails)
pthread_mutex_t cache_buffer_mutex
sync for jack playback termination
void weed_set_blend_factor(int hotkey)
void on_backup_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_fade_audio_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_spin_value_changed(LiVESSpinButton *spinbutton, livespointer user_data)
#define VPP_LOCAL_DISPLAY
weed_event_t * event_list
current event_list, for recording
#define LIVES_PREVIEW_TYPE_VIDEO_AUDIO
boolean update_dsu(livespointer data)
lives_checkstatus_t has_composite
int lives_touch(const char *tfile)
unsigned char * sl_undo_mem
void rte_keymodes_backup(int nkeys)
void multitrack_play_sel(LiVESMenuItem *menuitem, livespointer user_data)
void on_rewind_activate(LiVESMenuItem *menuitem, livespointer user_data)
volatile int rec_aclip
recording values - to be inserted at the following video frame
boolean storeclip_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer clip_number)
jump to a stored clip / frame position during free playback clip number and frame position can be sto...
void close_vid_playback_plugin(_vid_playback_plugin *vpp)
#define THEME_DETAIL_INFO_TEXT
@ UNDO_REC_AUDIO
record audio to selection
LiVESWidget * preview_spinbutton
_encoder encoder
from main.h
LIVES_GLOBAL_INLINE LiVESResponseType do_error_dialog(const char *text)
boolean switch_audio_clip(int new_file, boolean activate)
weed_plant_t * get_last_frame_event(weed_plant_t *event_list)
#define THEME_DETAIL_MT_EVBOX
char ar_clipset_name[128]
locale
LiVESWidget * create_cdtrack_dialog(int type, livespointer user_data)
LiVESWidget * textview_lrate
void on_load_cdtrack_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define LIVES_FILE_EXT_TAR_GZ
boolean do_header_write_error(int clip)
int lives_cp_keep_perms(const char *from, const char *to)
#define LIVES_SHORTEST_TIMEOUT
boolean on_ins_silence_activate(LiVESMenuItem *menuitem, livespointer user_data)
void end_threaded_dialog(void)
void make_play_window(void)
actually in gui.c
LIVES_GLOBAL_INLINE void do_do_not_close_d(void)
void threaded_dialog_spin(double fraction)
boolean rewrite_recovery_file(void)
int deorder_frames(int old_frames, boolean leave_bak)
leave_bak is a special mode for the clipboard
lives_colRGBA64_t mt_mark
#define WARN_MASK_LAYOUT_SHIFT_FRAMES
off by default on a fresh install
@ UNDO_RENDER
resample/reorder/resize/apply effects
void create_new_pb_speed(short type)
window change speed from Tools menu
void on_cancel_keep_button_clicked(LiVESButton *button, livespointer user_data)
LiVESWidget * toy_random_frames
int pheight
playback height
LiVESWidget * select_start_only
#define SCREEN_AREA_BACKGROUND
@ CLIP_TYPE_DISK
imported video, broken into frames
#define LIVES_FEATURE_URL
#define LIVES_OSC_NOTIFY_QUIT
sent when app quits
boolean do_yesno_dialog_with_check(const char *text, uint64_t warn_mask_number)
char * string_constants[NUM_LIVES_STRING_CONSTANTS]
float volume
audio volume level (for jack and pulse)
void on_select_new_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESWidget * insert_dialog
void switch_clip_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define PREF_CLEAR_DISK_OPTS
void vj_mode_toggled(LiVESCheckMenuItem *menuitem, livespointer user_data)
weed_plant_t * next_event
LiVESList * set_list
number of sets in workdir (minus the current set), -1 if not checked
void on_recaudclip_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define LIVES_TRANSLATE_URL
boolean disk_monitor_running(const char *dir)
void free_fdets_list(LiVESList **listp)
volatile lives_whentostop_t whentostop
LiVESResponseType do_dir_perm_error(const char *dir_name, boolean allow_cancel)
@ LIVES_STORAGE_STATUS_WARNING
lives_checkstatus_t has_mpv
frames_t realize_all_frames(int clipno, const char *msg, boolean enough)
lives_direction_t
use REVERSE / FORWARD when a sign is used, BACKWARD / FORWARD when a parity is used
LiVESList * recovery_list
crash recovery system
#define LIVES_PREVIEW_TYPE_AUDIO_ONLY
void find_when_to_stop(void)
off_t get_dir_size(const char *dirname)
#define THEME_DETAIL_NAME
lives_permmgr_t * permmgr
boolean check_frame_count(int idx, boolean last_chkd)
check number of frames is correct for files of type CLIP_TYPE_DISK
void on_load_audio_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_paste_as_new_activate(LiVESMenuItem *menuitem, livespointer user_data)
volatile boolean loop_cont
autolives_window * autolives_pre_dialog(void)
#define CURRENT_CLIP_HAS_AUDIO
#define THEME_DETAIL_NORMAL_FORE
LiVESWidget * m_sepwinbutton
volatile lives_cancel_t cancelled
void mt_post_playback(lives_mt *mt)
void on_full_screen_pressed(LiVESButton *button, livespointer user_data)
lives_storage_status_t ds_status
LiVESWidgetColor info_text
#define LIVES_FILE_EXT_BAK
boolean ar_clipset
auto-reload
boolean on_hrule_reset(LiVESWidget *widget, LiVESXEventButton *event, livespointer user_data)
lives_pid_t lives_fork(const char *com)
void open_set_file(int clipnum)
volatile uint32_t audio_opts
#define is_realtime_aplayer(ptype)
void email_author_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define EXEC_AUTOLIVES_PL
shipped
LiVESAdjustment * msg_adj
void recover_layout_cancelled(boolean is_startup)
#define THEME_DETAIL_STYLE
int get_frame_count(int idx, int xsize)
sets mainw->files[idx]->frames with current framecount
#define THEME_SEP_IMG_LITERAL
int lives_echo(const char *text, const char *to, boolean append)
weed_plant_t * afilter_map
boolean all_config(LiVESWidget *widget, LiVESXEventConfigure *event, livespointer ppsurf)
genric func. to create surfaces
void autolives_toggle(LiVESMenuItem *menuitem, livespointer user_data)
@ CANCEL_ERROR
cancelled because of error
@ CLIP_DETAILS_PB_FRAMENO
lives_painter_surface_t * fsp_surface
void close_ascrap_file(boolean remove)
boolean reload_clip(int fileno, int maxframe)
boolean check_for_layout_errors(const char *operation, int fileno, int start, int end, uint32_t *in_mask)
check for layout errors, using in_mask as a guide (mask values are taken from prefs->warn_mask,...
void on_fade_activate(LiVESMenuItem *menuitem, livespointer user_data)
boolean mouse_scroll_clips
boolean show_desktop_panel
void on_cleardisk_activate(LiVESWidget *widget, livespointer user_data)
void on_normalise_audio_activate(LiVESMenuItem *menuitem, livespointer user_data)
void pref_change_images(void)
void on_insert_activate(LiVESButton *button, livespointer user_data)
lives_checkstatus_t has_encoder_plugins
int rte_keys
which effect is bound to keyboard (m) modechange and ctrl-alt-up-arrow / ctrl-alt-down-arrow param ch...
lives_proc_thread_t dir_to_file_details(LiVESList **listp, const char *dir, const char *orig_loc, uint64_t extra)
create a list from a (sub)directory '.
void delete_video_track(lives_mt *mt, int layer, boolean full)
#define LIVES_STATUS_FILE_NAME
void set_sel_label(LiVESWidget *label)
LIVES_GLOBAL_INLINE void do_set_noclips_error(const char *setname)
#define CLIP_TOTAL_TIME(clip)
LiVESWidget * fs_playarea
for the fileselection preview
@ LMAP_ERROR_SHIFT_FRAMES
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
void workdir_warning(void)
#define LIVES_FILE_EXT_NEW
#define SCRATCH_FWD_EXTRA
void ce_thumbs_highlight_current_clip(void)
void on_recent_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define LIVES_IS_INTERACTIVE
LiVESWidget * textview_frames
void d_print(const char *fmt,...)
char name[CLIP_NAME_MAXLEN]
the display name
void recover_layout_map(int numclips)
void on_boolean_toggled(LiVESWidgetObject *obj, livespointer user_data)
void draw_dsu_widget(LiVESWidget *dsu_widget)
LiVESList * disabled_decoders
void on_encoder_ofmt_changed(LiVESCombo *combo, livespointer user_data)
void on_playsel_activate(LiVESMenuItem *menuitem, livespointer user_data)
void close_current_file(int file_to_switch_to)
close current file, and try to switch to file_to_switch_to
_entryw * create_cds_dialog(int type)
int blend_file
background clip details
lives_painter_surface_t * raudio_drawable
void switch_to_file(int old_file, int new_file)
@ LIVES_DIRECTION_REVERSE
boolean keep_pre
set if previewed frames should be retained as processed frames (for rendered effects / generators)
volatile double rec_aseek
LiVESWidget * fs_playframe
void on_double_size_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_quit_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESWidget * ext_audio_checkbutton
LiVESWidget * p_playbutton
#define GUI_SCREEN_PHYS_WIDTH
void on_eject_cd_activate(LiVESMenuItem *menuitem, livespointer user_data)
void del_current_set(boolean exit_after)
void on_append_audio_activate(LiVESMenuItem *menuitem, livespointer user_data)
off_t reget_afilesize_inner(int fileno)
LiVESWidget * preview_box
char cdplay_device[PATH_MAX]
locale encoding
#define SET_LOCK_FILE(set_name, lockfile)
void on_details_button_clicked(void)
LiVESWidgetColor mt_timecode_bg
LIVES_GLOBAL_INLINE void lives_notify_int(int msgnumber, int msgint)
LIVES_GLOBAL_INLINE boolean do_layout_alter_frames_warning(void)
LiVESTextView * optextview
int set_boolean_pref(const char *key, boolean value)
void get_basename(char *filename)
LIVES_GLOBAL_INLINE void do_program_not_found_error(const char *progname)
LIVES_GLOBAL_INLINE void do_audrate_error_dialog(void)
void on_preview_clicked(LiVESButton *button, livespointer user_data)
void procw_desensitize(void)
LiVESWidget * create_message_dialog(lives_dialog_t diat, const char *text, int warn_mask_number)
LiVESWidget * choose_file_with_preview(const char *dir, const char *title, char **const filt, int filesel_type)
void backup_file(int clip, int start, int end, const char *filename)
boolean lives_make_writeable_dir(const char *newdir)
uint32_t signed_endian
bitfield
void on_more_pressed(LiVESButton *button, livespointer user_data)
void on_select_all_activate(LiVESWidget *widget, livespointer user_data)
LiVESWidget * spinbutton_end
size_t lives_fread_string(char *buff, size_t stlen, const char *fname)
@ CLIP_TYPE_FILE
unimported video, not or partially broken in frames
void mt_memory_free(void)
int lives_mv(const char *from, const char *to)
void maybe_add_mt_idlefunc(void)
ticks_t origsecs
playback start seconds - subtracted from all other ticks to keep numbers smaller
LiVESWidget * message_box
boolean playing_sel
list of set names in current workdir, mau be NULL
LiVESWidget * spinbutton_start
#define LIVES_SEEK_FAST_REV
lives_screen_area_t * screen_areas
frames_t * frame_index
index of frames for CLIP_TYPE_FILE >0 means corresponding frame within original clip -1 means corresp...
boolean freeze_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer user_data)
boolean msg_area_config(LiVESWidget *widget)
void d_print_file_error_failed(void)
void set_theme_pref(const char *themefile, const char *key, const char *value)
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 pref_factory_bool(const char *prefidx, boolean newval, boolean permanent)
boolean do_save_clipset_warn(void)
#define THEME_DETAIL_ALT_BACK
void switch_clip(int type, int newclip, boolean force)
boolean d_print_overlay(double timeout_seconds, const char *fmt,...)
#define SCRATCH_JUMP_NORESYNC
jump with no audio resync
int scrap_file
we throw odd sized frames here when recording in real time; used if a source is a generator or stream
char * get_systmp(const char *suff, boolean is_dir)
LiVESWidget * start_image
#define FN_KEYS
number of function keys
ulong deduce_file(const char *filename, double start_time, int end)
lives_clip_t * create_cfile(int new_file, const char *handle, boolean is_loaded)
set default values for a clip (in memory)
void insert_audio_event_at(weed_plant_t *event, int track, int clipnum, double seek, double vel)
void on_forward_pressed(LiVESButton *button, livespointer user_data)
void cached_list_free(LiVESList **list)
LiVESWidget * mute_button
void mt_tl_move(lives_mt *mt, double pos)
#define THEME_DETAIL_FRAME_SURROUND
void reset_clipmenu(void)
int lives_rmglob(const char *files)
LiVESWidget * textview_type
@ LIVES_DIRECTION_BACKWARD
#define SEL_MOVE_START
which bar should we move ?
LiVESList * stored_layout_undos
void save_frame(LiVESMenuItem *menuitem, livespointer user_data)
boolean do_clipboard_fps_warning(void)
char info_file[PATH_MAX]
used for asynch communication with externals
void on_volch_pressed(LiVESButton *button, livespointer user_data)
void on_import_theme_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESWidget * t_fullscreen
#define CE_AUDBAR_HEIGHT
clip edit vid/aud bar height
#define CURRENT_CLIP_HAS_VIDEO
void d_print_failed(void)
boolean show_urgency_msgs
boolean resync_audio(double frameno)
resync audio playback to the current video frame
boolean mt_prevclip(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer user_data)
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
LiVESWidget * scrolled_textview(const char *text, LiVESTextBuffer *textbuffer, int window_width, LiVESWidget **ptextview)
int playing_file
which number file we are playing (or -1) [generally mainw->current_file]
LiVESWidget * p_rewindbutton
#define P_(String, StringPlural, n)
void get_location(const char *exe, char *val, int maxlen)
boolean save_frame_index(int fileno)
ticks_t flush_audio_tc
reserved space for mbar
@ LMAP_INFO_SETNAME_CHANGED
void end_fs_preview(void)
frames_t load_frame_index(int fileno)
void drag_from_outside(LiVESWidget *widget, GdkDragContext *dcon, int x, int y, GtkSelectionData *data, uint32_t info, uint32_t time, livespointer user_data)
LiVESWidget * m_loopbutton
lives_clip_t * files[MAX_FILES+1]
+1 for the clipboard
char theme[64]
the theme name
@ LIVES_STRING_CONSTANT_ANY
boolean save_clip_value(int which, lives_clip_details_t, void *val)
void on_stop_clicked(LiVESMenuItem *menuitem, livespointer user_data)
void on_recaudsel_activate(LiVESMenuItem *menuitem, livespointer user_data)
void * main_thread_execute(lives_funcptr_t func, int return_type, void *retval, const char *args_fmt,...)
void mt_show_current_frame(lives_mt *mt, boolean return_layer)
preview the current frame
boolean check_for_lock_file(const char *set_name, int type)
check for set lock file do this via the back-end (smogrify) this allows for the locking scheme to be ...
aud_dialog_t * create_audfade_dialog(int type)
void on_resaudio_ok_clicked(LiVESButton *, LiVESEntry *entry)
ulong restore_file(const char *filename)
#define THEME_DETAIL_CE_UNSEL
boolean on_hrule_set(LiVESWidget *widget, LiVESXEventButton *event, livespointer user_data)
#define PREF_MASTER_VOLUME
boolean on_mouse_sel_reset(LiVESWidget *widget, LiVESXEventButton *event, livespointer user_data)
void on_spin_step_value_changed(LiVESSpinButton *spinbutton, livespointer user_data)
void * pulsed
pulseaudio player
LIVES_GLOBAL_INLINE LiVESResponseType do_retry_cancel_dialog(const char *text)
lives_checkstatus_t has_pip
int lives_close_buffered(int fd)
LIVES_GLOBAL_INLINE boolean do_warning_dialog(const char *text)
#define SEPWIN_TYPE_NON_STICKY
double aframeno
and the audio 'frame' for when we are looping
#define WEED_LEAF_HOST_KEY
frames_t rec_vid_frames
values to be written to the event list concurrent with next video ftame event
void on_select_from_start_activate(LiVESMenuItem *menuitem, livespointer user_data)
void add_to_recovery_file(const char *handle)
#define DEFAULT_AUDIO_RATE
defaults for when not specifed
LiVESWidget * select_to_aend
boolean config_vid_draw(LiVESWidget *widget, LiVESXEventConfigure *event, livespointer user_data)
_palette * palette
interface colour settings
pthread_mutex_t event_list_mutex
prevent simultaneous writing to event_list by audio and video threads
lives_remote_clip_request_t * on_utube_select(lives_remote_clip_request_t *req, const char *tmpdir)
LIVES_GLOBAL_INLINE void too_many_files(void)
LiVESWidget * create_opensel_dialog(int frames, double fps)
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
void do_plugin_encoder_error(const char *plugin_name)
boolean aud_lock_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer statep)
lock or unlock audio track changes in free playback if lock is switched on then the prefs to follow v...
#define THEME_DETAIL_AUDCOL
boolean do_set_duplicate_warning(const char *new_set)
LIVES_GLOBAL_INLINE void do_cd_error_dialog(void)
double freeze_fps
pb_fps for paused / frozen clips
off_t sget_file_size(const char *name)
void load_start_image(int frame)
void event_list_free(weed_plant_t *event_list)
int lives_killpg(lives_pgid_t pgrp, int sig)
LiVESWidget * select_end_only
lives_colRGBA64_t ce_unsel
#define EVENT_MARKER_RECORD_END
boolean open_ascrap_file(void)
void draw_region(lives_mt *mt)
error("LSD_RANDFUNC(ptr, size) must be defined")
boolean read_file_details(const char *file_name, boolean only_check_for_audio, boolean open_image)
#define LIVES_AUDIO_LOAD_FILTER
boolean check_for_executable(lives_checkstatus_t *cap, const char *exec)
#define CE_VIDBAR_HEIGHT
clip edit vid/aud bar height
weed_event_t * stored_event_list
stored mt -> clip editor
void save_file(int clip, int start, int end, const char *filename)
#define THEME_DETAIL_CE_SEL
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)
void on_insertwsound_toggled(LiVESToggleButton *togglebutton, livespointer user_data)
LiVESWidget * m_playbutton
int close_temp_handle(int new_clip)
close cfile and switch to new clip (may be -1)
void suggest_feature_activate(LiVESMenuItem *menuitem, livespointer user_data)
LIVES_GLOBAL_INLINE void do_clip_divergence_error(int fileno)
volatile boolean threaded_dialog
not really threaded ! but threaded_dialog_spin() can be called to animate it
boolean rte_key_on_off(int key, boolean on)
boolean backup_recording(char **esave_file, char **asave_file)
#define WARN_MASK_LAYOUT_ALTER_AUDIO
off by default on a fresh install
boolean rec_desktop_audio
void on_show_file_info_activate(LiVESMenuItem *menuitem, livespointer user_data)
int calc_frame_from_time4(int filenum, double time)
nearest frame, no maximum
void cconx_delete_all(void)
LIVES_GLOBAL_INLINE ticks_t lives_get_current_ticks(void)
lives_painter_surface_t * laudio_drawable
int set_int_pref(const char *key, int value)
void get_filename(char *filename, boolean strip_dir)
boolean do_foundclips_query(void)
_insertw * create_insert_dialog(void)
#define THEME_DETAIL_MT_TLREG
void resize_play_window(void)
frames_t count_virtual_frames(frames_t *findex, frames_t start, frames_t end)
count virtual frames between start and end (inclusive)
LiVESWidget * debug_button
void on_mute_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_spinbutton_start_value_changed(LiVESSpinButton *spinbutton, livespointer user_data)
void on_open_vcd_activate(LiVESMenuItem *menuitem, livespointer device_type)
void do_threaded_dialog(const char *trans_text, boolean has_cancel)
_resaudw * create_resaudw(short type, render_details *rdet, LiVESWidget *top_vbox)
resample audio window
boolean leave_files
TRUE to leave clip files on disk even when closing (default FALSE)
int arps
audio physical sample rate (i.e the "normal" sample rate of the clip when played at 1,...
pthread_mutex_t fbuffer_mutex
LiVESWidget * trash_rb(LiVESButtonBox *parent)
void get_total_time(lives_clip_t *file)
calculate laudio, raudio and video time (may be deprecated and replaced with macros)
LiVESList * lives_list_append_unique(LiVESList *xlist, const char *add)
char * subst(const char *string, const char *from, const char *to)
#define THEME_DETAIL_NORMAL_BACK
void fullscreen_internal(void)
void set_redoable(const char *what, boolean sensitive)
int lives_rmdir(const char *dir, boolean force)
#define lives_strdup_printf(fmt,...)
volatile boolean ext_audio
using external video playback plugin to stream audio
void on_capture2_activate(void)
void on_effects_paused(LiVESButton *button, livespointer user_data)
LIVES_GLOBAL_INLINE weed_timecode_t get_event_timecode(weed_plant_t *plant)
boolean resample_clipboard(double new_fps)
call this to resample clipboard video
boolean osc_block
TODO - make this a mutex and more finely grained : things we need to block are (clip switches,...
LiVESWidget * preview_image
void on_select_start_only_activate(LiVESMenuItem *menuitem, livespointer user_data)
void save_future_prefs(void)
void set_drawing_area_from_pixbuf(LiVESWidget *widget, LiVESPixbuf *pixbuf, lives_painter_surface_t *surface)
frames_t tcache_dubious_from
height for thumbnail cache (width is fixed, but if this changes, invalidate)
ulong toy_func_random_frames
LiVESWidget * pause_button
int lives_create_buffered(const char *pathname, int mode)
#define LIVES_IMAGE_TYPE_JPEG
#define LIVES_AUDIO_TYPE_PCM
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)
boolean dirchange_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer area_enum)
LIVES_GLOBAL_INLINE void do_messages_window(boolean is_startup)
void on_vj_realize_activate(LiVESMenuItem *menuitem, livespointer user_data)
void add_warn_check(LiVESBox *box, int warn_mask_number)
void lives_list_free_all(LiVESList **)
char * ensure_extension(const char *fname, const char *ext) WARN_UNUSED
void donate_activate(LiVESMenuItem *menuitem, livespointer user_data)
void audio_free_fnames(void)
char * get_mountpoint_for(const char *dir)
#define SET_LOCK_FILENAME
boolean prevclip_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer user_data)
uint64_t get_ds_free(const char *dir)
boolean read_headers(int clipno, const char *dir, const char *file_name)
void popup_lmap_errors(LiVESMenuItem *menuitem, livespointer user_data)
#define LIVES_MAIN_WINDOW_WIDGET
boolean close_keep_frames
special value for when generating to clipboard
#define THEME_FRAME_IMG_LITERAL
void on_open_loc_activate(LiVESMenuItem *menuitem, livespointer user_data)
void do_audio_import_error(void)
LIVES_GLOBAL_INLINE lives_cancel_t handle_audio_timeout(void)
#define LIVES_THRDATTR_NONE
const lives_decoder_sys_t * decoder
LiVESWidget * textview_ltime
LiVESWidget * textview_size
@ LIVES_STRUCT_FILE_DETS_T
int seek_flag
plugin can change per frame
int ascrap_file
scrap file for recording audio scraps
boolean stored_event_list_changed
void close_clip_decoder(int clipno)
LiVESWidget * acodec_combo
pthread_mutex_t clip_list_mutex
prevent adding/removing to cliplist while another thread could be reading it
#define AUDIO_OPTS_FOLLOW_FPS
@ UNDO_ATOMIC_RESAMPLE_RESIZE
resample/resize and resample audio for encoding
char * get_stats_msg(boolean calc_only)
void mt_zoom_in(LiVESMenuItem *menuitem, livespointer user_data)
void on_load_cdtrack_ok_clicked(LiVESButton *button, livespointer user_data)
void weed_unload_all(void)
unload all effects
int img_concat_clip
when opening multiple, image files can get concatenated here (prefs->concat_images)
boolean nextclip_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer user_data)
double event_list_get_start_secs(weed_plant_t *event_list)
LiVESWidget * select_invert
void event_list_add_end_events(weed_event_t *event_list, boolean is_final)
uint64_t ds_warn_level
diskspace warn level bytes
#define SCREEN_AREA_FOREGROUND
LiVESWidget * encoder_combo
LIVES_GLOBAL_INLINE size_t lives_strlen(const char *s)
boolean config_raud_draw(LiVESWidget *widget, LiVESXEventConfigure *event, livespointer user_data)
_future_prefs * future_prefs
void show_manual_section(const char *lang, const char *section)
ssize_t lives_popen(const char *com, boolean allow_error, char *buff, ssize_t buflen)
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)
void on_save_selection_activate(LiVESMenuItem *menuitem, livespointer user_data)
@ CANCEL_AUDIO_ERROR
cancelled because of soundcard error
#define LIVES_FILENAME_NOREMOVE
char home_dir[PATH_MAX]
home directory - default location for config file - locale encoding
#define LIVES_OSC_NOTIFY_CLIPSET_SAVED
sent after a clip set is closed
void redraw_timer_bars(double oldx, double newx, int which)
paint a damage region
void on_sticky_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESList * hdrs_cache
cache of a file header (e.g. header.lives)
#define LIVES_SUBS_FILTER
void on_save_textview_clicked(LiVESButton *button, livespointer user_data)
char * subt_save_file
name of file to save subtitles to
LIVES_GLOBAL_INLINE int lives_getuid(void)
volatile boolean in_fs_preview
void multitrack_playall(lives_mt *mt)
lives_mt * multitrack
holds a pointer to the entire multitrack environment; NULL in Clip Edit mode
void pref_change_colours(void)
boolean on_del_audio_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define CURRENT_CLIP_IS_VALID
ticks_t lives_alarm_check(lives_alarm_t alarm_handle)
boolean is_virtual_frame(int sfileno, frames_t frame)
void d_print_cancelled(void)
@ CANCEL_RETRY
an error occurred, retry the operation
#define LIVES_IMAGE_TYPE_PNG
boolean suppress_dprint
tidy up, e.g. by blocking "switched to file..." and "closed file..." messages
void mt_zoom_out(LiVESMenuItem *menuitem, livespointer user_data)
void on_show_keys_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define THEME_DETAIL_INFO_BASE
@ CLIP_TYPE_YUV4MPEG
yuv4mpeg stream
lives_colRGBA64_t frame_surround
volatile boolean record_paused
pause during recording
#define WARN_MASK_LAYOUT_SHIFT_AUDIO
off by default on a fresh install
lives_checkstatus_t has_xwininfo
#define SCRATCH_REV
set on direction change (video)
lives_checkstatus_t has_mplayer2
LiVESResponseType do_write_failed_error_s_with_retry(const char *fname, const char *errtext)
LiVESWidget * atrigger_spin
void mt_clip_select(lives_mt *mt, boolean scroll)
int last_dprint_file
message output settings
void on_double_size_pressed(LiVESButton *button, livespointer user_data)
pthread_mutex_t fxd_active_mutex
prevent simultaneous writing to active_dummy by audio and video threads
#define LIVES_FILE_TYPE_FLAG_SPECIAL
boolean all_expose_nopb(LiVESWidget *widget, lives_painter_t *cr, livespointer psurf)
void update_sel_menu(void)
boolean expose_laud_draw(LiVESWidget *widget, lives_painter_t *cr, livespointer psurf)
void show_manual_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_export_proj_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_playall_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESList * current_layouts_map
map of all layouts for set
int num_tr_applied
number of transitions active
boolean on_mouse_scroll(LiVESWidget *widget, LiVESXEventScroll *event, livespointer user_data)
void on_ping_pong_activate(LiVESMenuItem *menuitem, livespointer user_data)
void save_vpp_defaults(_vid_playback_plugin *vpp, char *vpp_file)
void(* exit_screen)(uint16_t mouse_x, uint16_t mouse_y)
void on_save_subs_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESWidget * vj_load_set
void on_faster_pressed(LiVESButton *button, livespointer user_data)
void clean_images_from_virtual(lives_clip_t *sfile, frames_t oldsframe, frames_t oldframes)
void insert_images_in_virtual(int sfileno, frames_t where, frames_t frames, frames_t *frame_index, frames_t start)
LIVES_GLOBAL_INLINE LiVESWidget * create_question_dialog(const char *title, const char *text)
#define MAX_FILES
max files is actually 1 more than this, since file 0 is the clipboard
void on_audio_toggled(LiVESWidget *tbutton, LiVESWidget *label)
boolean only_close
only close clips - do not exit
@ LIVES_STORAGE_STATUS_NORMAL
lives_checkstatus_t has_jackd
boolean set_palette_colours(boolean force_reload)
lives_painter_surface_t * video_drawable
boolean frame_context(LiVESWidget *widget, LiVESXEventButton *event, livespointer which)
weed_plant_t * get_enabled_channel(weed_plant_t *inst, int which, boolean is_in)
for FILTER_INST
#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)
void stored_event_list_free_all(boolean wiped)
boolean no_exit
if TRUE, do not exit after saving set
void lives_suspend_resume_process(const char *dirname, boolean suspend)
char * wm_name
window manager name, may be different from wm_caps.wwm_name
LiVESWidgetColor info_base
void delete_audio_tracks(lives_mt *mt, LiVESList *list, boolean full)
uint64_t next_ds_warn_level
current disk space warning level for the tempdir
#define THEME_DETAIL_ALT_FORE
void kill_play_window(void)
void lives_notify(int msgnumber, const char *msgstring)
void on_less_pressed(LiVESButton *button, livespointer user_data)
#define THEME_DETAIL_MT_TCBG
void on_open_new_audio_clicked(LiVESFileChooser *chooser, livespointer user_data)
void set_acodec_list_from_allowed(_prefsw *prefsw, render_details *rdet)
LIVES_GLOBAL_INLINE boolean prompt_remove_layout_files(void)
void buffer_lmap_error(lives_lmap_error_t lerror, const char *name, livespointer user_data, int clipno, int frameno, double atime, boolean affects_current)
char * file_open_params
extra parameters for opening special files
boolean ext_playback
using external video playback plugin
const char * get_image_ext_for_type(lives_img_type_t imgtype)
char sepimg_path[PATH_MAX]
void on_showfct_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_cut_activate(LiVESMenuItem *menuitem, livespointer user_data)
void vid_playback_plugin_exit(void)
int pre_play_file
the current file before playback started
#define LIVES_PREVIEW_TYPE_IMAGE_ONLY
int lives_chdir(const char *path, boolean no_error_dlg)
void d_print_enough(int frames)
boolean do_warning_dialogf(const char *fmt,...)
LIVES_GLOBAL_INLINE void do_autolives_needs_clips_error(void)
LiVESList * affected_layouts_map
map of layouts with errors
void reload_subs(int fileno)
void on_spin_end_value_changed(LiVESSpinButton *spinbutton, livespointer user_data)
char * get_palette_name_for_clip(int clipno)
lives_painter_surface_t * play_surface
void on_select_last_activate(LiVESMenuItem *menuitem, livespointer user_data)
void resize_widgets_for_monitor(boolean do_get_play_times)
#define LIVES_OSC_NOTIFY_CLIP_OPENED
sent after a clip is opened
void binding_cb(lives_callback_t cb_type, const char *msgstring, ulong id)
LiVESWidget * loop_continue
double pb_fps
current playback rate, may vary from fps, can be 0. or negative
char * get_extension(const char *filename)
boolean on_mouse_sel_update(LiVESWidget *widget, LiVESXEventMotion *event, livespointer user_data)
void lives_kill_subprocesses(const char *dirname, boolean kill_parent)
void rte_keymodes_restore(int nkeys)
int free_n_msgs(int frval)
boolean expose_vid_draw(LiVESWidget *widget, lives_painter_t *cr, livespointer psurf)
#define CURRENT_CLIP_IS_CLIPBOARD
ssize_t lives_write_buffered(int fd, const char *buf, ssize_t count, boolean allow_fail)
LiVESWidget * second_spinbutton
void unlock_loop_lock(void)
@ CANCEL_KEEP
user pressed 'Keep'
void on_fade_pressed(LiVESButton *button, livespointer user_data)
LiVESWidget * entry_achans
int lives_system(const char *com, boolean allow_error)
LiVESResponseType filter_cleanup(const char *trashdir, LiVESList **rec_list, LiVESList **rem_list, LiVESList **left_list)
lives_storage_status_t
disk/storage status values
void update_timer_bars(int posx, int posy, int width, int height, int which)
draw the timer bars
LiVESXDevice * mouse_device
unused for gtk+ < 3.0.0
void on_rev_clipboard_activate(LiVESMenuItem *menuitem, livespointer user_data)
_entryw * create_location_dialog(void)
boolean do_std_checks(const char *type_name, const char *type, size_t maxlen, const char *nreject)
LIVES_GLOBAL_INLINE weed_layer_t * weed_layer_free(weed_layer_t *layer)
frees pixel_data for a layer, then the layer itself
void on_slower_pressed(LiVESButton *button, livespointer user_data)
#define CLIP_HAS_AUDIO(clip)
char vid_load_dir[PATH_MAX]
void reget_afilesize(int fileno)
boolean suppress_layout_warnings
LiVESWidget * hour_spinbutton
void on_location_select(LiVESButton *button, livespointer user_data)
pthread_mutex_t exit_mutex
prevent multiple threads trying to run cleanup
LiVESWidget * cancel_button
void reverse_frame_index(int sfileno)
LiVESResponseType get_utf8_pref(const char *key, char *val, int maxlen)
pthread_mutex_t abuf_frame_mutex
used to synch audio buffer for generators
#define LIVES_FILE_SELECTION_VIDEO_AUDIO_MULTI
void on_fs_preview_clicked(LiVESWidget *widget, livespointer user_data)
void init_clipboard(void)
@ LMAP_ERROR_DELETE_FRAMES
uint64_t gen_unique_id(void)
void on_show_messages_activate(LiVESMenuItem *menuitem, livespointer user_data)
void *(* lives_funcptr_t)(void *)
#define LIVES_CDISK_REMOVE_ORPHAN_CLIPS
void do_invalid_subs_error(void)
boolean do_yesno_dialog(const char *text)
void on_mute_button_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESWidget * textview_fps
LIVES_GLOBAL_INLINE void do_bad_theme_import_error(const char *theme_file)
void subtitles_free(lives_clip_t *sfile)
volatile uint64_t rte
current max for VJ mode == 64 effects on fg clip
#define LIVES_FILE_EXT_SRT
void resize(double scale)
#define LIVES_FILENAME_NOCLEAN
boolean normalise_audio(int fnum, double start, double end, float thresh)
LiVESWidget * spinbutton_pb_fps
void on_vj_reset_activate(LiVESMenuItem *menuitem, livespointer user_data)
int clipstore[FN_KEYS - 1][2]
stored clips (bookmarks) [0] = clip, [1] = frame
void redraw_timeline(int clipno)
lives_painter_surface_t * raudio_drawable
int calc_frame_from_time3(int filenum, double time)
nearest frame rounded down, [1, frames+1]
LIVES_GLOBAL_INLINE void init_conversions(int intent)
void mt_sensitise(lives_mt *mt)
void on_record_perf_activate(LiVESMenuItem *menuitem, livespointer user_data)
char * get_menu_name(lives_clip_t *sfile, boolean add_setname)
boolean config_laud_draw(LiVESWidget *widget, LiVESXEventConfigure *event, livespointer user_data)
void do_read_failed_error_s(const char *s, const char *addinfo)
LiVESList * lives_list_delete_string(LiVESList *, const char *string) WARN_UNUSED
void on_select_to_end_activate(LiVESMenuItem *menuitem, livespointer user_data)
void get_play_times(void)
recalculate video / audio lengths and draw the timer bars
@ CANCEL_SOFT
just cancel in GUI (for keep, etc)
corresponds to one clip in the GUI
#define LIVES_FILE_EXT_BACKUP
void on_show_clipboard_info_activate(LiVESMenuItem *menuitem, livespointer user_data)
LIVES_GLOBAL_INLINE char * lives_concat_sep(char *st, const char *sep, char *x)
boolean is_processing
states
int last_transition_loops
LiVESList * layout_audio_is_affected(int clipno, double stime, double etime, LiVESList *xlays)
void report_bug_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESWidget * textview_fsize
void on_undo_activate(LiVESWidget *menuitem, livespointer user_data)
#define THEME_DETAIL_FXCOL
boolean lives_ask_permission(char **argv, int argc, int offs)
void clear_lmap_errors(void)
ssize_t lives_write(int fd, livesconstpointer buf, ssize_t count, boolean allow_fail)
void reset_message_area(void)
void activate_url(LiVESAboutDialog *about, const char *link, livespointer data)
lives_checkstatus_t has_convert
boolean config_event2(LiVESWidget *widget, LiVESXEventConfigure *event, livespointer user_data)
#define THEME_DETAIL_VIDCOL
boolean run_diskspace_dialog_idle(livespointer data)
boolean on_trim_audio_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESWidget * unlim_radiobutton
double stored_layout_audio
char * on_load_set_activate(LiVESMenuItem *menuitem, livespointer user_data)
frames_t stored_layout_frame
experimental for player
void unpaint_lines(lives_mt *mt)
lives_checkstatus_t has_youtube_dlc
#define PREF_VID_LOAD_DIR
void on_filechooser_cancel_clicked(LiVESWidget *widget)
#define FPS_MAX
maximum fps we will allow (double)
boolean deal_with_render_choice(boolean add_deinit)
void on_loop_cont_activate(LiVESMenuItem *menuitem, livespointer user_data)
lives_render_error_t render_events_cb(boolean dummy)
@ LIVES_STORAGE_STATUS_OVERFLOW
ulong open_file_sel(const char *file_name, double start_time, int frames)
#define EVENT_MARKER_RECORD_START
volatile ticks_t currticks
wall clock time, updated whenever lives_get_*_ticks is called
weed_plant_t * filter_map
boolean resize_message_area(livespointer data)
@ CANCEL_NO_PROPOGATE
cancel but keep opening
void on_load_vcd_ok_clicked(LiVESButton *button, livespointer user_data)
lives_cancel_type_t cancel_type
@ LMAP_ERROR_ALTER_FRAMES
volatile boolean ping_pong
LIVES_GLOBAL_INLINE boolean lives_proc_thread_cancel(lives_proc_thread_t tinfo)
boolean autoclean
remove temp files on shutdown / startup
const char * weed_palette_get_name(int pal)
#define LIVES_FILE_SELECTION_VIDEO_AUDIO
#define AUDIO_OPTS_FOLLOW_CLIPS
int asampsize
audio sample size in bits (8 or 16)
void aud_fade(int fileno, double startt, double endt, double startv, double endv)
fade in/fade out
boolean nervous
some VJ effects / toys
boolean opening_loc
opening location (streaming)
boolean subtitles_init(lives_clip_t *sfile, char *fname, lives_subtitle_type_t subtype)
volatile int agen_key
which fx key is generating audio [1 based] (or 0 for none)
lives_clipinfo_t * create_clip_info_window(int audio_channels, boolean is_mt)
boolean fps_reset_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer area_enum)
_entryw * create_rename_dialog(int type)
LiVESWidget * textview_vtime
void load_theme_images(void)
boolean expose_raud_draw(LiVESWidget *widget, lives_painter_t *cr, livespointer psurf)
LIVES_GLOBAL_INLINE void do_need_mplayer_mpv_dialog(void)
#define GEN_SPB_LINK(n, bit)
pthread_mutex_t vpp_stream_mutex
prevent from writing audio when stream is closing
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)
LIVES_GLOBAL_INLINE boolean do_reload_set_query(void)
#define SCRATCH_JUMP
jump and resync audio
char config_datadir[PATH_MAX]
kept in locale encoding (general config files) (default ~/.local/share/lives)
void save_layout_map(int *lmap, double *lmap_audio, const char *file, const char *dir)
#define DEF_FILE_PERMS
non-executable, is modified by the umask
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_GLOBAL_INLINE void do_nojack_rec_error(void)
void play_all(boolean from_menu)
LiVESWidgetColor mt_timecode_fg
@ LIVES_STORAGE_STATUS_CRITICAL
void on_cancel_opensel_clicked(LiVESButton *button, livespointer user_data)
LIVES_GLOBAL_INLINE boolean paste_enough_dlg(int lframe)
lives_undo_t undo_action
undo
void on_load_subs_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_lerrors_clear_clicked(LiVESButton *button, livespointer user_data)
void on_spin_start_value_changed(LiVESSpinButton *spinbutton, livespointer user_data)
#define CURRENT_CLIP_TOTAL_TIME
#define EXTRA_DETAILS_DIRSIZE
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...
void on_lerrors_delete_clicked(LiVESButton *button, livespointer user_data)
boolean youtube_select_format(lives_remote_clip_request_t *req)
#define DEFAULT_AUDIO_CHANS
void calc_maxspect(int rwidth, int rheight, int *cwidth, int *cheight)
LIVES_GLOBAL_INLINE const char * lives_strappendf(const char *string, int len, const char *fmt,...)
@ LMAP_ERROR_DELETE_AUDIO
void on_select_end_only_activate(LiVESMenuItem *menuitem, livespointer user_data)
#define LIVES_FILENAME_INUSE
char proj_load_dir[PATH_MAX]
void on_stop_activate(LiVESMenuItem *menuitem, livespointer user_data)
boolean clip_can_reverse(int clipno)
void on_sepwin_pressed(LiVESButton *button, livespointer user_data)
void on_show_file_comments_activate(LiVESMenuItem *menuitem, livespointer user_data)
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 ...
WEED_GLOBAL_INLINE int weed_channel_get_palette_yuv(weed_plant_t *channel, int *clamping, int *sampling, int *subspace)
#define LIVES_FILE_EXT_PROJECT
#define IS_NORMAL_CLIP(clip)
#define STYLE_1
turn on theming if set
LiVESResponseType do_error_dialogf(const char *fmt,...)
LIVES_GLOBAL_INLINE LiVESResponseType get_pref_from_file(const char *filename, const char *key, char *val, int maxlen)
#define LIVES_PREVIEW_TYPE_RANGE
void remove_layout_files(LiVESList *lmap)
const char * get_deinterlace_string(void)
LiVESWidget * p_loopbutton
LiVESWidget * minute_spinbutton
int lives_rm(const char *file)
#define PLUGIN_THEMES
smogrify handles the directory differently for themes
#define LIVES_FILE_SELECTION_AUDIO_ONLY
void on_toy_activate(LiVESMenuItem *menuitem, livespointer user_data)
ticks_t orignsecs
usecs at start of playback - ditto
void unfade_background(void)
int achans
number of audio channels (0, 1 or 2)
boolean show_sync_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer keybd)
void mt_prepare_for_playback(lives_mt *mt)
#define SCRATCH_BACK_EXTRA
void help_translate_activate(LiVESMenuItem *menuitem, livespointer user_data)
LiVESWidget * textview_rrate
frames_t * frame_index_copy(frames_t *findex, frames_t nframes, frames_t offset)
void unbuffer_lmap_errors(boolean add)
LIVES_GLOBAL_INLINE ticks_t lives_get_relative_ticks(ticks_t origsecs, ticks_t orignsecs)
LiVESWidget * delete_button
boolean pref_factory_float(const char *prefidx, float newval, boolean permanent)
boolean get_temp_handle(int index)
get a temp "handle" from disk.
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)
uint32_t get_signed_endian(boolean is_signed, boolean little_endian)
produce bitmapped value
#define LIVES_TV_CHANNEL1
boolean on_save_set_activate(LiVESWidget *widget, livespointer user_data)
#define MAINW_MSG_SIZE
mainw->msg bytesize
void unlock_set_file(const char *set_name)
boolean foreign
for external window capture
void load_end_image(int frame)
void on_preview_spinbutton_changed(LiVESSpinButton *spinbutton, livespointer user_data)
#define WARN_MASK_LAYOUT_POPUP
boolean is_legal_set_name(const char *set_name, boolean allow_dupes, boolean leeway)
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)
LIVES_GLOBAL_INLINE void do_no_autolives_error(void)
#define PREF_SHOW_TOOLBAR
int set_utf8_pref(const char *key, const char *value)
void on_open_utube_activate(LiVESMenuItem *menuitem, livespointer user_data)
boolean msg_area_configed
boolean get_new_handle(int index, const char *name)