Struct vapoursynth4_sys::VSSCRIPTAPI
source · #[repr(C)]pub struct VSSCRIPTAPI {Show 15 fields
pub getApiVersion: unsafe extern "system" fn() -> c_int,
pub getVSAPI: unsafe extern "system" fn(version: c_int) -> *const VSAPI,
pub createScript: unsafe extern "system" fn(core: *mut VSCore) -> *mut VSScript,
pub getCore: unsafe extern "system" fn(handle: *mut VSScript) -> *mut VSCore,
pub evaluateBuffer: unsafe extern "system" fn(handle: *mut VSScript, buffer: *const c_char, scriptFilename: *const c_char) -> c_int,
pub evaluateFile: unsafe extern "system" fn(handle: *mut VSScript, scriptFilename: *const c_char) -> c_int,
pub getError: unsafe extern "system" fn(handle: *mut VSScript) -> *const c_char,
pub getExitCode: unsafe extern "system" fn(handle: *mut VSScript) -> c_int,
pub getVariable: unsafe extern "system" fn(handle: *mut VSScript, name: *const c_char, dst: *mut VSMap) -> c_int,
pub setVariable: unsafe extern "system" fn(handle: *mut VSScript, name: *const c_char, value: *const c_char) -> c_int,
pub getOutputNode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> *mut VSNode,
pub getOutputAlphaNode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> *mut VSNode,
pub getAltOutputMode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> c_int,
pub freeScript: unsafe extern "system" fn(handle: *mut VSScript) -> c_int,
pub evalSetWorkingDir: unsafe extern "system" fn(handle: *mut VSScript, setCWD: c_int) -> c_void,
}vsscript only.Fields§
§getApiVersion: unsafe extern "system" fn() -> c_intReturns the highest supported VSSCRIPT_API_VERSION
getVSAPI: unsafe extern "system" fn(version: c_int) -> *const VSAPIConvenience function for retrieving a VSAPI pointer without having to use
the VapourSynth library. Always pass VAPOURSYNTH_API_VERSION
createScript: unsafe extern "system" fn(core: *mut VSCore) -> *mut VSScriptProviding a pre-created core is useful for setting core creation flags,
log callbacks, preload specific plugins and many other things.
You must create a VSScript object before evaluating a script.
Always takes ownership of the core even on failure. Returns NULL on failure.
Pass NULL to have a core automatically created with the default options.
getCore: unsafe extern "system" fn(handle: *mut VSScript) -> *mut VSCoreThe core is valid as long as the environment exists, return NULL on error
evaluateBuffer: unsafe extern "system" fn(handle: *mut VSScript, buffer: *const c_char, scriptFilename: *const c_char) -> c_intEvaluates a script passed in the buffer argument. The scriptFilename is only used for
display purposes. In Python, it means that the main module
won’t be unnamed in error messages.
Returns 0 on success.
Note: calling any function other than getError() and
freeScript() on a VSScript object in the error state
will result in undefined behavior.
evaluateFile: unsafe extern "system" fn(handle: *mut VSScript, scriptFilename: *const c_char) -> c_intConvenience version of the above function that loads the script from scriptFilename
and passes as the buffer to evaluateBuffer
getError: unsafe extern "system" fn(handle: *mut VSScript) -> *const c_charReturns NULL on success, otherwise an error message
getExitCode: unsafe extern "system" fn(handle: *mut VSScript) -> c_intReturns the script’s reported exit code
getVariable: unsafe extern "system" fn(handle: *mut VSScript, name: *const c_char, dst: *mut VSMap) -> c_intFetches a variable of any VSMap storable type set in a script.
It is stored in the key with the same name in dst.
Returns 0 on success.
setVariable: unsafe extern "system" fn(handle: *mut VSScript, name: *const c_char, value: *const c_char) -> c_intSets all keys in the provided VSMap as variables in the script.
Returns 0 on success.
getOutputNode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> *mut VSNodeThe returned nodes must be freed using freeNode() before calling
freeScript() since they may depend on data in the VSScript
environment. Returns NULL if no node was set as output in the script.
Index 0 is used by default in scripts and other values are rarely used.
getOutputAlphaNode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> *mut VSNode§getAltOutputMode: unsafe extern "system" fn(handle: *mut VSScript, index: c_int) -> c_int§freeScript: unsafe extern "system" fn(handle: *mut VSScript) -> c_int§evalSetWorkingDir: unsafe extern "system" fn(handle: *mut VSScript, setCWD: c_int) -> c_voidvsscript-41 only.Set whether or not the working directory is temporarily changed to the same location as the script file when evaluateFile is called. Off by default.