#[repr(C)]pub struct VSPlugin { /* private fields */ }
Expand description
A VapourSynth plugin. There are a few of these built into the core,
and therefore available at all times: the basic filters (identifier com.vapoursynth.std
,
namespace std
), the resizers (identifier com.vapoursynth.resize
, namespace resize
),
and the Avisynth compatibility module, if running in Windows
(identifier com.vapoursynth.avisynth
, namespace avs
).
The Function Reference describes how to load VapourSynth and Avisynth plugins.
A VSPlugin
instance is constructed by the core when loading a plugin
(.so / .dylib / .dll), and the pointer is passed to the plugin’s
VapourSynthPluginInit2()
function.
A VapourSynth plugin can export any number of filters.
Plugins have a few attributes:
- An identifier, which must be unique among all VapourSynth plugins in existence, because this is what the core uses to make sure a plugin only gets loaded once.
- A namespace, also unique. The filters exported by a plugin end up in the plugin’s namespace.
- A full name, which is used by the core in a few error messages.
- The version of the plugin.
- The VapourSynth API version the plugin requires.
- A file name.
Things you can do with a VSPlugin
:
- Enumerate all the filters it exports, using
getNextPluginFunction()
. - Invoke one of its filters, using
invoke()
. - Get its location in the file system, using
getPluginPath()
.
All loaded plugins (including built-in) can be enumerated with
getNextPlugin()
.
Once loaded, a plugin only gets unloaded when the VapourSynth core is freed.