Go to the documentation of this file.
7 #ifndef HAS_LIVES_PLUGINS_H
8 #define HAS_LIVES_PLUGINS_H
21 #define PLUGIN_SUBTYPE_DLL "dll"
22 #define PLUGIN_SUBTYPE_BINARY "exe"
23 #define PLUGIN_SUBTYPE_SCRIPT "script"
25 #define PLUGIN_TYPE_DECODER "decoder"
26 #define PLUGIN_TYPE_ENCODER "encoder"
27 #define PLUGIN_TYPE_FILTER "filter"
28 #define PLUGIN_TYPE_SOURCE "source"
29 #define PLUGIN_TYPE_PLAYER "player"
31 #define PLUGIN_CHANNEL_NONE 0ul
32 #define PLUGIN_CHANNEL_VIDEO (1<<0)ul
33 #define PLUGIN_CHANNEL_AUDIO (1<<1)ul
34 #define PLUGIN_CHANNEL_TEXT (1<<2)ul
36 #define PLUGIN_CHANNEL_DATA (1<<32)ul
37 #define PLUGIN_CHANNEL_STREAM (1<<33)ul
38 #define PLUGIN_CHANNEL_TTY (1<<34)ul
39 #define PLUGIN_CHANNEL_FILE (1<<35)ul
67 #define VPP_CAN_RESIZE (1<<0)
68 #define VPP_CAN_RETURN (1<<1)
69 #define VPP_LOCAL_DISPLAY (1<<2)
70 #define VPP_LINEAR_GAMMA (1<<3)
71 #define VPP_CAN_RESIZE_WINDOW (1<<4)
72 #define VPP_CAN_LETTERBOX (1<<5)
73 #define VPP_CAN_CHANGE_PALETTE (1<<6)
94 LiVESList *
get_plugin_list(
const char *plugin_type,
boolean allow_nonex,
95 const char *plugdir,
const char *filter_ext);
98 #define PLUGIN_ENCODERS "encoders"
99 #define PLUGIN_DECODERS "decoders"
100 #define PLUGIN_VID_PLAYBACK "playback/video"
101 #define PLUGIN_AUDIO_STREAM "playback/audiostream"
103 #define AUDIO_STREAMER_NAME "audiostreamer.pl"
106 #define PLUGIN_THEMES "themes"
107 #define PLUGIN_THEMES_CUSTOM "custom/themes"
110 #define PLUGIN_EFFECTS_WEED "weed"
111 #define PLUGIN_WEED_FX_BUILTIN "effects/realtime/weed"
113 LiVESList *
get_plugin_result(
const char *command,
const char *delim,
boolean allow_blanks,
boolean strip);
114 LiVESList *
plugin_request(
const char *plugin_type,
const char *plugin_name,
const char *request);
118 LiVESList *
plugin_request_common(
const char *plugin_type,
const char *plugin_name,
const char *request,
const char *delim,
119 boolean allow_blanks);
121 #define VPP_DEFS_FILE "vpp_defaults"
129 const char *(*module_check_init)(void);
130 const char *(*version)(void);
131 const char *(*get_description)(void);
133 int *(*get_palette_list)(void);
138 weed_plant_t **play_params);
143 weed_plant_t *(*weed_setup)(weed_bootstrap_f);
145 uint64_t window_id,
int argc,
char **argv);
151 const char *(*get_init_rfx)(
int intention);
153 #ifdef __WEED_EFFECTS_H__
154 const weed_plant_t **(*get_play_params)(weed_bootstrap_f f);
159 int *(*get_yuv_palette_sampling)(
int palette);
160 int *(*get_yuv_palette_clamping)(
int palette);
161 int *(*get_yuv_palette_subspace)(
int palette);
167 int *(*get_audio_fmts)(void);
209 #define DEFAULT_VPP "openGL"
211 #define DEF_VPP_HSIZE DEF_FRAME_HSIZE_UNSCALED
212 #define DEF_VPP_VSIZE DEF_FRAME_VSIZE_UNSCALED
214 const weed_plant_t *
pp_get_param(weed_plant_t **pparams,
int idx);
215 const weed_plant_t *
pp_get_chan(weed_plant_t **pparams,
int idx);
219 #define FFMPEG_ENCODER_NAME "ffmpeg_encoder"
221 #define MULTI_ENCODER_NAME "multi_encoder"
222 #define MULTI_ENCODER3_NAME "multi_encoder3"
224 #define HI_THEORA_FORMAT "hi-theora"
225 #define HI_MPEG_FORMAT "hi-mpg"
226 #define HI_H_MKV_FORMAT "hi_h-mkv"
227 #define HI_H_AVI_FORMAT "hi_h-avi"
239 #define AUDIO_CODEC_MP3 0
240 #define AUDIO_CODEC_PCM 1
241 #define AUDIO_CODEC_MP2 2
242 #define AUDIO_CODEC_VORBIS 3
243 #define AUDIO_CODEC_AC3 4
244 #define AUDIO_CODEC_AAC 5
245 #define AUDIO_CODEC_AMR_NB 6
246 #define AUDIO_CODEC_RAW 7 // reserved
247 #define AUDIO_CODEC_WMA2 8
248 #define AUDIO_CODEC_OPUS 9
250 #define AUDIO_CODEC_MAX 31
252 #define AUDIO_CODEC_NONE 32
253 #define AUDIO_CODEC_UNKNOWN 33
257 #define HAS_RFX (1<<0)
259 #define CAN_ENCODE_PNG (1<<2)
260 #define ENCODER_NON_NATIVE (1<<3)
266 char of_restrict[1024];
312 #define LIVES_SEEK_FAST (1<<0)
313 #define LIVES_SEEK_FAST_REV (1<<1)
316 #define LIVES_SEEK_NEEDS_CALCULATION (1<<2)
317 #define LIVES_SEEK_QUALITY_LOSS (1<<3)
319 typedef struct _lives_clip_data {
337 char container_name[512];
386 char video_name[512];
394 char audio_name[512];
399 #define SYNC_HINT_AUDIO_TRIM_START (1<<0)
400 #define SYNC_HINT_AUDIO_PAD_START (1<<1)
401 #define SYNC_HINT_AUDIO_TRIM_END (1<<2)
402 #define SYNC_HINT_AUDIO_PAD_END (1<<3)
404 #define SYNC_HINT_VIDEO_PAD_START (1<<4)
405 #define SYNC_HINT_VIDEO_PAD_END (1<<5)
418 const char *(*version)(void);
441 const char *(*module_check_init)(void);
444 unsigned char **abuff);
469 #define PLUGIN_RENDERED_EFFECTS_BUILTIN "effects/rendered/"
472 #define PLUGIN_RENDERED_EFFECTS_CUSTOM "plugins/effects/rendered/custom/"
473 #define PLUGIN_RENDERED_EFFECTS_TEST "plugins/effects/rendered/test/"
476 #define PLUGIN_RENDERED_EFFECTS_BUILTIN_SCRIPTS "effects/RFXscripts/"
479 #define PLUGIN_RENDERED_EFFECTS_CUSTOM_SCRIPTS "plugins/effects/RFXscripts/custom/"
480 #define PLUGIN_RENDERED_EFFECTS_TEST_SCRIPTS "plugins/effects/RFXscripts/test/"
483 #define PLUGIN_RFX_SCRAP ""
488 #define MAX_PARAM_WIDGETS 128
490 #define RFX_MAX_NORM_WIDGETS 16
493 #define WIDGET_RB_IN 16
494 #define WIDGET_RB_OUT 17
495 #define WIDGET_RB_DUMMY 18
498 #define RFX_MAXSTRINGLEN (PATH_MAX - 1)
550 #define HIDDEN_UNDISPLAYABLE (1 << 0)
551 #define HIDDEN_GUI_PERM (1 << 1)
552 #define HIDDEN_MULTI (1 << 2)
554 #define HIDDEN_STRUCTURAL (0x00FF)
557 #define HIDDEN_NEEDS_REINIT (1 << 16)
558 #define HIDDEN_GUI_TEMP (1 << 17)
560 #define HIDDEN_TEMPORARY (0xFF00)
566 #define REINIT_FUNCTIONAL 1
567 #define REINIT_VISUAL 2
586 #define PVAL_MULTI_NONE 0
587 #define PVAL_MULTI_ANY 1
588 #define PVAL_MULTI_PER_CHANNEL 2
634 #define RFX_PROPS_SLOW 0x0001
635 #define RFX_PROPS_MAY_RESIZE 0x0002
636 #define RFX_PROPS_BATCHG 0x0004
638 #define RFX_PROPS_RESERVED1 0x1000
639 #define RFX_PROPS_RESERVED2 0x2000
640 #define RFX_PROPS_RESERVED3 0x4000
641 #define RFX_PROPS_AUTO_BUILT 0x8000
646 #define RFX_FLAGS_NO_SLIDERS 0x0001
647 #define RFX_FLAGS_NO_RESET 0x0002
653 char rfx_version[64];
694 #define FX_CANDIDATE_AUDIO_VOL 0
695 #define FX_CANDIDATE_RESIZER 1
696 #define FX_CANDIDATE_DEINTERLACE 2
698 #define MAX_FX_CANDIDATE_TYPES 3
int palette
width in pixels, but converted to macropixels for the player
void on_decplug_advanced_clicked(LiVESButton *button, livespointer user_data)
const char * name
plugin name
lives_param_special_t special_type
boolean vpp_try_match_palette(_vid_playback_plugin *vpp, weed_layer_t *layer)
LiVESList * plugin_request_by_space(const char *plugin_type, const char *plugin_name, const char *request)
void *(* memset_f)(void *, int, size_t)
@ RFX_STATUS_RENAME
indicates a copy operation to test
int api_version_major
version of interface API
LiVESList * get_plugin_result(const char *command, const char *delim, boolean allow_blanks, boolean strip)
int current_clip
plugin should init this to 0 if URI changes
lives_interlace_t interlace
const weed_plant_t * pp_get_param(weed_plant_t **pparams, int idx)
lives_param_t * weed_params_to_rfx(int npar, weed_plant_t *instance, boolean show_reinits)
_vid_playback_plugin * plugin
void module_unload(void)
this is called when module is unloaded
_vppaw * on_vpp_advanced_clicked(LiVESButton *, livespointer)
boolean set_yuv_palette_subspace(int subspace_type)
host sets the palette subspace (optional)
char * URI
the URI of this cdata
boolean onchange
is there a trigger ?
@ LIVES_PARAM_SPECIAL_TYPE_SCALEDPOINT
type may be used in framedraw
lives_rfx_status_t status
int * palettes
number forames from one keyframe to the next, 0 if unknown
uint64_t in_chan_types
channel types accepted
int current_palette
plugin should init this to palettes[0] if URI changes
char * name
the name of the executable (so we can run it !)
char * action_desc
for Weed "Applying $s"
int64_t rip_audio(const lives_clip_data_t *, const char *fname, int64_t stframe, int64_t nframes, unsigned char **abuff)
uint64_t capabilities
type specific capabilities
void *(* malloc_f)(size_t)
const weed_plant_t * pp_get_chan(weed_plant_t **pparams, int idx)
int offs_x
x and y offsets of picture within frame for primary pixel plane
char * menu_text
for Weed, this is the filter_class "name"
LiVESList * list
list of filter_idx from which user can delegate
char * plugin_run_param_window(const char *scrap_text, LiVESVBox *vbox, lives_rfx_t **ret_rfx)
create an interface window for a plugin; possibly run it, and return the parameters
void rfx_params_store_free(lives_rfx_t *, void **store)
@ LIVES_PARAM_SPECIAL_TYPE_MERGEALIGN
@ LIVES_INTENTION_DUPLICATE
void *(* realloc_f)(void *, size_t)
boolean chill_out(const lives_clip_data_t *cdata)
free buffers when we arent playing sequentially / on standby
boolean chill_decoder_plugin(int fileno)
@ RFX_STATUS_ANY
indicates free choice of statuses
@ LIVES_INTENTION_RESTORE
void set_colRGBA32_param(void *value, short red, short green, short blue, short alpha)
LiVESList * get_external_window_hints(lives_rfx_t *rfx)
get the interface hints set by a Weed filter in the filter_class.
void do_rfx_cleanup(lives_rfx_t *)
int dp
decimals, 0 for int and bool
lives_rfx_t * weed_to_rfx(weed_plant_t *plant, boolean show_reinits)
LiVESList * onchange_strings
rfxscript for constructing the params, param window and onchange triggers
_vid_playback_plugin * open_vid_playback_plugin(const char *name, boolean in_use)
void set_colRGB24_param(void *value, short red, short green, short blue)
LiVESList * plugin_request_common(const char *plugin_type, const char *plugin_name, const char *request, const char *delim, boolean allow_blanks)
void do_plugin_encoder_error(const char *plugin_name_or_null)
lives_clip_data_t * cdata
const weed_plant_t ** play_paramtmpls
short multi
multivalue type - single value, multi value, or per channel
void *(* calloc_f)(size_t, size_t)
@ LIVES_PARAM_SPECIAL_TYPE_SINGLEPOINT
type may be used in framedraw
@ LIVES_PARAM_SPECIAL_TYPE_RECT_DEMASK
type may be used in framedraw
@ LIVES_INTENTION_ANALYSE
void save_vpp_defaults(_vid_playback_plugin *, char *file)
@ LIVES_INTENTION_UNKNOWN
boolean set_fps(double fps)
double ctiming_ratio
a ctiming_ratio of 0. indicates that none of the other values are set.
double max
for string this is max characters
double get_double_param(void *value)
@ RFX_STATUS_WEED
indicates an internal RFX, created from a weed instance
void close_vid_playback_plugin(_vid_playback_plugin *)
@ LIVES_PARAM_SPECIAL_TYPE_FILEREAD
void set_double_param(void *value, double)
double kdecode_time
avg time to decode inter frame
boolean init_screen(int width, int height, boolean fullscreen, uint64_t window_id, int argc, char **argv)
ready the screen to play (optional)
int * rec_rowstrides
if non-NULL, plugin can set recommended vals, pointer to single value set by host
LiVESList * plugin_request(const char *plugin_type, const char *plugin_name, const char *request)
void param_copy(lives_param_t *dest, lives_param_t *src, boolean full)
void clip_data_free(lives_clip_data_t *)
free clip data - this should be called for each instance before unloading the module
void close_clip_decoder(int clipno)
weed_plant_t ** play_params
@ LIVES_PARAM_UNDISPLAYABLE
uint64_t out_chan_types
channel types produced
boolean check_encoder_restrictions(boolean get_extension, boolean user_audio, boolean save_all)
int64_t kframe_dist
frame number of first keyframe (usually 0)
void get_mime_type(char *text, int maxlen, const lives_clip_data_t *)
int YUV_sampling
plugin can change per frame
int frame_width
frame is the surrounding part, including any black border (>=width)
weed_plant_t ** alpha_chans
void exit_screen(int16_t mouse_x, int16_t mouse_y)
destroy the screen, return mouse to original posn., allow the host GUI to take over (optional)
lives_intentcaps_t * capabilities
for future use
int get_int_param(void *value)
boolean init_audio(int sample_rate, int nchans, int argc, char **argv)
newer style
double buffer_flush_time
avg time to decode keyframe
void ** store_rfx_params(lives_rfx_t *)
return an array of parameter values
boolean set_palette(int palette)
host sets the palette used
LiVESList * list
for string list (choices)
double kframe_inter_time
avg time to seek from keyframe to keyframe (const) :: default == 0. (use kframe_nseek_time)
@ LIVES_PARAM_SPECIAL_TYPE_NONE
void render_fx_get_params(lives_rfx_t *, const char *plugin_name, short status)
LiVESWidget * spinbuttonh
@ LIVES_INTENTION_EFFECT_REALTIME
int nclips
number of clips (titles) in container
float par
pixel aspect ratio (sample width / sample height)
boolean decoder_plugin_move_to_first(const char *name)
void vid_playback_plugin_exit(void)
boolean get_bool_param(void *value)
@ LIVES_PARAM_SPECIAL_TYPE_PASSWORD
@ LIVES_PARAM_SPECIAL_TYPE_RECT_MULTIRECT
type may be used in framedraw
int64_t jump_limit
for internal use
LiVESWidget * menuitem
the menu item which activates this effect
boolean set_rfx_param_by_name_string(lives_rfx_t *, const char *name, const char *value, boolean update_visual)
@ LIVES_PARAM_SPECIAL_TYPE_FONT_CHOOSER
_palette * palette
interface colour settings
double kframe_nseek_time
time to flush buffers after a seek
lives_decoder_sys_t * open_decoder_plugin(const char *plname)
@ LIVES_INTENTION_CONVERT
int delegate
offset in list of current delegate
#define MAX_PARAM_WIDGETS
max number of display widgets per parameter (currently 7 for transition param with mergealign - spin ...
@ LIVES_PARAM_SPECIAL_TYPE_FILEWRITE
void sort_rfx_array(lives_rfx_t *in_array, int num_elements)
void rip_audio_cleanup(const lives_clip_data_t *)
LiVESList * gui_strings
rfxscript for constructing the params, param window and onchange triggers
lives_rfx_t * rfx
pointer to rfx for current delegate (or NULL)
weed_plant_t weed_layer_t
boolean get_frame(const lives_clip_data_t *, int64_t frame, int *rowstrides, int height, void **pixel_data)
frame starts at 0
boolean render_audio_frame_float(float **audio, int nsamps)
void *(* memmove_f)(void *, const void *, size_t)
const lives_decoder_sys_t * decoder
LiVESWidget * spinbuttonw
int seek_flag
plugin can change per frame
LiVESList * plugin_request_with_blanks(const char *plugin_type, const char *plugin_name, const char *request)
void get_colRGBA32_param(void *value, lives_colRGBA64_t *rgba)
@ RFX_STATUS_BUILTIN
factory presets
boolean check_rfx_for_lives(lives_rfx_t *)
ulong func
menuitem activation function for current delegate
lives_plugin_id_t plugin_id
video playback plugin window - fixed part
void rfx_params_free(lives_rfx_t *)
@ RFX_STATUS_INTERNAL
used for parsing RFX scraps generated internally (will possiblky replace SCRAP)
@ RFX_STATUS_SCRAP
used for parsing RFX scraps from external apps
void * handle
may be shared between several instances
double kframe_kframe_time
avg extra time per iframe to arrive at following kframe
@ RFX_STATUS_TEST
test effects in the advanced menu
lives_param_t * find_rfx_param_by_name(lives_rfx_t *, const char *name)
double kframe_delay_time
avg time to seek to following keyframe (const)
lives_rfx_source_t source_type
lives_rfx_source_t source_type
int pl_version_major
version of plugin
boolean set_yuv_palette_clamping(int clamping_type)
host sets the palette sampling (optional)
void set_bool_param(void *value, boolean)
lives_decoder_t * clone_decoder(int fileno)
char * get_extension(const char *filename)
@ LIVES_INTENTION_TRANSCODE
@ LIVES_INTENTION_DOWNLOAD
LiVESList * load_decoders(void)
void set_int_param(void *value, int)
void * value
current value(s)
int frame_gamma
values WEED_GAMMA_UNKNOWN (0), WEED_GAMMA_SRGB (1), WEED_GAMMA_LINEAR (2)
void rfx_clean_exe(lives_rfx_t *rfx)
const lives_clip_data_t * get_decoder_cdata(int fileno, LiVESList *disabled, const lives_clip_data_t *fake_cdata)
int find_rfx_plugin_by_name(const char *name, short status)
void load_vpp_defaults(_vid_playback_plugin *, char *file)
LiVESList * array_to_string_list(char **array, int offset, int len)
@ LIVES_RFX_SOURCE_NEWCLIP
boolean get_rfx_param_by_name_string(lives_rfx_t *rfx, const char *name, char **return_value)
void * source
points to the source (e.g. a weed_plant_t)
int64_t get_best_audio(_vid_playback_plugin *)
boolean play_frame(weed_layer_t *frame, int64_t tc, weed_layer_t *ret)
updated version of render_frame: input is a weed_layer and timecode, if ret is non NULL,...
LiVESList * filter_encoders_by_img_ext(LiVESList *encoders, const char *img_ext)
LiVESList * get_plugin_list(const char *plugin_type, boolean allow_nonex, const char *plugdir, const char *filter_ext)
@ LIVES_PARAM_SPECIAL_TYPE_ASPECT_RATIO
void set_rfx_params_from_store(lives_rfx_t *rfx, void **store)
const char *const anames[AUDIO_CODEC_MAX]
boolean set_yuv_palette_sampling(int sampling_type)
host sets the palette sampling (optional)
void get_colRGB24_param(void *value, lives_colRGB48_t *rgb)
boolean render_frame(int hsize, int vsize, int64_t timecode, void **pixel_data, void **return_data, void **play_params)
display one frame, adding effects if you like, and resizing it to screen size if possible (VPP_CAN_RE...
void close_decoder_plugin(lives_decoder_t *)
@ RFX_STATUS_COPY
indicates a copy operation to test
float max_decode_fps
optional info ////////////////
void rfx_free(lives_rfx_t *)
@ LIVES_PARAM_STRING_LIST
LiVESList * plugin_request_by_line(const char *plugin_type, const char *plugin_name, const char *request)
void *(* memcpy_f)(void *, const void *, size_t)
capability * get_capabilities(void)
int min_frames
for Weed, 1
void unload_decoder_plugins(void)
void rfx_copy(lives_rfx_t *dest, lives_rfx_t *src, boolean full)
double kframe_extra_time
extra time to seek from kframe to kframe per iframe between them :: default == kframe_delay_time
@ RFX_STATUS_CUSTOM
custom effects in the custom menu