10 #ifndef HAS_LIVES_EVENTS_H
11 #define HAS_LIVES_EVENTS_H
13 weed_plant_t *
append_frame_event(weed_plant_t *event_list, weed_timecode_t tc,
int numframes,
16 int filter_idx,
int num_in_tracks,
int key, weed_plant_t *inst)
WARN_UNUSED;
21 weed_plant_t *param,
void *init_event,
void **pchain)
WARN_UNUSED;
26 int *clips,
int *frames, weed_plant_t **shortcut)
WARN_UNUSED;
28 double time,
double vel);
37 weed_plant_t *
process_events(weed_plant_t *next_event,
boolean process_audio, weed_timecode_t curr_tc);
50 int count_events(weed_plant_t *event_list,
boolean all_events, weed_timecode_t start_tc, weed_timecode_t end_tc);
69 weed_plant_t *
get_frame_event_at(weed_plant_t *event_list, weed_timecode_t tc, weed_plant_t *shortcut,
boolean exact);
72 weed_plant_t *
get_audio_block_start(weed_plant_t *event_list,
int track, weed_timecode_t tc,
boolean seek_back);
89 #include <weed/weed-utils.h>
91 #include "../libweed/weed-utils.h"
102 weed_timecode_t tc, weed_plant_t **shortcut,
boolean bleedthru);
152 #define RENDER_CHOICE_DISCARD 0
153 #define RENDER_CHOICE_PREVIEW 1
154 #define RENDER_CHOICE_SAME_CLIP 2
155 #define RENDER_CHOICE_NEW_CLIP 3
156 #define RENDER_CHOICE_MULTITRACK 4
157 #define RENDER_CHOICE_EVENT_LIST 5
171 void **
filter_init_add_pchanges(weed_plant_t *event_list, weed_plant_t *filter, weed_plant_t *init_event,
int ntracks,
int leave);
174 boolean before_frames);
180 void insert_marker_event_at(weed_plant_t *event_list, weed_plant_t *at_event,
int marker_type, livespointer data);
188 boolean move_event_right(weed_plant_t *event_list, weed_plant_t *
event,
boolean can_stay,
double fps);
189 boolean move_event_left(weed_plant_t *event_list, weed_plant_t *
event,
boolean can_stay,
double fps);
191 void move_filter_init_event(weed_plant_t *event_list, weed_timecode_t new_tc, weed_plant_t *init_event,
double fps);
193 double fps,
boolean rescale_pchanges);
200 void replace_event(weed_plant_t *event_list, weed_plant_t *at_event,weed_plant_t *
event);
210 boolean is_init_pchange(weed_plant_t *init_event, weed_plant_t *pchange_event);
229 boolean has_frame_event_at(weed_plant_t *event_list, weed_timecode_t tc, weed_plant_t **shortcut);
232 #define EVENT_MARKER_BLOCK_START 1
233 #define EVENT_MARKER_BLOCK_UNORDERED 512
234 #define EVENT_MARKER_RECORD_START 1024
235 #define EVENT_MARKER_RECORD_END 1025
237 #define WEED_PLANT_IS_EVENT(plant) ((plant!=NULL&&weed_get_plant_type(plant)==WEED_PLANT_EVENT)?1:0)
238 #define WEED_PLANT_IS_EVENT_LIST(plant) ((plant!=NULL&&weed_get_plant_type(plant)==WEED_PLANT_EVENT_LIST)?1:0)
240 #define WEED_EVENT_IS_FRAME(event) (get_event_hint(event)==WEED_EVENT_HINT_FRAME?1:0)
241 #define WEED_EVENT_IS_AUDIO_FRAME(event) ((get_event_hint(event)==WEED_EVENT_HINT_FRAME&&weed_plant_has_leaf(event,"audio_clips"))?1:0)
242 #define WEED_EVENT_IS_FILTER_INIT(event) (get_event_hint(event)==WEED_EVENT_HINT_FILTER_INIT?1:0)
243 #define WEED_EVENT_IS_FILTER_DEINIT(event) (get_event_hint(event)==WEED_EVENT_HINT_FILTER_DEINIT?1:0)
244 #define WEED_EVENT_IS_FILTER_MAP(event) (get_event_hint(event)==WEED_EVENT_HINT_FILTER_MAP?1:0)
245 #define WEED_EVENT_IS_PARAM_CHANGE(event) (get_event_hint(event)==WEED_EVENT_HINT_PARAM_CHANGE?1:0)
246 #define WEED_EVENT_IS_MARKER(event) (get_event_hint(event)==WEED_EVENT_HINT_MARKER?1:0)
248 #endif // HAS_LIVES_EVENTS_H
LiVESWidget * spinbutton_width
Definition: events.h:119
weed_timecode_t event_list_get_end_tc(weed_plant_t *event_list)
Definition: events.c:4069
void remove_end_blank_frames(weed_plant_t *event_list, boolean remove_filter_inits)
Definition: events.c:423
boolean has_audio_frame(weed_plant_t *event_list)
Definition: events.c:4090
void remove_audio_for_track(weed_plant_t *event, int track)
Definition: events.c:1219
void *** get_event_pchains(void)
Definition: events.c:44
int achans
Definition: events.h:135
void replace_event(weed_plant_t *event_list, weed_plant_t *at_event, weed_plant_t *event)
Definition: events.c:249
weed_plant_t * get_filter_map_after(weed_plant_t *event, int ctrack)
Definition: events.c:680
void get_active_track_list(int *clip_index, int num_tracks, weed_plant_t *filter_map)
Definition: events.c:2894
LiVESWidget * spinbutton_fps
Definition: events.h:121
weed_plant_t * get_last_frame_event(weed_plant_t *event_list)
Definition: events.c:319
int asamps
Definition: events.h:136
boolean start_render_effect_events(weed_plant_t *event_list)
render to clip
Definition: events.c:3924
void remove_frame_from_event(weed_plant_t *event_list, weed_plant_t *event, int track)
Definition: events.c:368
weed_plant_t * get_first_frame_event(weed_plant_t *event_list)
Definition: events.c:305
void event_list_replace_events(weed_plant_t *event_list, weed_plant_t *new_event_list)
replace events in event_list with events in new_event_list
Definition: events.c:2235
void backup_host_tags(weed_plant_t *event_list, weed_timecode_t curr_tc)
Definition: events.c:1465
LiVESWidget * dialog
Definition: events.h:113
void insert_marker_event_at(weed_plant_t *event_list, weed_plant_t *at_event, int marker_type, livespointer data)
Definition: events.c:1292
int get_frame_event_frame(weed_plant_t *, int layer)
Definition: events.c:187
weed_plant_t * event_copy_and_insert(weed_plant_t *in_event, weed_plant_t *event_list)
called during quantisation
Definition: events.c:480
boolean init_event_is_process_last(weed_plant_t *event)
Definition: events.c:1601
void insert_filter_init_event_at(weed_plant_t *event_list, weed_plant_t *at_event, weed_plant_t *event)
Definition: events.c:889
void event_list_add_track(weed_plant_t *event_list, int layer)
Definition: events.c:2374
char * encoder_name
Definition: events.h:129
LiVESWidget * pertrack_checkbutton
Definition: events.h:122
double event_list_get_end_secs(weed_plant_t *event_list)
Definition: events.c:4074
void move_filter_init_event(weed_plant_t *event_list, weed_timecode_t new_tc, weed_plant_t *init_event, double fps)
Definition: events.c:1676
boolean insert_filter_map_event_at(weed_plant_t *event_list, weed_plant_t *at_event, weed_plant_t *event, boolean before_frames)
Definition: events.c:937
boolean filter_map_after_frame(weed_plant_t *fmap)
Definition: events.c:657
void unlink_event(weed_plant_t *event_list, weed_plant_t *event)
Definition: events.c:199
boolean move_event_left(weed_plant_t *event_list, weed_plant_t *event, boolean can_stay, double fps)
Definition: events.c:2007
LiVESWidget * always_hbox
Definition: events.h:125
boolean event_list_to_block(weed_plant_t *event_list, int num_events)
Definition: events.c:2245
boolean frame_event_has_frame_for_track(weed_plant_t *event, int track)
Definition: events.c:614
void add_init_event_to_filter_map(weed_plant_t *fmap, weed_plant_t *event, void **hints)
Definition: events.c:1625
weed_timecode_t get_event_timecode(weed_plant_t *)
Definition: events.c:49
weed_plant_t * append_filter_map_event(weed_plant_t *event_list, weed_timecode_t tc, void **init_events) WARN_UNUSED
Definition: events.c:2851
int get_audio_frame_clip(weed_plant_t *event, int track)
returns clip number for track (track==-1 is backing audio)
Definition: events.c:113
weed_plant_t * get_next_frame_event(weed_plant_t *event)
Definition: events.c:257
double event_list_get_start_secs(weed_plant_t *event_list)
Definition: events.c:4084
weed_plant_t * get_prev_audio_frame_event(weed_plant_t *event)
Definition: events.c:293
boolean is_encoding
Definition: events.h:132
boolean init_event_is_relevant(weed_plant_t *init_event, int ctrack)
Definition: events.c:720
double fps
Definition: events.h:111
weed_plant_t * get_frame_event_at(weed_plant_t *event_list, weed_timecode_t tc, weed_plant_t *shortcut, boolean exact)
Definition: events.c:637
void insert_filter_deinit_event_at(weed_plant_t *event_list, weed_plant_t *at_event, weed_plant_t *event)
Definition: events.c:913
LiVESWidget * backaudio_checkbutton
Definition: events.h:123
boolean ratio_fps
Definition: events.h:112
LiVESWidget * events_rec_dialog(boolean allow_mt)
Definition: events.c:2099
weed_timecode_t get_next_paramchange(void **pchange_next, weed_timecode_t end_tc)
Definition: events.c:443
int count_resampled_events(weed_plant_t *event_list, double fps)
Definition: events.c:4029
void insert_param_change_event_at(weed_plant_t *event_list, weed_plant_t *at_event, weed_plant_t *event)
Definition: events.c:989
boolean insert_event_before(weed_plant_t *at_event, weed_plant_t *event)
Definition: events.c:223
int width
Definition: events.h:109
boolean filter_init_has_owner(weed_plant_t *init_event, int track)
Definition: events.c:1445
render_details * rdet
Definition: events.h:142
LiVESWidget * spinbutton_height
Definition: events.h:120
weed_plant_t * insert_frame_event_at(weed_plant_t *event_list, weed_timecode_t tc, int numframes, int *clips, int *frames, weed_plant_t **shortcut) WARN_UNUSED
Definition: events.c:1020
weed_timecode_t event_list_get_start_tc(weed_plant_t *event_list)
Definition: events.c:4079
double get_audio_frame_seek(weed_plant_t *event, int track)
returns velocity for track (track==-1 is backing audio)
Definition: events.c:153
LiVESWidget * acodec_combo
Definition: events.h:117
void restore_host_tags(weed_plant_t *event_list, weed_timecode_t curr_tc)
Definition: events.c:1480
weed_plant_t * get_next_audio_frame_event(weed_plant_t *event)
Definition: events.c:281
boolean has_frame_event_at(weed_plant_t *event_list, weed_timecode_t tc, weed_plant_t **shortcut)
Definition: events.c:95
int get_event_hint(weed_plant_t *)
Definition: events.c:57
int get_frame_event_clip(weed_plant_t *, int layer)
Definition: events.c:175
boolean init_event_in_list(void **init_events, int num_inits, weed_plant_t *event)
Definition: events.c:1423
void move_filter_deinit_event(weed_plant_t *event_list, weed_timecode_t new_tc, weed_plant_t *deinit_event, double fps, boolean rescale_pchanges)
Definition: events.c:1786
void remove_filter_from_event_list(weed_plant_t *event_list, weed_plant_t *init_event)
Definition: events.c:1353
render_details * create_render_details(int type)
Definition: events.c:5050
weed_plant_t * append_param_change_event(weed_plant_t *event_list, weed_timecode_t tc, int pnum, weed_plant_t *param, void *init_event, void **pchain) WARN_UNUSED
Definition: events.c:2802
boolean enc_changed
Definition: events.h:128
void event_list_free(weed_plant_t *event_list)
Definition: events.c:2229
weed_plant_t * process_events(weed_plant_t *next_event, boolean process_audio, weed_timecode_t curr_tc)
RT playback.
Definition: events.c:2950
weed_timecode_t get_prev_paramchange(void **pchange_next, weed_timecode_t start_tc)
Definition: events.c:453
boolean deal_with_render_choice(boolean add_deinit)
Definition: events.c:4328
LiVESWidget * create_event_list_dialog(weed_plant_t *event_list, weed_timecode_t start_tc, weed_timecode_t end_tc)
Definition: events.c:4662
void event_list_close_start_gap(weed_plant_t *event_list)
int count_events(weed_plant_t *event_list, boolean all_events, weed_timecode_t start_tc, weed_timecode_t end_tc)
if all_events is FALSE we only count FRAME events
Definition: events.c:4010
ulong encoder_name_fn
Definition: events.h:126
LiVESWidget * ofmt_combo
Definition: events.h:116
void delete_event(weed_plant_t *event_list, weed_plant_t *event)
Definition: events.c:213
void insert_audio_event_at(weed_plant_t *event_list, weed_plant_t *event, int track, int clipnum, double time, double vel)
Definition: events.c:1123
void free_pchains(int key)
void ** filter_init_add_pchanges(weed_plant_t *event_list, weed_plant_t *filter, weed_plant_t *init_event, int ntracks, int leave)
Definition: events.c:2524
weed_plant_t * get_prev_frame_event(weed_plant_t *event)
Definition: events.c:269
void add_track_to_avol_init(weed_plant_t *filter, weed_plant_t *event, int nbtracks, boolean behind)
Definition: events.c:2307
weed_plant_t * get_filter_map_before(weed_plant_t *event, int ctrack, weed_plant_t *stop_event)
Definition: events.c:761
weed_plant_t * append_filter_deinit_event(weed_plant_t *event_list, weed_timecode_t tc, void *init_event, void **pchain) WARN_UNUSED
Definition: events.c:2756
boolean move_event_right(weed_plant_t *event_list, weed_plant_t *event, boolean can_stay, double fps)
Definition: events.c:1928
boolean is_blank_frame(weed_plant_t *, boolean count_audio)
Definition: events.c:402
int get_render_choice(void)
Definition: events.c:2092
LiVESWidget * encoder_combo
Definition: events.h:115
weed_plant_t * get_prev_event(weed_plant_t *event)
Definition: events.c:66
void ** get_init_events_before(weed_plant_t *event, weed_plant_t *init_event, boolean add)
Definition: events.c:802
LiVESWidget * always_checkbutton
Definition: events.h:124
boolean insert_event_after(weed_plant_t *at_event, weed_plant_t *event)
Definition: events.c:236
int height
Definition: events.h:110
weed_plant_t * get_last_event(weed_plant_t *event_list)
Definition: events.c:87
weed_plant_t * append_frame_event(weed_plant_t *event_list, weed_timecode_t tc, int numframes, int *clips, int *frames) WARN_UNUSED
Definition: events.c:2479
weed_plant_t * get_frame_event_at_or_before(weed_plant_t *event_list, weed_timecode_t tc, weed_plant_t *shortcut)
Definition: events.c:670
LiVESWidget * okbutton
Definition: events.h:114
int arate
Definition: events.h:134
boolean render_to_clip(boolean new_clip)
rendering
Definition: events.c:4103
double get_audio_frame_vel(weed_plant_t *event, int track)
returns velocity for track (track==-1 is backing audio)
Definition: events.c:130
weed_plant_t * append_filter_init_event(weed_plant_t *event_list, weed_timecode_t tc, int filter_idx, int num_in_tracks, int key, weed_plant_t *inst) WARN_UNUSED
Definition: events.c:2604
double * get_track_visibility_at_tc(weed_plant_t *event_list, int ntracks, int n_back_tracks, weed_timecode_t tc, weed_plant_t **shortcut, boolean bleedthru)
Definition: events.c:4488
weed_plant_t * get_audio_block_start(weed_plant_t *event_list, int track, weed_timecode_t tc, boolean seek_back)
Definition: events.c:334
int aendian
Definition: events.h:137
weed_plant_t * insert_blank_frame_event_at(weed_plant_t *event_list, weed_timecode_t tc, weed_plant_t **shortcut) WARN_UNUSED
Definition: events.c:1345
boolean suggestion_followed
Definition: events.h:130
LiVESWidget * acodec_entry
Definition: events.h:118
weed_plant_t * get_next_event(weed_plant_t *event)
Definition: events.c:73
ulong encoder_ofmt_fn
Definition: events.h:127
#define WARN_UNUSED
Definition: main.h:261
weed_plant_t * get_first_event(weed_plant_t *event_list)
Definition: events.c:80
void update_filter_maps(weed_plant_t *event, weed_plant_t *end_event, weed_plant_t *init_event)
Definition: events.c:876
boolean is_init_pchange(weed_plant_t *init_event, weed_plant_t *pchange_event)
Definition: events.c:463
weed_plant_t * append_marker_event(weed_plant_t *event_list, weed_timecode_t tc, int marker_type) WARN_UNUSED
Definition: events.c:1252