LiVES  3.2.0
Functions | Variables
plugins.c File Reference
#include <dlfcn.h>
#include <errno.h>
#include "main.h"
#include "resample.h"
#include "effects.h"
#include "interface.h"
#include "rfx-builder.h"
#include "paramwindow.h"
#include "lsd-tab.h"

Go to the source code of this file.

Functions

LiVESList * get_plugin_result (const char *command, const char *delim, boolean allow_blanks, boolean strip)
 
LIVES_GLOBAL_INLINE LiVESList * plugin_request_with_blanks (const char *plugin_type, const char *plugin_name, const char *request)
 
LIVES_GLOBAL_INLINE LiVESList * plugin_request (const char *plugin_type, const char *plugin_name, const char *request)
 
LIVES_GLOBAL_INLINE LiVESList * plugin_request_by_line (const char *plugin_type, const char *plugin_name, const char *request)
 
LIVES_GLOBAL_INLINE LiVESList * plugin_request_by_space (const char *plugin_type, const char *plugin_name, const char *request)
 
LiVESList * plugin_request_common (const char *plugin_type, const char *plugin_name, const char *request, const char *delim, boolean allow_blanks)
 
LiVESList * get_plugin_list (const char *plugin_type, boolean allow_nonex, const char *plugdir, const char *filter_ext)
 
void save_vpp_defaults (_vid_playback_plugin *vpp, char *vpp_file)
 
void load_vpp_defaults (_vid_playback_plugin *vpp, char *vpp_file)
 
void on_vppa_cancel_clicked (LiVESButton *button, livespointer user_data)
 
void on_vppa_ok_clicked (LiVESButton *button, livespointer user_data)
 
void on_vppa_save_clicked (LiVESButton *button, livespointer user_data)
 
_vppawon_vpp_advanced_clicked (LiVESButton *button, livespointer user_data)
 
void close_vid_playback_plugin (_vid_playback_plugin *vpp)
 
const weed_plant_t * pp_get_param (weed_plant_t **pparams, int idx)
 
const weed_plant_t * pp_get_chan (weed_plant_t **pparams, int idx)
 
boolean vpp_try_match_palette (_vid_playback_plugin *vpp, weed_layer_t *layer)
 
_vid_playback_pluginopen_vid_playback_plugin (const char *name, boolean in_use)
 
void vid_playback_plugin_exit (void)
 
int64_t get_best_audio (_vid_playback_plugin *vpp)
 
void do_plugin_encoder_error (const char *plugin_name)
 
boolean check_encoder_restrictions (boolean get_extension, boolean user_audio, boolean save_all)
 
LiVESList * filter_encoders_by_img_ext (LiVESList *encoders, const char *img_ext)
 
boolean decoder_plugin_move_to_first (const char *name)
 
LiVESList * load_decoders (void)
 
lives_decoder_tclone_decoder (int fileno)
 
const lives_clip_data_tget_decoder_cdata (int fileno, LiVESList *disabled, const lives_clip_data_t *fake_cdata)
 
void close_decoder_plugin (lives_decoder_t *dplug)
 
void close_clip_decoder (int clipno)
 
void unload_decoder_plugins (void)
 
boolean chill_decoder_plugin (int fileno)
 
lives_decoder_sys_topen_decoder_plugin (const char *plname)
 
void get_mime_type (char *text, int maxlen, const lives_clip_data_t *cdata)
 
void on_decplug_advanced_clicked (LiVESButton *button, livespointer user_data)
 
boolean check_rfx_for_lives (lives_rfx_t *rfx)
 
void do_rfx_cleanup (lives_rfx_t *rfx)
 
void render_fx_get_params (lives_rfx_t *rfx, const char *plugin_name, short status)
 
LiVESList * array_to_string_list (char **array, int offset, int len)
 
void sort_rfx_array (lives_rfx_t *in, int num)
 
void rfx_copy (lives_rfx_t *dest, lives_rfx_t *src, boolean full)
 
void rfx_params_free (lives_rfx_t *rfx)
 
void rfx_free (lives_rfx_t *rfx)
 
void rfx_free_all (void)
 
void param_copy (lives_param_t *dest, lives_param_t *src, boolean full)
 
boolean get_bool_param (void *value)
 
int get_int_param (void *value)
 
double get_double_param (void *value)
 
void get_colRGB24_param (void *value, lives_colRGB48_t *rgb)
 
void get_colRGBA32_param (void *value, lives_colRGBA64_t *rgba)
 
void set_bool_param (void *value, boolean _const)
 
void set_string_param (void **value_ptr, const char *_const, size_t maxlen)
 
void set_int_param (void *value, int _const)
 
void set_double_param (void *value, double _const)
 
boolean set_rfx_param_by_name_string (lives_rfx_t *rfx, const char *name, const char *value, boolean update_visual)
 
boolean get_rfx_param_by_name_string (lives_rfx_t *rfx, const char *name, char **return_value)
 
void set_colRGB24_param (void *value, short red, short green, short blue)
 
void set_colRGBA32_param (void *value, short red, short green, short blue, short alpha)
 
int find_rfx_plugin_by_name (const char *name, short status)
 
lives_param_tfind_rfx_param_by_name (lives_rfx_t *rfx, const char *name)
 
lives_param_tweed_params_to_rfx (int npar, weed_plant_t *inst, boolean show_reinits)
 
lives_rfx_tweed_to_rfx (weed_plant_t *plant, boolean show_reinits)
 
LiVESList * get_external_window_hints (lives_rfx_t *rfx)
 get the interface hints set by a Weed filter in the filter_class. More...
 
void rfx_clean_exe (lives_rfx_t *rfx)
 
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 More...
 

Variables

const char *const anames [AUDIO_CODEC_MAX]
 

Function Documentation

◆ array_to_string_list()

LiVESList* array_to_string_list ( char **  array,
int  offset,
int  len 
)

Definition at line 2883 of file plugins.c.

Referenced by render_fx_get_params(), and script_to_rfxbuilder().

◆ check_encoder_restrictions()

boolean check_encoder_restrictions ( boolean  get_extension,
boolean  user_audio,
boolean  save_all 
)

end restrictions

Definition at line 1557 of file plugins.c.

Referenced by mt_change_vals_activate(), on_multitrack_activate(), and render_to_clip().

◆ check_rfx_for_lives()

boolean check_rfx_for_lives ( lives_rfx_t rfx)

Definition at line 2661 of file plugins.c.

◆ chill_decoder_plugin()

boolean chill_decoder_plugin ( int  fileno)

Definition at line 2425 of file plugins.c.

Referenced by render_events().

◆ clone_decoder()

lives_decoder_t* clone_decoder ( int  fileno)

Definition at line 2181 of file plugins.c.

Referenced by load_frame_image(), on_paste_as_new_activate(), and render_events().

◆ close_clip_decoder()

void close_clip_decoder ( int  clipno)

Definition at line 2382 of file plugins.c.

Referenced by close_current_file(), init_clipboard(), and lives_exit().

◆ close_decoder_plugin()

void close_decoder_plugin ( lives_decoder_t dplug)

◆ close_vid_playback_plugin()

void close_vid_playback_plugin ( _vid_playback_plugin vpp)

◆ decoder_plugin_move_to_first()

boolean decoder_plugin_move_to_first ( const char *  name)

Definition at line 2072 of file plugins.c.

Referenced by reload_clip().

◆ do_plugin_encoder_error()

void do_plugin_encoder_error ( const char *  plugin_name)

Definition at line 1531 of file plugins.c.

Referenced by on_encoder_entry_changed(), and on_encoder_ofmt_changed().

◆ do_rfx_cleanup()

void do_rfx_cleanup ( lives_rfx_t rfx)

skip cleanup if menuentry is "apply current realtime effects"

Definition at line 2671 of file plugins.c.

Referenced by do_effect(), and on_paramwindow_button_clicked().

◆ filter_encoders_by_img_ext()

LiVESList* filter_encoders_by_img_ext ( LiVESList *  encoders,
const char *  img_ext 
)

Definition at line 2006 of file plugins.c.

◆ find_rfx_param_by_name()

lives_param_t* find_rfx_param_by_name ( lives_rfx_t rfx,
const char *  name 
)

Definition at line 3189 of file plugins.c.

Referenced by get_rfx_param_by_name_string(), and set_rfx_param_by_name_string().

◆ find_rfx_plugin_by_name()

int find_rfx_plugin_by_name ( const char *  name,
short  status 
)

Definition at line 3177 of file plugins.c.

Referenced by perform_rfxbuilder_checks().

◆ get_best_audio()

int64_t get_best_audio ( _vid_playback_plugin vpp)

◆ get_bool_param()

boolean get_bool_param ( void *  value)

Definition at line 3072 of file plugins.c.

Referenced by add_param_to_box(), after_boolean_param_toggled(), and rfxbuilder_to_script().

◆ get_colRGB24_param()

void get_colRGB24_param ( void *  value,
lives_colRGB48_t rgb 
)

◆ get_colRGBA32_param()

void get_colRGBA32_param ( void *  value,
lives_colRGBA64_t rgba 
)

Definition at line 3098 of file plugins.c.

◆ get_decoder_cdata()

const lives_clip_data_t* get_decoder_cdata ( int  fileno,
LiVESList *  disabled,
const lives_clip_data_t fake_cdata 
)

TODO: background thread so we can animate GUI

Definition at line 2286 of file plugins.c.

Referenced by reload_clip().

◆ get_double_param()

double get_double_param ( void *  value)

◆ get_external_window_hints()

LiVESList* get_external_window_hints ( lives_rfx_t rfx)

get the interface hints set by a Weed filter in the filter_class.

for a compound effect we get the gui elements from each internal filter in sequence, inserting internal|nextfilter after each filter

  • the filter MUST have set LAYOUT_SCHEME to RFX in the filter class.
  • it must have set the leaf RFX_DELIM with the string delimiter (and anything after the first character is ignored)
  • the layout must be set in the RFX_STRINGS array, using the delimiter

returns a LiVESList of the results

Definition at line 3618 of file plugins.c.

◆ get_int_param()

int get_int_param ( void *  value)

◆ get_mime_type()

void get_mime_type ( char *  text,
int  maxlen,
const lives_clip_data_t cdata 
)

Definition at line 2513 of file plugins.c.

Referenced by reload_clip().

◆ get_plugin_list()

LiVESList* get_plugin_list ( const char *  plugin_type,
boolean  allow_nonex,
const char *  plugdir,
const char *  filter_ext 
)

Definition at line 115 of file plugins.c.

Referenced by add_rfx_effects(), get_script_list(), and load_decoders().

◆ get_plugin_result()

LiVESList* get_plugin_result ( const char *  command,
const char *  delim,
boolean  allow_blanks,
boolean  strip 
)

Definition at line 30 of file plugins.c.

Referenced by get_script_section().

◆ get_rfx_param_by_name_string()

boolean get_rfx_param_by_name_string ( lives_rfx_t rfx,
const char *  name,
char **  return_value 
)

Definition at line 3141 of file plugins.c.

◆ load_decoders()

LiVESList* load_decoders ( void  )

Definition at line 2092 of file plugins.c.

Referenced by on_decplug_advanced_clicked(), and reload_clip().

◆ load_vpp_defaults()

void load_vpp_defaults ( _vid_playback_plugin vpp,
char *  vpp_file 
)

Definition at line 265 of file plugins.c.

Referenced by open_vid_playback_plugin().

◆ on_decplug_advanced_clicked()

void on_decplug_advanced_clicked ( LiVESButton *  button,
livespointer  user_data 
)

Definition at line 2575 of file plugins.c.

◆ on_vpp_advanced_clicked()

_vppaw* on_vpp_advanced_clicked ( LiVESButton *  button,
livespointer  user_data 
)

Definition at line 727 of file plugins.c.

Referenced by on_send_lives2lives_activate().

◆ on_vppa_cancel_clicked()

void on_vppa_cancel_clicked ( LiVESButton *  button,
livespointer  user_data 
)

Definition at line 408 of file plugins.c.

Referenced by on_vppa_ok_clicked().

◆ on_vppa_ok_clicked()

void on_vppa_ok_clicked ( LiVESButton *  button,
livespointer  user_data 
)

Definition at line 435 of file plugins.c.

Referenced by on_vppa_save_clicked().

◆ on_vppa_save_clicked()

void on_vppa_save_clicked ( LiVESButton *  button,
livespointer  user_data 
)

Definition at line 701 of file plugins.c.

◆ open_decoder_plugin()

lives_decoder_sys_t* open_decoder_plugin ( const char *  plname)

Definition at line 2438 of file plugins.c.

Referenced by load_decoders().

◆ open_vid_playback_plugin()

_vid_playback_plugin* open_vid_playback_plugin ( const char *  name,
boolean  in_use 
)

get the play parameters (and alpha channels) if any and convert to weed params

Definition at line 1099 of file plugins.c.

Referenced by after_vpp_changed(), on_vpp_advanced_clicked(), and set_vpp().

◆ param_copy()

void param_copy ( lives_param_t dest,
lives_param_t src,
boolean  full 
)

Definition at line 3020 of file plugins.c.

◆ plugin_request()

LIVES_GLOBAL_INLINE LiVESList* plugin_request ( const char *  plugin_type,
const char *  plugin_name,
const char *  request 
)

Definition at line 54 of file plugins.c.

Referenced by filter_encoders_by_img_ext(), and on_encoder_entry_changed().

◆ plugin_request_by_line()

LIVES_GLOBAL_INLINE LiVESList* plugin_request_by_line ( const char *  plugin_type,
const char *  plugin_name,
const char *  request 
)

◆ plugin_request_by_space()

LIVES_GLOBAL_INLINE LiVESList* plugin_request_by_space ( const char *  plugin_type,
const char *  plugin_name,
const char *  request 
)

Definition at line 64 of file plugins.c.

◆ plugin_request_common()

LiVESList* plugin_request_common ( const char *  plugin_type,
const char *  plugin_name,
const char *  request,
const char *  delim,
boolean  allow_blanks 
)

◆ plugin_request_with_blanks()

LIVES_GLOBAL_INLINE LiVESList* plugin_request_with_blanks ( const char *  plugin_type,
const char *  plugin_name,
const char *  request 
)

Definition at line 47 of file plugins.c.

◆ plugin_run_param_window()

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

N.B. this is NOT for rendered effects, those have their own functions.

– currently used for: encoder plugins and video playback plugins.

Given an RFX script in scrap_text, (generally retrieved by some means from the plugin), will create an rfx effect, building the parameters from the <params> section of scrap_text, using the layout hints (optional) from <param_window>, and construct a parameter interface.

The function has two modes of operation:

If vbox is not NULL it should point to a LiVESVBox into which the parameter box will be added. The function will return NULL, and the rfx can be retrieved from ret_rfx.

If vbox is NULL, the param window will be run, and if the user clicks "OK", the parameter values are returned in a marshalled list. If the user closes the window with Cancel, NULL is returned instead.

If the plugin has no user adjustable parameters, the an empty string is returned.

If <onchange> exists then the init | trigger will be run to let the plugin update default values (for vpps only currently)

The onchange code is currently run by generating a perl scrap and runing that. In future the code could be run in different languages or internally by using a simple parser like the one in the data_processor plugin.

NOTE: if vbox is not NULL, we create the window inside vbox, without running it in this case, vbox should be packed in its own dialog window, which should then be run

called from plugins.c (vpp opts) and saveplay.c (encoder opts)

check if we actually have params to display

Definition at line 3717 of file plugins.c.

◆ pp_get_chan()

const weed_plant_t* pp_get_chan ( weed_plant_t **  pparams,
int  idx 
)

Definition at line 1054 of file plugins.c.

Referenced by cconx_chain_data().

◆ pp_get_param()

const weed_plant_t* pp_get_param ( weed_plant_t **  pparams,
int  idx 
)

Definition at line 1042 of file plugins.c.

◆ render_fx_get_params()

void render_fx_get_params ( lives_rfx_t rfx,
const char *  plugin_name,
short  status 
)

Definition at line 2707 of file plugins.c.

◆ rfx_clean_exe()

void rfx_clean_exe ( lives_rfx_t rfx)

Definition at line 3676 of file plugins.c.

◆ rfx_copy()

void rfx_copy ( lives_rfx_t dest,
lives_rfx_t src,
boolean  full 
)

Definition at line 2931 of file plugins.c.

Referenced by add_rfx_effects().

◆ rfx_free()

void rfx_free ( lives_rfx_t rfx)

Definition at line 2987 of file plugins.c.

Referenced by on_vppa_cancel_clicked(), and rfx_free_all().

◆ rfx_free_all()

void rfx_free_all ( void  )

Definition at line 3010 of file plugins.c.

◆ rfx_params_free()

void rfx_params_free ( lives_rfx_t rfx)

Definition at line 2973 of file plugins.c.

Referenced by rfx_free(), and rte_reset_defs_clicked().

◆ save_vpp_defaults()

void save_vpp_defaults ( _vid_playback_plugin vpp,
char *  vpp_file 
)

Definition at line 181 of file plugins.c.

Referenced by lives_exit(), and on_vppa_save_clicked().

◆ set_bool_param()

void set_bool_param ( void *  value,
boolean  _const 
)

Definition at line 3103 of file plugins.c.

Referenced by script_to_rfxbuilder(), and set_param_from_list().

◆ set_colRGB24_param()

void set_colRGB24_param ( void *  value,
short  red,
short  green,
short  blue 
)

◆ set_colRGBA32_param()

void set_colRGBA32_param ( void *  value,
short  red,
short  green,
short  blue,
short  alpha 
)

Definition at line 3166 of file plugins.c.

◆ set_double_param()

void set_double_param ( void *  value,
double  _const 
)

◆ set_int_param()

void set_int_param ( void *  value,
int  _const 
)

◆ set_rfx_param_by_name_string()

boolean set_rfx_param_by_name_string ( lives_rfx_t rfx,
const char *  name,
const char *  value,
boolean  update_visual 
)

Definition at line 3124 of file plugins.c.

◆ set_string_param()

void set_string_param ( void **  value_ptr,
const char *  _const,
size_t  maxlen 
)

Definition at line 3108 of file plugins.c.

Referenced by set_rfx_param_by_name_string().

◆ sort_rfx_array()

void sort_rfx_array ( lives_rfx_t in,
int  num 
)

Definition at line 2909 of file plugins.c.

◆ unload_decoder_plugins()

void unload_decoder_plugins ( void  )

Definition at line 2411 of file plugins.c.

◆ vid_playback_plugin_exit()

void vid_playback_plugin_exit ( void  )

Definition at line 1413 of file plugins.c.

Referenced by on_sepwin_activate(), and set_vpp().

◆ vpp_try_match_palette()

boolean vpp_try_match_palette ( _vid_playback_plugin vpp,
weed_layer_t layer 
)

Definition at line 1066 of file plugins.c.

◆ weed_params_to_rfx()

lives_param_t* weed_params_to_rfx ( int  npar,
weed_plant_t *  inst,
boolean  show_reinits 
)

Definition at line 3201 of file plugins.c.

Referenced by rte_reset_defs_clicked(), weed_reinit_effect(), and weed_to_rfx().

◆ weed_to_rfx()

lives_rfx_t* weed_to_rfx ( weed_plant_t *  plant,
boolean  show_reinits 
)

Definition at line 3564 of file plugins.c.

Referenced by replace_with_delegates(), and rte_set_defs_activate().

Variable Documentation

◆ anames

const char* const anames[AUDIO_CODEC_MAX]
Initial value:
= {"mp3", "pcm", "mp2", "vorbis", "AC3", "AAC", "AMR_NB",
"raw", "wma2", "opus", ""}

Definition at line 21 of file plugins.c.

Referenced by get_best_audio(), and set_acodec_list_from_allowed().