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)
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"
113LiVESList *
get_plugin_result(
const char *command,
const char *delim,
boolean allow_blanks,
boolean strip);
114LiVESList *
plugin_request(
const char *plugin_type,
const char *plugin_name,
const char *request);
118LiVESList *
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__
155 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
214const weed_plant_t *
pp_get_param(weed_plant_t **pparams,
int idx);
215const 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
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)
319typedef 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
weed_plant_t weed_layer_t
int64_t rip_audio(const lives_clip_data_t *, const char *fname, int64_t stframe, int64_t nframes, unsigned char **abuff)
void clip_data_free(lives_clip_data_t *)
free clip data - this should be called for each instance before unloading the module
boolean get_frame(const lives_clip_data_t *, int64_t frame, int *rowstrides, int height, void **pixel_data)
frame starts at 0
boolean chill_out(const lives_clip_data_t *cdata)
free buffers when we arent playing sequentially / on standby
void rip_audio_cleanup(const lives_clip_data_t *)
void *(* malloc_f)(size_t)
void *(* memset_f)(void *, int, size_t)
void *(* memmove_f)(void *, const void *, size_t)
void *(* memcpy_f)(void *, const void *, size_t)
void *(* realloc_f)(void *, size_t)
void *(* calloc_f)(size_t, size_t)
_palette * palette
interface colour settings
capability * get_capabilities(void)
char * get_extension(const char *filename)
void set_colRGBA32_param(void *value, short red, short green, short blue, short alpha)
void unload_decoder_plugins(void)
void vid_playback_plugin_exit(void)
LiVESList * get_external_window_hints(lives_rfx_t *rfx)
get the interface hints set by a Weed filter in the filter_class.
LiVESList * filter_encoders_by_img_ext(LiVESList *encoders, const char *img_ext)
boolean decoder_plugin_move_to_first(const char *name)
#define MAX_PARAM_WIDGETS
max number of display widgets per parameter (currently 7 for transition param with mergealign - spin ...
void rfx_clean_exe(lives_rfx_t *rfx)
boolean check_rfx_for_lives(lives_rfx_t *)
LiVESList * array_to_string_list(char **array, int offset, int len)
LiVESList * get_plugin_list(const char *plugin_type, boolean allow_nonex, const char *plugdir, const char *filter_ext)
void get_colRGBA32_param(void *value, lives_colRGBA64_t *rgba)
void close_vid_playback_plugin(_vid_playback_plugin *)
void param_copy(lives_param_t *dest, lives_param_t *src, boolean full)
void ** store_rfx_params(lives_rfx_t *)
return an array of parameter values
void sort_rfx_array(lives_rfx_t *in_array, int num_elements)
void render_fx_get_params(lives_rfx_t *, const char *plugin_name, short status)
boolean chill_decoder_plugin(int fileno)
_vid_playback_plugin * open_vid_playback_plugin(const char *name, boolean in_use)
LiVESList * load_decoders(void)
@ RFX_STATUS_TEST
test effects in the advanced menu
@ RFX_STATUS_RENAME
indicates a copy operation to test
@ RFX_STATUS_CUSTOM
custom effects in the custom menu
@ RFX_STATUS_COPY
indicates a copy operation to test
@ RFX_STATUS_WEED
indicates an internal RFX, created from a weed instance
@ RFX_STATUS_BUILTIN
factory presets
@ RFX_STATUS_INTERNAL
used for parsing RFX scraps generated internally (will possiblky replace SCRAP)
@ RFX_STATUS_ANY
indicates free choice of statuses
@ RFX_STATUS_SCRAP
used for parsing RFX scraps from external apps
@ LIVES_PARAM_SPECIAL_TYPE_ASPECT_RATIO
@ LIVES_PARAM_SPECIAL_TYPE_PASSWORD
@ LIVES_PARAM_SPECIAL_TYPE_RECT_MULTIRECT
type may be used in framedraw
@ LIVES_PARAM_SPECIAL_TYPE_RECT_DEMASK
type may be used in framedraw
@ LIVES_PARAM_SPECIAL_TYPE_MERGEALIGN
@ LIVES_PARAM_SPECIAL_TYPE_SCALEDPOINT
type may be used in framedraw
@ LIVES_PARAM_SPECIAL_TYPE_FILEREAD
@ LIVES_PARAM_SPECIAL_TYPE_SINGLEPOINT
type may be used in framedraw
@ LIVES_PARAM_SPECIAL_TYPE_NONE
@ LIVES_PARAM_SPECIAL_TYPE_FONT_CHOOSER
@ LIVES_PARAM_SPECIAL_TYPE_FILEWRITE
void get_colRGB24_param(void *value, lives_colRGB48_t *rgb)
const char *const anames[AUDIO_CODEC_MAX]
const lives_clip_data_t * get_decoder_cdata(int fileno, LiVESList *disabled, const lives_clip_data_t *fake_cdata)
void set_rfx_params_from_store(lives_rfx_t *rfx, void **store)
void set_bool_param(void *value, boolean)
void set_double_param(void *value, double)
LiVESList * plugin_request(const char *plugin_type, const char *plugin_name, const char *request)
void do_plugin_encoder_error(const char *plugin_name_or_null)
LiVESList * plugin_request_by_line(const char *plugin_type, const char *plugin_name, const char *request)
double get_double_param(void *value)
boolean get_bool_param(void *value)
boolean get_rfx_param_by_name_string(lives_rfx_t *rfx, const char *name, char **return_value)
lives_decoder_sys_t * open_decoder_plugin(const char *plname)
void on_decplug_advanced_clicked(LiVESButton *button, livespointer user_data)
int64_t get_best_audio(_vid_playback_plugin *)
@ LIVES_PARAM_UNDISPLAYABLE
@ LIVES_PARAM_STRING_LIST
void get_mime_type(char *text, int maxlen, const lives_clip_data_t *)
int find_rfx_plugin_by_name(const char *name, short status)
boolean check_encoder_restrictions(boolean get_extension, boolean user_audio, boolean save_all)
const weed_plant_t * pp_get_param(weed_plant_t **pparams, int idx)
void rfx_params_store_free(lives_rfx_t *, void **store)
boolean vpp_try_match_palette(_vid_playback_plugin *vpp, weed_layer_t *layer)
_vppaw * on_vpp_advanced_clicked(LiVESButton *, livespointer)
void set_int_param(void *value, int)
const weed_plant_t * pp_get_chan(weed_plant_t **pparams, int idx)
@ LIVES_INTENTION_DUPLICATE
@ LIVES_INTENTION_ANALYSE
@ LIVES_INTENTION_UNKNOWN
@ LIVES_INTENTION_EFFECT_REALTIME
@ LIVES_INTENTION_DOWNLOAD
@ LIVES_INTENTION_RESTORE
@ LIVES_INTENTION_CONVERT
@ LIVES_INTENTION_TRANSCODE
void load_vpp_defaults(_vid_playback_plugin *, char *file)
void do_rfx_cleanup(lives_rfx_t *)
LiVESList * plugin_request_common(const char *plugin_type, const char *plugin_name, const char *request, const char *delim, boolean allow_blanks)
void rfx_params_free(lives_rfx_t *)
int get_int_param(void *value)
@ LIVES_RFX_SOURCE_NEWCLIP
void close_clip_decoder(int clipno)
void set_colRGB24_param(void *value, short red, short green, short blue)
boolean set_rfx_param_by_name_string(lives_rfx_t *, const char *name, const char *value, boolean update_visual)
lives_decoder_t * clone_decoder(int fileno)
LiVESList * plugin_request_with_blanks(const char *plugin_type, const char *plugin_name, const char *request)
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
lives_rfx_t * weed_to_rfx(weed_plant_t *plant, boolean show_reinits)
void close_decoder_plugin(lives_decoder_t *)
lives_param_t * find_rfx_param_by_name(lives_rfx_t *, const char *name)
LiVESList * plugin_request_by_space(const char *plugin_type, const char *plugin_name, const char *request)
void rfx_copy(lives_rfx_t *dest, lives_rfx_t *src, boolean full)
lives_param_t * weed_params_to_rfx(int npar, weed_plant_t *instance, boolean show_reinits)
void save_vpp_defaults(_vid_playback_plugin *, char *file)
void rfx_free(lives_rfx_t *)
LiVESList * get_plugin_result(const char *command, const char *delim, boolean allow_blanks, boolean strip)
weed_plant_t ** alpha_chans
int palette
width in pixels, but converted to macropixels for the player
weed_plant_t ** play_params
const weed_plant_t ** play_paramtmpls
video playback plugin window - fixed part
LiVESWidget * spinbuttonh
LiVESWidget * spinbuttonw
_vid_playback_plugin * plugin
double kframe_kframe_time
avg extra time per iframe to arrive at following kframe
double kframe_nseek_time
time to flush buffers after a seek
double buffer_flush_time
avg time to decode keyframe
double kdecode_time
avg time to decode inter frame
double kframe_inter_time
avg time to seek from keyframe to keyframe (const) :: default == 0. (use kframe_nseek_time)
double kframe_extra_time
extra time to seek from kframe to kframe per iframe between them :: default == kframe_delay_time
double ctiming_ratio
a ctiming_ratio of 0. indicates that none of the other values are set.
double kframe_delay_time
avg time to seek to following keyframe (const)
int64_t jump_limit
for internal use
int current_palette
plugin should init this to palettes[0] if URI changes
float max_decode_fps
optional info ////////////////
int YUV_sampling
plugin can change per frame
int seek_flag
plugin can change per frame
int nclips
number of clips (titles) in container
lives_interlace_t interlace
int * palettes
number forames from one keyframe to the next, 0 if unknown
int frame_width
frame is the surrounding part, including any black border (>=width)
int current_clip
plugin should init this to 0 if URI changes
int offs_x
x and y offsets of picture within frame for primary pixel plane
int frame_gamma
values WEED_GAMMA_UNKNOWN (0), WEED_GAMMA_SRGB (1), WEED_GAMMA_LINEAR (2)
int * rec_rowstrides
if non-NULL, plugin can set recommended vals, pointer to single value set by host
lives_plugin_id_t plugin_id
int64_t kframe_dist
frame number of first keyframe (usually 0)
char * URI
the URI of this cdata
float par
pixel aspect ratio (sample width / sample height)
const char * name
plugin name
void * handle
may be shared between several instances
const lives_decoder_sys_t * decoder
lives_clip_data_t * cdata
lives_rfx_t * rfx
pointer to rfx for current delegate (or NULL)
ulong func
menuitem activation function for current delegate
int delegate
offset in list of current delegate
LiVESList * list
list of filter_idx from which user can delegate
uint64_t capabilities
type specific capabilities
uint64_t out_chan_types
channel types produced
uint64_t in_chan_types
channel types accepted
short multi
multivalue type - single value, multi value, or per channel
boolean onchange
is there a trigger ?
int dp
decimals, 0 for int and bool
lives_param_special_t special_type
lives_rfx_source_t source_type
void * value
current value(s)
double max
for string this is max characters
LiVESList * list
for string list (choices)
lives_intentcaps_t * capabilities
for future use
int api_version_major
version of interface API
int pl_version_major
version of plugin
LiVESWidget * menuitem
the menu item which activates this effect
char * menu_text
for Weed, this is the filter_class "name"
char * action_desc
for Weed "Applying $s"
LiVESList * gui_strings
rfxscript for constructing the params, param window and onchange triggers
LiVESList * onchange_strings
rfxscript for constructing the params, param window and onchange triggers
lives_rfx_status_t status
void * source
points to the source (e.g. a weed_plant_t)
lives_rfx_source_t source_type
int min_frames
for Weed, 1
char * name
the name of the executable (so we can run it !)
boolean init_audio(int sample_rate, int nchans, int argc, char **argv)
newer style
boolean set_yuv_palette_clamping(int clamping_type)
host sets the palette sampling (optional)
void module_unload(void)
this is called when module is unloaded
boolean init_screen(int width, int height, boolean fullscreen, uint64_t window_id, int argc, char **argv)
ready the screen to play (optional)
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...
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,...
boolean set_yuv_palette_sampling(int sampling_type)
host sets the palette sampling (optional)
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)
boolean set_yuv_palette_subspace(int subspace_type)
host sets the palette subspace (optional)
boolean set_fps(double fps)
boolean render_audio_frame_float(float **audio, int nsamps)
boolean set_palette(int palette)
host sets the palette used