vooya

Plugin API

vooya's Plugin Interface

Beginning with version 1.6, vooya has an open API in order to be extensible for end users. The plugin mechanism is based on standard shared libraries loaded at runtime (DLLs,*.so,dylibs), so plugins can be written in any language suitable for creating shared libraries, notably C/C++, Rust and Objective-C.

Below you can see vooya's processing chain and where plugin callbacks can kick in (the items marked yellow). These are:

  • Input
    Provide custom input to vooya, from any source
  • Histogram
    Get access to the calculated histogram data
  • Native I/O
    Callback with the raw video data for each frame
  • RGB 32bit I/O
    Callback with the rendered data in RGB right before display
  • EOTF
    Add custom transfer functions to vooya's existing ones
  • Diff View
    Pixelwise callback function for difference views (not shown below)

Note the plugin API is experimental.

Assuming you develop in the aforementioned languages, you need a compiler/linker and the plugin header file, which contains a lot of explanation: voo_plugin.h. Also check out the examples on Github. The following is a minimal example in C, adding a γ.9 transfer function to vooya's format dialog:

// compile at least with: // (macOS) clang -dynamiclib -std=gnu99 plugin.c -o plugin.dylib // (Linux) gcc -Wall -shared -fpic plugin.c -o plugin.so // (Windows) cl.exe /LD plugin.c /Feplugin.dll #include <math.h> #include "voo_plugin.h" VP_API double my_gamma( double in_val, int bits, void *p_user ) { return pow( in_val, .9 ); } VP_API void voo_describe( voo_plugin_t *p_plugin ) { p_plugin->voo_version = VOO_PLUGIN_API_VERSION; // plugin main properties p_plugin->name = "Test Plugin"; p_plugin->description = "Adds a gamma curve to the advanced " "options in the format dialog."; p_plugin->callbacks[0].uid = "my.gamma.1"; p_plugin->callbacks[0].name = "Gamma .9"; p_plugin->callbacks[0].description = "Adds Gamma .9 EOTF"; p_plugin->callbacks[0].type = vooCallback_EOTF; p_plugin->callbacks[0].method_eotf = my_gamma; }

Development workflow

Make sure that you have enabled plugins in vooya's preferences pane. Also the debug output might help, start vooya from command line for that. You can set and change the plugin directory from within vooya at any time. When you build a plugin with output directly into vooya's plugin folder, it depends on the platform how the plugin can be (re)loaded:

On Linux, hit Shift-Esc to simply reload the plugins. You can just overwrite the plugins while they are linked.

On macOS, since unloading shared libraries is not supported by the Cocoa framework, use CMD-Esc to restart vooya with the current setup.

Windows does not allow overwriting a linked runtime library (DLL), you need to detach the plugins, build and attach again. The detached state is toggled with Shift-Esc.

Note for plugin users

Plugins are quite powerful and thus potentially insecure. Only install plugins from trusted sources. Using a plugin is at your own risk. The entire responsibility of what a plugin does and does not is the plugin author's. The entire risk of using a plugin is at you.

Check out https://github.com/arionik/vooPLUS to make vooya read MOV/MP4 files!