7#define NEED_ENDIAN_TEST
20#include <libOSC/libosc.h>
21#include <libOSC/OSC-client.h>
137boolean lives_osc_cb_saveset(
void *context,
int arglen,
const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra);
138boolean lives_osc_cb_play(
void *context,
int arglen,
const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra);
140boolean lives_osc_cb_clip_goto(
void *context,
int arglen,
const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra);
147 int newlen =
pad4(arglen);
157 int newlen = arglen + 4;
161 if (!IS_BIG_ENDIAN) {
162 (*str)[arglen] = (
unsigned char)((val & 0xFF000000) >> 3);
163 (*str)[arglen + 1] = (
unsigned char)((val & 0x00FF0000) >> 2);
164 (*str)[arglen + 2] = (
unsigned char)((val & 0x0000FF00) >> 1);
165 (*str)[arglen + 3] = (
unsigned char)(val & 0x000000FF);
174static int add_string_arg(
char **str,
int arglen,
const char *val) {
175 int newlen = arglen + strlen(val) + 1;
187static void ext_caller_return_int(
ulong caller_id,
int ret) {
195static void ext_caller_return_ulong(
ulong caller_id,
ulong ret) {
203static void ext_caller_return_string(
ulong caller_id,
const char *ret) {
223 while (list != NULL) {
225 int cnum = LIVES_POINTER_TO_INT(list->data);
228 if (uid == 0)
continue;
243 while (list != NULL) {
244 int cnum = LIVES_POINTER_TO_INT(list->data);
261 *vargs = lives_strdup(
",");
262 arglen =
padup(vargs, arglen);
265 ret =
lives_osc_cb_play(NULL, arglen, (
const void *)(*vargs), OSCTT_CurrentTime(), NULL);
285 if (consta == a)
return b;
290static int trans_constant(
int consta,
int domain) {
294 if (nconsta != consta)
return nconsta;
296 if (nconsta != consta)
return nconsta;
298 if (nconsta != consta)
return nconsta;
300 if (nconsta != consta)
return nconsta;
302 if (nconsta != consta)
return nconsta;
304 if (nconsta != consta)
return nconsta;
306 if (nconsta != consta)
return nconsta;
308 if (nconsta != consta)
return nconsta;
310 if (nconsta != consta)
return nconsta;
312 if (nconsta != consta)
return nconsta;
314 if (nconsta != consta)
return nconsta;
316 if (nconsta != consta)
return nconsta;
350 int fval = allvals[0];
374static boolean call_osc_show_info(livespointer text) {
384static boolean call_osc_show_blocking_info(livespointer data) {
386 int ret = LIVES_RESPONSE_INVALID;
387 msginfo *minfo = (msginfo *)data;
392 ext_caller_return_int(minfo->id, ret);
399static boolean call_osc_save_set(livespointer data) {
402 oscdata *oscd = (oscdata *)data;
406 ext_caller_return_int(oscd->id, (
int)ret);
407 lives_free((
char *) * ((
char **)(oscd->vargs)));
414static boolean call_file_choose_with_preview(livespointer data) {
415 LiVESWidget *chooser;
416 fprev *fdata = (fprev *)data;
418 char *fname = NULL, *rstr = NULL;
430 if (response == LIVES_RESPONSE_ACCEPT) {
433 if (fname == NULL) fname = lives_strdup(
"");
437 if (fdata->dir != NULL)
lives_free(fdata->dir);
438 if (fdata->title != NULL)
lives_free(fdata->title);
442 ext_caller_return_string(fdata->id, rstr);
445 if (fname != NULL) free(fname);
451static boolean call_choose_set(livespointer data) {
452 udata *ud = (udata *)data;
455 if (setname == NULL) setname = lives_strdup(
"");
456 ext_caller_return_string(ud->id, setname);
458 }
else ext_caller_return_string(ud->id,
"");
464static boolean call_set_set_name(livespointer data) {
470 }
else ext_caller_return_int(uid, (
int)ret);
475static boolean call_open_file(livespointer data) {
476 opfidata *opfi = (opfidata *)data;
480 if (opfi->fname != NULL)
lives_free(opfi->fname);
482 ext_caller_return_ulong(opfi->id, uid);
489static boolean call_reload_set(livespointer data) {
490 msginfo *mdata = (msginfo *)data;
491 boolean resp =
FALSE;
494 if (!strlen(mdata->msg)) {
497 if (mdata->msg == NULL) mdata->msg = lives_strdup(
"");
508 ext_caller_return_int(mdata->id, resp);
514static boolean call_set_interactive(livespointer data) {
515 sintdata *sint = (sintdata *)data;
519 ext_caller_return_int(sint->id,
TRUE);
520 }
else ext_caller_return_int(sint->id,
FALSE);
526static boolean call_set_sepwin(livespointer data) {
527 sintdata *sint = (sintdata *)data;
531 ext_caller_return_int(sint->id,
TRUE);
532 }
else ext_caller_return_int(sint->id,
FALSE);
538static boolean call_set_fullscreen(livespointer data) {
539 sintdata *sint = (sintdata *)data;
541 if (
mainw->
fs != sint->setting)
543 ext_caller_return_int(sint->id,
TRUE);
544 }
else ext_caller_return_int(sint->id,
FALSE);
550static boolean call_set_fullscreen_sepwin(livespointer data) {
551 sintdata *sint = (sintdata *)data;
555 if (
mainw->
fs != sint->setting)
557 ext_caller_return_int(sint->id,
TRUE);
558 }
else ext_caller_return_int(sint->id,
FALSE);
564static boolean call_set_ping_pong(livespointer data) {
565 sintdata *sint = (sintdata *)data;
569 ext_caller_return_int(sint->id,
TRUE);
570 }
else ext_caller_return_int(sint->id,
FALSE);
576static boolean call_set_pref_bool(livespointer data) {
577 bpref *bdata = (bpref *)data;
580 ext_caller_return_int(bdata->id,
TRUE);
581 }
else ext_caller_return_int(bdata->id,
FALSE);
588static boolean call_set_pref_int(livespointer data) {
589 ipref *idata = (ipref *)data;
592 ext_caller_return_int(idata->id,
TRUE);
593 }
else ext_caller_return_int(idata->id,
FALSE);
599static boolean call_set_pref_bitmapped(livespointer data) {
600 bmpref *bmdata = (bmpref *)data;
603 ext_caller_return_int(bmdata->id,
TRUE);
604 }
else ext_caller_return_int(bmdata->id,
FALSE);
610static boolean call_set_gravity(livespointer data) {
611 iipref *idata = (iipref *)data;
616 }
else ext_caller_return_int(idata->id,
FALSE);
622static boolean call_set_insert_mode(livespointer data) {
623 iipref *idata = (iipref *)data;
628 }
else ext_caller_return_int(idata->id,
FALSE);
634static boolean call_mt_set_track(livespointer data) {
635 iipref *idata = (iipref *)data;
640 ext_caller_return_int(idata->id,
TRUE);
641 }
else ext_caller_return_int(idata->id,
FALSE);
647static boolean call_insert_vtrack(livespointer data) {
648 ibpref *ibdata = (ibpref *)data;
653 ext_caller_return_int(ibdata->id, tnum);
654 }
else ext_caller_return_int(ibdata->id, -1);
660static boolean call_mt_set_track_label(livespointer data) {
661 lset *ldata = (lset *)data;
664 if (ldata->string == NULL) {
672 ext_caller_return_int(ldata->id,
TRUE);
673 }
else ext_caller_return_int(ldata->id,
FALSE);
674 if (ldata->string != NULL)
lives_free(ldata->string);
680static boolean call_set_if_mode(livespointer data) {
681 iipref *idata = (iipref *)data;
690 ext_caller_return_int(idata->id,
TRUE);
691 }
else ext_caller_return_int(idata->id,
FALSE);
697static boolean call_switch_clip(livespointer data) {
698 iipref *idata = (iipref *)data;
701 ext_caller_return_int(idata->id,
TRUE);
702 }
else ext_caller_return_int(idata->id,
FALSE);
708static boolean call_set_current_time(livespointer data) {
709 opfidata *idata = (opfidata *)data;
712 if (idata->stime >= 0.) {
721 ext_caller_return_int(idata->id,
TRUE);
722 }
else ext_caller_return_int(idata->id,
FALSE);
728static boolean call_set_current_audio_time(livespointer data) {
729 opfidata *idata = (opfidata *)data;
733 idata->stime >= 0. && idata->stime <=
cfile->laudio_time) {
735 ext_caller_return_int(idata->id,
TRUE);
736 }
else ext_caller_return_int(idata->id,
FALSE);
742static boolean call_unmap_effects(livespointer data) {
746 ext_caller_return_int(
id,
TRUE);
747 }
else ext_caller_return_int(
id,
FALSE);
752static boolean call_stop_playback(livespointer data) {
756 ext_caller_return_int(
id,
TRUE);
757 }
else ext_caller_return_int(
id,
FALSE);
762static boolean call_quit_app(livespointer data) {
776static boolean call_map_effect(livespointer data) {
777 fxmapdata *fxdata = (fxmapdata *)data;
781 ext_caller_return_int(fxdata->id, (
error == 0));
783 }
else ext_caller_return_int(fxdata->id,
FALSE);
789static boolean call_unmap_effect(livespointer data) {
790 fxmapdata *fxdata = (fxmapdata *)data;
794 ext_caller_return_int(fxdata->id,
TRUE);
795 }
else ext_caller_return_int(fxdata->id,
FALSE);
801static boolean call_fx_setmode(livespointer data) {
802 fxmapdata *fxdata = (fxmapdata *)data;
805 ext_caller_return_int(fxdata->id, (
int)ret);
806 }
else ext_caller_return_int(fxdata->id,
FALSE);
812static boolean call_wipe_layout(livespointer data) {
813 iblock *fxdata = (iblock *)data;
814 boolean force = fxdata->ign_sel;
815 char *lname = lives_strdup(
"");
828 ext_caller_return_string(fxdata->id, lname);
835static boolean call_choose_layout(livespointer data) {
836 iblock *fxdata = (iblock *)data;
837 char *lname = lives_strdup(
"");
841 if (lname == NULL) lname = lives_strdup(
"");
843 ext_caller_return_string(fxdata->id, lname);
850static boolean call_render_layout(livespointer data) {
851 iblock *bdata = (iblock *)data;
864 if (ret) uid = new_uid;
870 ext_caller_return_ulong(bdata->id, uid);
876static boolean call_reload_layout(livespointer data) {
877 msginfo *mdata = (msginfo *)data;
878 boolean resp =
FALSE;
880 if (!strlen(mdata->msg)) {
883 if (mdata->msg == NULL) mdata->msg = lives_strdup(
"");
892 ext_caller_return_int(mdata->id, resp);
898static boolean call_save_layout(livespointer data) {
899 msginfo *mdata = (msginfo *)data;
900 boolean resp =
FALSE;
902 char *lname = lives_strdup(
"");
905 if (mdata->msg != NULL) {
917 ext_caller_return_string(mdata->id, lname);
924static boolean call_set_current_fps(livespointer data) {
925 opfidata *idata = (opfidata *)data;
928 ext_caller_return_int(idata->id, (
int)
TRUE);
929 }
else ext_caller_return_int(idata->id, (
int)
FALSE);
935static boolean call_set_current_frame(livespointer data) {
936 ibpref *bdata = (ibpref *)data;
949 *vargs = lives_strdup(
",i");
950 arglen =
padup(vargs, arglen);
958 ext_caller_return_int(bdata->id, (
int)ret);
966static boolean call_select_all(livespointer data) {
967 iipref *idata = (iipref *)data;
968 int cnum = idata->val;
982 ext_caller_return_int(idata->id, (
int)
TRUE);
983 }
else ext_caller_return_int(idata->id, (
int)
FALSE);
984 }
else ext_caller_return_int(idata->id, (
int)
FALSE);
990static boolean call_select_start(livespointer data) {
991 iipref *idata = (iipref *)data;
993 int cnum = idata->val;
994 int frame = idata->integ;
1004 if (sfile->
end < frame) sfile->
end = frame;
1005 sfile->
start = frame;
1008 ext_caller_return_int(idata->id, (
int)
TRUE);
1009 }
else ext_caller_return_int(idata->id, (
int)
FALSE);
1010 }
else ext_caller_return_int(idata->id, (
int)
FALSE);
1016static boolean call_select_end(livespointer data) {
1017 iipref *idata = (iipref *)data;
1019 int cnum = idata->val;
1020 int frame = idata->integ;
1021 if (
mainw != NULL) {
1030 if (sfile->
start > frame) sfile->
start = frame;
1034 ext_caller_return_int(idata->id, (
int)
TRUE);
1035 }
else ext_caller_return_int(idata->id, (
int)
FALSE);
1036 }
else ext_caller_return_int(idata->id, (
int)
FALSE);
1042static boolean call_insert_block(livespointer data) {
1043 iblock *idata = (iblock *)data;
1045 boolean ign_ins_sel;
1065 ext_caller_return_ulong(idata->id, block_uid);
1066 }
else ext_caller_return_ulong(idata->id, 0l);
1072static boolean call_remove_block(livespointer data) {
1073 mblockdata *rdata = (mblockdata *)data;
1079 if (oblock != rdata->block)
mainw->
multitrack->block_selected = oblock;
1080 ext_caller_return_int(rdata->id, (
int)
TRUE);
1081 }
else ext_caller_return_int(rdata->id, (
int)
FALSE);
1087static boolean call_move_block(livespointer data) {
1088 mblockdata *mdata = (mblockdata *)data;
1093 ulong block_uid = mdata->block->uid;
1096 if (nblock == NULL) ext_caller_return_int(mdata->id, (
int)
FALSE);
1098 nblock->uid = block_uid;
1099 ext_caller_return_int(mdata->id, (
int)
TRUE);
1107static boolean call_fx_enable(livespointer data) {
1108 fxmapdata *fxdata = (fxmapdata *)data;
1109 boolean nstate = (
boolean)fxdata->mode;
1110 boolean ret =
FALSE;
1114 int effect_key = fxdata->key;
1120 if (filter == NULL) ret =
FALSE;
1126 ext_caller_return_int(fxdata->id, (
int)
TRUE);
1142 ext_caller_return_int(fxdata->id, (
int)ret);
1148static boolean call_set_loop_mode(livespointer data) {
1149 iipref *idata = (iipref *)data;
1150 int lmode = idata->val;
1165 ext_caller_return_int(idata->id, (
int)
TRUE);
1166 }
else ext_caller_return_int(idata->id, (
int)
FALSE);
1172static boolean call_resync_fps(livespointer data) {
1173 iipref *idata = (iipref *)data;
1176 ext_caller_return_int(idata->id, (
int)
TRUE);
1177 }
else ext_caller_return_int(idata->id, (
int)
FALSE);
1183static boolean call_cancel_proc(livespointer data) {
1184 iipref *idata = (iipref *)data;
1187 ext_caller_return_int(idata->id, (
int)
FALSE);
1190 ext_caller_return_int(idata->id, (
int)
TRUE);
1205 if (text == NULL)
return FALSE;
1206 if (!blocking)
lives_idle_add(call_osc_show_info, (livespointer)text);
1208 msginfo *minfo = (msginfo *)
lives_malloc(
sizeof(msginfo));
1209 minfo->msg = lives_strdup(text);
1211 lives_idle_add(call_osc_show_blocking_info, (livespointer)minfo);
1257 if (label != NULL) data->string = lives_strdup(label);
1258 else data->string = NULL;
1271 data->val = in_front;
1298 time >= 0. && time <= cfile->laudio_time) {
1334 pthread_join(*gtk_thread, NULL);
1352 *vargs = lives_strdup(
",si");
1353 arglen =
padup(vargs, arglen);
1354 arglen = add_string_arg(vargs, arglen, name);
1355 arglen =
add_int_arg(vargs, arglen, force_append);
1359 data->arglen = arglen;
1360 data->vargs = vargs;
1377 if (dirname != NULL && strlen(dirname) > 0) data->dir = lives_strdup(dirname);
1378 else data->dir = NULL;
1380 if (title != NULL && strlen(title) > 0) data->title = lives_strdup(title);
1381 else data->title = NULL;
1383 data->preview_type = preview_type;
1384 lives_idle_add(call_file_choose_with_preview, (livespointer)data);
1419 if (fname == NULL || strlen(fname) == 0)
return FALSE;
1423 data->fname = lives_strdup(fname);
1424 data->stime = stime;
1425 data->frames = frames;
1440 if (setname == NULL)
return FALSE;
1446 data->msg = lives_strdup(setname);
1460 data->setting = setting;
1473 data->setting = setting;
1486 data->setting = setting;
1499 data->setting = setting;
1512 data->setting = setting;
1605 data->mode = setting;
1622 data->prefidx = lives_strdup(prefidx);
1638 data->prefidx = lives_strdup(prefidx);
1654 data->prefidx = lives_strdup(prefidx);
1655 data->bitfield = bitfield;
1671 data->val = (int)mode;
1687 data->clip = clipno;
1688 data->ign_sel = ign_sel;
1689 data->with_audio = with_audio;
1705 if (tr == NULL)
return FALSE;
1725 if (tr == NULL)
return FALSE;
1730 if (time < 0.)
return FALSE;
1735 data->track = track;
1751 data->ign_sel = force;
1783 data->msg = lives_strdup(lname);
1799 if (lname != NULL) data->msg = lives_strdup(lname);
1800 else data->msg = NULL;
1815 data->with_audio = with_aud;
1816 data->ign_sel = normalise_aud;
1850 data->integ = frame;
1867 data->integ = frame;
1895 data->integ = frame;
boolean resync_audio(double frameno)
resync audio playback to the current video frame
#define is_realtime_aplayer(ptype)
boolean on_save_set_activate(LiVESWidget *widget, livespointer user_data)
void end_fs_preview(void)
void on_loop_button_activate(LiVESMenuItem *menuitem, livespointer user_data)
boolean reload_set(const char *set_name)
void on_full_screen_pressed(LiVESButton *button, livespointer user_data)
void on_sepwin_pressed(LiVESButton *button, livespointer user_data)
void on_filechooser_cancel_clicked(LiVESWidget *widget)
void switch_clip(int type, int newclip, boolean force)
void on_select_all_activate(LiVESWidget *widget, livespointer user_data)
boolean fps_reset_callback(LiVESAccelGroup *group, LiVESWidgetObject *obj, uint32_t keyval, LiVESXModifierType mod, livespointer area_enum)
void lives_exit(int signum)
void on_cancel_keep_button_clicked(LiVESButton *button, livespointer user_data)
char * on_load_set_activate(LiVESMenuItem *menuitem, livespointer user_data)
void on_stop_activate(LiVESMenuItem *menuitem, livespointer user_data)
LIVES_GLOBAL_INLINE LiVESResponseType do_info_dialog(const char *text)
int rte_key_getmaxmode(int key)
returns highest mode which is set
char * make_weed_hashname(int filter_idx, boolean fullname, boolean use_extra_authors, char sep, boolean subs)
return value should be freed after use
boolean rte_keymode_valid(int key, int mode, boolean is_userkey)
returns TRUE if a filter_class is bound to key/mode, is_userkey should be set to TRUE
int rte_key_getmode(int key)
returns current active mode for a key (or -1)
weed_plant_t * rte_keymode_get_filter(int key, int mode)
returns filter_class bound to key/mode (or NULL)
int rte_switch_keymode(int key, int mode, const char *hashname)
int enabled_in_channels(weed_plant_t *plant, boolean count_repeats)
int * weed_get_indices_from_template(const char *pkg, const char *fxname, const char *auth, int version)
generate a list of filter indices from a given template.
boolean rte_key_setmode(int key, int newmode)
newmode has two special values, -1 = cycle forwards, -2 = cycle backwards key is 1 based,...
LIVES_GLOBAL_INLINE int rte_getmodespk(void)
LIVES_GLOBAL_INLINE boolean rte_key_toggle(int key)
LIVES_GLOBAL_INLINE boolean rte_key_is_enabled(int key)
void set_interactive(boolean interactive)
double lives_ce_update_timeline(int frame, double x)
pointer position in timeline
LiVESWidget * choose_file_with_preview(const char *dir, const char *title, char **const filt, int filesel_type)
#define LIVES_FILE_SELECTION_AUDIO_ONLY
#define LIVES_FILE_SELECTION_VIDEO_AUDIO
boolean idle_remove_block(ulong uid, ulong id)
boolean idle_mt_set_track(int tnum, ulong id)
boolean idle_reload_layout(const char *lname, ulong id)
boolean idle_set_interactive(boolean setting, ulong id)
boolean lives_osc_cb_play(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra)
int padup(char **str, int arglen)
osc utils
int get_first_fx_matched(const char *package, const char *fxname, const char *author, int version)
boolean idle_set_current_audio_time(double time, ulong id)
ulong * get_unique_ids(void)
utility functions for liblives /////
boolean idle_fx_setmode(int key, int mode, ulong id)
boolean start_player(void)
boolean idle_set_loop_mode(int mode, ulong id)
boolean idle_select_all(int cnum, ulong id)
boolean idle_set_gravity(int grav, ulong id)
boolean idle_insert_vtrack(boolean in_front, ulong id)
boolean get_rte_key_is_enabled(int key)
boolean idle_select_start(int cnum, int frame, ulong id)
boolean idle_show_info(const char *text, boolean blocking, ulong id)
idlefunc hooks
boolean idle_set_current_time(double time, ulong id)
boolean lives_osc_cb_clip_goto(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra)
boolean idle_set_sepwin(boolean setting, ulong id)
boolean idle_insert_block(int clipno, boolean ign_sel, boolean with_audio, ulong id)
boolean idle_wipe_layout(boolean force, ulong id)
boolean idle_set_current_frame(int frame, boolean bg, ulong id)
boolean idle_quit(pthread_t *gtk_thread)
int get_current_mode_for_key(int key)
boolean idle_render_layout(boolean with_aud, boolean normalise_aud, ulong id)
boolean idle_switch_clip(int type, int cnum, ulong id)
boolean idle_set_pref_int(const char *prefidx, int val, ulong id)
boolean idle_move_block(ulong uid, int track, double time, ulong id)
boolean idle_set_ping_pong(boolean setting, ulong id)
boolean idle_save_layout(const char *lname, ulong id)
LIVES_LOCAL_INLINE int trans_rev(int consta, int a, int b)
boolean idle_set_fullscreen_sepwin(boolean setting, ulong id)
boolean idle_save_set(const char *name, boolean force_append, ulong id)
boolean idle_fx_enable(int key, boolean setting, ulong id)
boolean idle_unmap_effects(ulong id)
boolean idle_set_insert_mode(int mode, ulong id)
boolean idle_set_current_fps(double fps, ulong id)
boolean idle_choose_layout(ulong id)
boolean idle_choose_set(ulong id)
boolean idle_reload_set(const char *setname, ulong id)
boolean idle_set_pref_bitmapped(const char *prefidx, int bitfield, boolean val, ulong id)
boolean idle_map_fx(int key, int mode, int idx, ulong id)
boolean idle_cancel_proc(ulong id)
boolean idle_set_track_label(int tnum, const char *label, ulong id)
boolean idle_set_set_name(ulong id)
boolean idle_resync_fps(ulong id)
boolean idle_select_end(int cnum, int frame, ulong id)
boolean lives_osc_cb_saveset(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra)
extern functions with no headers
boolean idle_set_pref_bool(const char *prefidx, boolean val, ulong id)
boolean idle_open_file(const char *fname, double stime, int frames, ulong id)
boolean idle_stop_playback(ulong id)
@ const_domain_insert_mode
int cnum_for_uid(ulong uid)
boolean idle_set_if_mode(lives_interface_mode_t mode, ulong id)
int get_num_mapped_modes_for_key(int key)
boolean idle_unmap_fx(int key, int mode, ulong id)
boolean lives_osc_cb_bgclip_goto(void *context, int arglen, const void *vargs, OSCTimeTag when, NetworkReturnAddressPtr ra)
boolean idle_set_fullscreen(boolean setting, ulong id)
boolean idle_choose_file_with_preview(const char *dirname, const char *title, int preview_type, ulong id)
int add_int_arg(char **str, int arglen, int val)
track_rect * find_block_by_uid(lives_mt *mt, ulong uid)
void binding_cb(lives_callback_t cb_type, const char *msgstring, ulong id)
Header file for liblives.
@ LIVES_FILE_CHOOSER_VIDEO_AUDIO
file chooser options for single video or audio file
lives_interface_mode_t
LiVES operation mode.
@ LIVES_INTERFACE_MODE_MULTITRACK
multitrack mode
@ LIVES_INTERFACE_MODE_CLIPEDIT
clip editor mode
@ LIVES_INSERT_MODE_NORMAL
@ LIVES_CALLBACK_CLIP_CLOSED
sent after a clip is closed
@ LIVES_CALLBACK_APP_QUIT
sent when app quits
@ LIVES_CALLBACK_FRAME_SYNCH
sent when a frame is displayed
@ LIVES_CALLBACK_RECORD_STARTED
sent when record starts (TODO)
@ LIVES_CALLBACK_CLIPSET_OPENED
sent after a clip set is opened
@ LIVES_CALLBACK_CLIPSET_SAVED
sent after a clip set is closed
@ LIVES_CALLBACK_CLIP_OPENED
sent after a clip is opened
@ LIVES_CALLBACK_RECORD_STOPPED
sent when record stops (TODO)
@ LIVES_CALLBACK_PLAYBACK_STARTED
sent when a/v playback starts or clip is switched
@ LIVES_CALLBACK_PLAYBACK_STOPPED_RD
@ LIVES_CALLBACK_MODE_CHANGED
sent when interface mode changes
@ LIVES_CALLBACK_PRIVATE
for internal use
@ LIVES_CALLBACK_PLAYBACK_STOPPED
sent when a/v playback ends sent when a/v playback ends and there is recorded data for rendering/prev...
@ LIVES_GRAVITY_LEFT
inserted blocks gravitate to the left
@ LIVES_GRAVITY_RIGHT
inserted blocks gravitate to the right
@ LIVES_GRAVITY_NORMAL
no gravity
@ LIVES_LOOP_MODE_FIT_AUDIO
video keeps looping until audio playback finishes
@ LIVES_LOOP_MODE_CONTINUOUS
both video and audio loop continuously
@ LIVES_LOOP_MODE_NONE
no looping
@ LIVES_DIALOG_RESPONSE_RESET
Reset button clicked.
@ LIVES_DIALOG_RESPONSE_NO
No button clicked.
@ LIVES_DIALOG_RESPONSE_RETRY
Retry button clicked.
@ LIVES_DIALOG_RESPONSE_OK
OK button clicked.
@ LIVES_DIALOG_RESPONSE_ACCEPT
Accept button clicked.
@ LIVES_DIALOG_RESPONSE_YES
Yes button clicked.
@ LIVES_DIALOG_RESPONSE_INVALID
INVALID response.
@ LIVES_DIALOG_RESPONSE_ABORT
Abort button clicked.
@ LIVES_DIALOG_RESPONSE_CANCEL
Cancel button clicked.
@ LIVES_DIALOG_RESPONSE_SHOW_DETAILS
Show details button clicked.
@ LIVES_DIALOG_RESPONSE_NONE
Response not obtained.
error("LSD_RANDFUNC(ptr, size) must be defined")
ulong open_file_sel(const char *file_name, double start_time, int frames)
#define LIVES_LOCAL_INLINE
boolean is_legal_set_name(const char *set_name, boolean allow_dupes, boolean leeway)
#define CLIP_TOTAL_TIME(clip)
boolean mt_track_is_audio(lives_mt *mt, int ntrack)
return TRUE if ntrack is a valid backing audio track
char * get_eload_filename(lives_mt *mt, boolean allow_auto_reload)
void mt_tl_move(lives_mt *mt, double pos)
void mt_clip_select(lives_mt *mt, boolean scroll)
boolean mt_track_is_video(lives_mt *mt, int ntrack)
return TRUE if ntrack is a valid video track
boolean multitrack_insert(LiVESMenuItem *menuitem, livespointer user_data)
int add_video_track_behind(LiVESMenuItem *menuitem, livespointer user_data)
void set_timeline_end_secs(lives_mt *mt, double secs)
boolean on_render_activate(LiVESMenuItem *menuitem, livespointer user_data)
void track_select(lives_mt *mt)
must call after setting mt->current_track
void wipe_layout(lives_mt *mt)
void update_insert_mode(lives_mt *mt)
lives_mt * multitrack(weed_plant_t *event_list, int orig_file, double fps)
create and return lives_mt struct
track_rect * move_block(lives_mt *mt, track_rect *block, double timesecs, int old_track, int new_track)
boolean multitrack_delete(lives_mt *mt, boolean save_layout)
void delete_block_cb(LiVESMenuItem *menuitem, livespointer user_data)
int get_track_for_block(track_rect *block)
return track number for a given block
boolean on_save_event_list_activate(LiVESMenuItem *menuitem, livespointer user_data)
boolean on_load_event_list_activate(LiVESMenuItem *menuitem, livespointer user_data)
void set_track_label_string(lives_mt *mt, int track, const char *label)
boolean set_new_set_name(lives_mt *mt)
boolean check_for_layout_del(lives_mt *mt, boolean exiting)
ulong mt_get_last_block_uid(lives_mt *mt)
get index of last inserted (wallclock time) block for track
int add_video_track_front(LiVESMenuItem *menuitem, livespointer user_data)
boolean on_multitrack_activate(LiVESMenuItem *menuitem, weed_plant_t *event_list)
menuitem callback
void update_grav_mode(lives_mt *mt)
void on_rename_track_activate(LiVESMenuItem *menuitem, livespointer user_data)
@ INSERT_MODE_NORMAL
the default (only insert if it fits)
#define LIVES_OSC_NOTIFY_RECORD_STARTED
sent when record starts (TODO)
#define LIVES_OSC_NOTIFY_CLIP_OPENED
sent after a clip is opened
#define LIVES_OSC_NOTIFY_MODE_CHANGED
mode changed to clip editor or to multitrack
#define LIVES_OSC_NOTIFY_CLIPSET_SAVED
sent after a clip set is closed
#define LIVES_OSC_NOTIFY_QUIT
sent when app quits
#define LIVES_OSC_NOTIFY_RECORD_STOPPED
sent when record stops (TODO)
#define LIVES_OSC_NOTIFY_CLIPSET_OPENED
sent after a clip set is opened
#define LIVES_OSC_NOTIFY_CLIP_CLOSED
sent after a clip is closed
#define LIVES_OSC_NOTIFY_FRAME_SYNCH
sent when a frame is displayed
#define LIVES_OSC_NOTIFY_PLAYBACK_STOPPED_RD
sent when a/v playback ends and there is recorded data for rendering/previewing
#define LIVES_OSC_NOTIFY_PLAYBACK_STOPPED
sent when a/v playback ends
#define LIVES_OSC_NOTIFY_PLAYBACK_STARTED
sent when a/v playback starts or clip is switched
boolean pref_factory_bitmapped(const char *prefidx, int bitfield, boolean newval, boolean permanent)
boolean pref_factory_int(const char *prefidx, int newval, boolean permanent)
boolean pref_factory_bool(const char *prefidx, boolean newval, boolean permanent)
void on_clear_clicked(LiVESButton *button, livespointer user_data)
boolean on_clear_all_clicked(LiVESButton *button, livespointer user_data)
corresponds to one clip in the GUI
frames_t frames
number of video frames
uint64_t unique_id
this and the handle can be used to uniquely id a file
LiVESWidget * loop_ping_pong
int osc_auto
bypass user choices automatically
boolean no_exit
if TRUE, do not exit after saving set
boolean only_close
only close clips - do not exit
volatile uint64_t rte
current max for VJ mode == 64 effects on fg clip
char recent_file[PATH_MAX]
lives_clip_t * files[MAX_FILES+1]
+1 for the clipboard
volatile boolean loop_cont
LiVESList * cliplist
hash table of clips in menu order
pthread_mutex_t clip_list_mutex
prevent adding/removing to cliplist while another thread could be reading it
LiVESWidget * spinbutton_pb_fps
LiVESWidget * spinbutton_end
boolean leave_files
TRUE to leave clip files on disk even when closing (default FALSE)
LiVESWidget * spinbutton_start
lives_mt * multitrack
holds a pointer to the entire multitrack environment; NULL in Clip Edit mode
volatile boolean ping_pong
boolean is_processing
states
uint32_t last_grabbable_effect
char stored_layout_name[PATH_MAX]
int playing_file
which number file we are playing (or -1) [generally mainw->current_file]
weed_event_t * event_list
current event_list, for recording
LiVESWidget * cancel_button
#define lives_strdup_printf(fmt,...)
const char * version(void)