vapoursynth_sys/
bindings.rs

1use std::os::raw::*;
2
3#[repr(C)]
4#[derive(Debug, Copy, Clone)]
5pub struct VSFrameRef {
6    _unused: [u8; 0],
7}
8#[repr(C)]
9#[derive(Debug, Copy, Clone)]
10pub struct VSNodeRef {
11    _unused: [u8; 0],
12}
13#[repr(C)]
14#[derive(Debug, Copy, Clone)]
15pub struct VSCore {
16    _unused: [u8; 0],
17}
18#[repr(C)]
19#[derive(Debug, Copy, Clone)]
20pub struct VSPlugin {
21    _unused: [u8; 0],
22}
23#[repr(C)]
24#[derive(Debug, Copy, Clone)]
25pub struct VSNode {
26    _unused: [u8; 0],
27}
28#[repr(C)]
29#[derive(Debug, Copy, Clone)]
30pub struct VSFuncRef {
31    _unused: [u8; 0],
32}
33#[repr(C)]
34#[derive(Debug, Copy, Clone)]
35pub struct VSMap {
36    _unused: [u8; 0],
37}
38#[repr(C)]
39#[derive(Debug, Copy, Clone)]
40pub struct VSFrameContext {
41    _unused: [u8; 0],
42}
43#[allow(clippy::unreadable_literal)]
44#[repr(i32)]
45#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
46pub enum VSColorFamily {
47    cmGray = 1000000,
48    cmRGB = 2000000,
49    cmYUV = 3000000,
50    cmYCoCg = 4000000,
51    cmCompat = 9000000,
52}
53#[repr(i32)]
54#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
55pub enum VSSampleType {
56    stInteger = 0,
57    stFloat = 1,
58}
59#[allow(clippy::unreadable_literal)]
60#[repr(i32)]
61#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
62pub enum VSPresetFormat {
63    pfNone = 0,
64    pfGray8 = 1000010,
65    pfGray16 = 1000011,
66    pfGrayH = 1000012,
67    pfGrayS = 1000013,
68    pfYUV420P8 = 3000010,
69    pfYUV422P8 = 3000011,
70    pfYUV444P8 = 3000012,
71    pfYUV410P8 = 3000013,
72    pfYUV411P8 = 3000014,
73    pfYUV440P8 = 3000015,
74    pfYUV420P9 = 3000016,
75    pfYUV422P9 = 3000017,
76    pfYUV444P9 = 3000018,
77    pfYUV420P10 = 3000019,
78    pfYUV422P10 = 3000020,
79    pfYUV444P10 = 3000021,
80    pfYUV420P16 = 3000022,
81    pfYUV422P16 = 3000023,
82    pfYUV444P16 = 3000024,
83    pfYUV444PH = 3000025,
84    pfYUV444PS = 3000026,
85    pfYUV420P12 = 3000027,
86    pfYUV422P12 = 3000028,
87    pfYUV444P12 = 3000029,
88    pfYUV420P14 = 3000030,
89    pfYUV422P14 = 3000031,
90    pfYUV444P14 = 3000032,
91    pfRGB24 = 2000010,
92    pfRGB27 = 2000011,
93    pfRGB30 = 2000012,
94    pfRGB48 = 2000013,
95    pfRGBH = 2000014,
96    pfRGBS = 2000015,
97    pfCompatBGR32 = 9000010,
98    pfCompatYUY2 = 9000011,
99}
100#[repr(i32)]
101#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
102pub enum VSFilterMode {
103    fmParallel = 100,
104    fmParallelRequests = 200,
105    fmUnordered = 300,
106    fmSerial = 400,
107}
108#[repr(C)]
109#[derive(Debug, Copy, Clone)]
110pub struct VSFormat {
111    pub name: [c_char; 32usize],
112    pub id: c_int,
113    pub colorFamily: c_int,
114    pub sampleType: c_int,
115    pub bitsPerSample: c_int,
116    pub bytesPerSample: c_int,
117    pub subSamplingW: c_int,
118    pub subSamplingH: c_int,
119    pub numPlanes: c_int,
120}
121pub const VSNodeFlags_nfNoCache: VSNodeFlags = VSNodeFlags(1);
122pub const VSNodeFlags_nfIsCache: VSNodeFlags = VSNodeFlags(2);
123#[cfg(feature = "gte-vapoursynth-api-33")]
124pub const VSNodeFlags_nfMakeLinear: VSNodeFlags = VSNodeFlags(4);
125impl ::std::ops::BitOr<VSNodeFlags> for VSNodeFlags {
126    type Output = Self;
127    #[inline]
128    fn bitor(self, other: Self) -> Self {
129        VSNodeFlags(self.0 | other.0)
130    }
131}
132impl ::std::ops::BitOrAssign for VSNodeFlags {
133    #[inline]
134    fn bitor_assign(&mut self, rhs: VSNodeFlags) {
135        self.0 |= rhs.0;
136    }
137}
138impl ::std::ops::BitAnd<VSNodeFlags> for VSNodeFlags {
139    type Output = Self;
140    #[inline]
141    fn bitand(self, other: Self) -> Self {
142        VSNodeFlags(self.0 & other.0)
143    }
144}
145impl ::std::ops::BitAndAssign for VSNodeFlags {
146    #[inline]
147    fn bitand_assign(&mut self, rhs: VSNodeFlags) {
148        self.0 &= rhs.0;
149    }
150}
151#[repr(C)]
152#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
153pub struct VSNodeFlags(pub c_int);
154#[repr(i32)]
155#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
156pub enum VSPropTypes {
157    ptUnset = 117,
158    ptInt = 105,
159    ptFloat = 102,
160    ptData = 115,
161    ptNode = 99,
162    ptFrame = 118,
163    ptFunction = 109,
164}
165#[repr(i32)]
166#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
167pub enum VSGetPropErrors {
168    peUnset = 1,
169    peType = 2,
170    peIndex = 4,
171}
172#[repr(i32)]
173#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
174pub enum VSPropAppendMode {
175    paReplace = 0,
176    paAppend = 1,
177    paTouch = 2,
178}
179#[repr(C)]
180#[derive(Debug, Copy, Clone)]
181pub struct VSCoreInfo {
182    pub versionString: *const c_char,
183    pub core: c_int,
184    pub api: c_int,
185    pub numThreads: c_int,
186    pub maxFramebufferSize: i64,
187    pub usedFramebufferSize: i64,
188}
189#[repr(C)]
190#[derive(Debug, Copy, Clone)]
191pub struct VSVideoInfo {
192    pub format: *const VSFormat,
193    pub fpsNum: i64,
194    pub fpsDen: i64,
195    pub width: c_int,
196    pub height: c_int,
197    pub numFrames: c_int,
198    pub flags: c_int,
199}
200#[repr(i32)]
201#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
202pub enum VSActivationReason {
203    arInitial = 0,
204    arFrameReady = 1,
205    arAllFramesReady = 2,
206    arError = -1,
207}
208#[repr(i32)]
209#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
210pub enum VSMessageType {
211    mtDebug = 0,
212    mtWarning = 1,
213    mtCritical = 2,
214    mtFatal = 3,
215}
216pub type VSPublicFunction = unsafe extern "system" fn(
217    in_: *const VSMap,
218    out: *mut VSMap,
219    userData: *mut c_void,
220    core: *mut VSCore,
221    vsapi: *const VSAPI,
222);
223pub type VSRegisterFunction = unsafe extern "system" fn(
224    name: *const c_char,
225    args: *const c_char,
226    argsFunc: VSPublicFunction,
227    functionData: *mut c_void,
228    plugin: *mut VSPlugin,
229);
230pub type VSConfigPlugin = unsafe extern "system" fn(
231    identifier: *const c_char,
232    defaultNamespace: *const c_char,
233    name: *const c_char,
234    apiVersion: c_int,
235    readonly: c_int,
236    plugin: *mut VSPlugin,
237);
238pub type VSInitPlugin = Option<
239    unsafe extern "system" fn(
240        configFunc: VSConfigPlugin,
241        registerFunc: VSRegisterFunction,
242        plugin: *mut VSPlugin,
243    ),
244>;
245pub type VSFreeFuncData = Option<unsafe extern "system" fn(userData: *mut c_void)>;
246pub type VSFilterInit = unsafe extern "system" fn(
247    in_: *mut VSMap,
248    out: *mut VSMap,
249    instanceData: *mut *mut c_void,
250    node: *mut VSNode,
251    core: *mut VSCore,
252    vsapi: *const VSAPI,
253);
254pub type VSFilterGetFrame = unsafe extern "system" fn(
255    n: c_int,
256    activationReason: c_int,
257    instanceData: *mut *mut c_void,
258    frameData: *mut *mut c_void,
259    frameCtx: *mut VSFrameContext,
260    core: *mut VSCore,
261    vsapi: *const VSAPI,
262) -> *const VSFrameRef;
263pub type VSFilterFree = Option<
264    unsafe extern "system" fn(instanceData: *mut c_void, core: *mut VSCore, vsapi: *const VSAPI),
265>;
266pub type VSFrameDoneCallback = Option<
267    unsafe extern "system" fn(
268        userData: *mut c_void,
269        f: *const VSFrameRef,
270        n: c_int,
271        arg1: *mut VSNodeRef,
272        errorMsg: *const c_char,
273    ),
274>;
275pub type VSMessageHandler =
276    Option<unsafe extern "system" fn(msgType: c_int, msg: *const c_char, userData: *mut c_void)>;
277#[cfg(feature = "gte-vapoursynth-api-36")]
278pub type VSMessageHandlerFree = Option<unsafe extern "system" fn(userData: *mut c_void)>;
279#[cfg(feature = "gte-vapoursynth-api-36")]
280pub type VSMessageHandlerId = c_int;
281#[repr(C)]
282#[derive(Copy, Clone)]
283pub struct VSAPI {
284    pub createCore: unsafe extern "system" fn(threads: c_int) -> *mut VSCore,
285    pub freeCore: unsafe extern "system" fn(core: *mut VSCore),
286    #[cfg_attr(
287        feature = "gte-vapoursynth-api-36",
288        deprecated(note = "use `getCoreInfo2` instead")
289    )]
290    pub getCoreInfo: unsafe extern "system" fn(core: *mut VSCore) -> *const VSCoreInfo,
291    pub cloneFrameRef: unsafe extern "system" fn(f: *const VSFrameRef) -> *const VSFrameRef,
292    pub cloneNodeRef: unsafe extern "system" fn(node: *mut VSNodeRef) -> *mut VSNodeRef,
293    pub cloneFuncRef: unsafe extern "system" fn(f: *mut VSFuncRef) -> *mut VSFuncRef,
294    pub freeFrame: unsafe extern "system" fn(f: *const VSFrameRef),
295    pub freeNode: unsafe extern "system" fn(node: *mut VSNodeRef),
296    pub freeFunc: unsafe extern "system" fn(f: *mut VSFuncRef),
297    pub newVideoFrame: unsafe extern "system" fn(
298        format: *const VSFormat,
299        width: c_int,
300        height: c_int,
301        propSrc: *const VSFrameRef,
302        core: *mut VSCore,
303    ) -> *mut VSFrameRef,
304    pub copyFrame:
305        unsafe extern "system" fn(f: *const VSFrameRef, core: *mut VSCore) -> *mut VSFrameRef,
306    pub copyFrameProps:
307        unsafe extern "system" fn(src: *const VSFrameRef, dst: *mut VSFrameRef, core: *mut VSCore),
308    pub registerFunction: unsafe extern "system" fn(
309        name: *const c_char,
310        args: *const c_char,
311        argsFunc: VSPublicFunction,
312        functionData: *mut c_void,
313        plugin: *mut VSPlugin,
314    ),
315    pub getPluginById:
316        unsafe extern "system" fn(identifier: *const c_char, core: *mut VSCore) -> *mut VSPlugin,
317    pub getPluginByNs:
318        unsafe extern "system" fn(ns: *const c_char, core: *mut VSCore) -> *mut VSPlugin,
319    pub getPlugins: unsafe extern "system" fn(core: *mut VSCore) -> *mut VSMap,
320    pub getFunctions: unsafe extern "system" fn(plugin: *mut VSPlugin) -> *mut VSMap,
321    #[allow(clippy::type_complexity)]
322    pub createFilter: unsafe extern "system" fn(
323        in_: *const VSMap,
324        out: *mut VSMap,
325        name: *const c_char,
326        init: VSFilterInit,
327        getFrame: VSFilterGetFrame,
328        free: VSFilterFree,
329        filterMode: c_int,
330        flags: c_int,
331        instanceData: *mut c_void,
332        core: *mut VSCore,
333    ),
334    pub setError: unsafe extern "system" fn(map: *mut VSMap, errorMessage: *const c_char),
335    pub getError: unsafe extern "system" fn(map: *const VSMap) -> *const c_char,
336    pub setFilterError:
337        unsafe extern "system" fn(errorMessage: *const c_char, frameCtx: *mut VSFrameContext),
338    pub invoke: unsafe extern "system" fn(
339        plugin: *mut VSPlugin,
340        name: *const c_char,
341        args: *const VSMap,
342    ) -> *mut VSMap,
343    pub getFormatPreset: unsafe extern "system" fn(id: c_int, core: *mut VSCore) -> *const VSFormat,
344    pub registerFormat: unsafe extern "system" fn(
345        colorFamily: c_int,
346        sampleType: c_int,
347        bitsPerSample: c_int,
348        subSamplingW: c_int,
349        subSamplingH: c_int,
350        core: *mut VSCore,
351    ) -> *const VSFormat,
352    pub getFrame: unsafe extern "system" fn(
353        n: c_int,
354        node: *mut VSNodeRef,
355        errorMsg: *mut c_char,
356        bufSize: c_int,
357    ) -> *const VSFrameRef,
358    pub getFrameAsync: unsafe extern "system" fn(
359        n: c_int,
360        node: *mut VSNodeRef,
361        callback: VSFrameDoneCallback,
362        userData: *mut c_void,
363    ),
364    pub getFrameFilter: unsafe extern "system" fn(
365        n: c_int,
366        node: *mut VSNodeRef,
367        frameCtx: *mut VSFrameContext,
368    ) -> *const VSFrameRef,
369    pub requestFrameFilter:
370        unsafe extern "system" fn(n: c_int, node: *mut VSNodeRef, frameCtx: *mut VSFrameContext),
371    pub queryCompletedFrame: unsafe extern "system" fn(
372        node: *mut *mut VSNodeRef,
373        n: *mut c_int,
374        frameCtx: *mut VSFrameContext,
375    ),
376    pub releaseFrameEarly:
377        unsafe extern "system" fn(node: *mut VSNodeRef, n: c_int, frameCtx: *mut VSFrameContext),
378    pub getStride: unsafe extern "system" fn(f: *const VSFrameRef, plane: c_int) -> c_int,
379    pub getReadPtr: unsafe extern "system" fn(f: *const VSFrameRef, plane: c_int) -> *const u8,
380    pub getWritePtr: unsafe extern "system" fn(f: *mut VSFrameRef, plane: c_int) -> *mut u8,
381    pub createFunc: unsafe extern "system" fn(
382        func: VSPublicFunction,
383        userData: *mut c_void,
384        free: VSFreeFuncData,
385        core: *mut VSCore,
386        vsapi: *const VSAPI,
387    ) -> *mut VSFuncRef,
388    pub callFunc: unsafe extern "system" fn(
389        func: *mut VSFuncRef,
390        in_: *const VSMap,
391        out: *mut VSMap,
392        core: *mut VSCore,
393        vsapi: *const VSAPI,
394    ),
395    pub createMap: unsafe extern "system" fn() -> *mut VSMap,
396    pub freeMap: unsafe extern "system" fn(map: *mut VSMap),
397    pub clearMap: unsafe extern "system" fn(map: *mut VSMap),
398    pub getVideoInfo: unsafe extern "system" fn(node: *mut VSNodeRef) -> *const VSVideoInfo,
399    pub setVideoInfo:
400        unsafe extern "system" fn(vi: *const VSVideoInfo, numOutputs: c_int, node: *mut VSNode),
401    pub getFrameFormat: unsafe extern "system" fn(f: *const VSFrameRef) -> *const VSFormat,
402    pub getFrameWidth: unsafe extern "system" fn(f: *const VSFrameRef, plane: c_int) -> c_int,
403    pub getFrameHeight: unsafe extern "system" fn(f: *const VSFrameRef, plane: c_int) -> c_int,
404    pub getFramePropsRO: unsafe extern "system" fn(f: *const VSFrameRef) -> *const VSMap,
405    pub getFramePropsRW: unsafe extern "system" fn(f: *mut VSFrameRef) -> *mut VSMap,
406    pub propNumKeys: unsafe extern "system" fn(map: *const VSMap) -> c_int,
407    pub propGetKey: unsafe extern "system" fn(map: *const VSMap, index: c_int) -> *const c_char,
408    pub propNumElements: unsafe extern "system" fn(map: *const VSMap, key: *const c_char) -> c_int,
409    pub propGetType: unsafe extern "system" fn(map: *const VSMap, key: *const c_char) -> c_char,
410    pub propGetInt: unsafe extern "system" fn(
411        map: *const VSMap,
412        key: *const c_char,
413        index: c_int,
414        error: *mut c_int,
415    ) -> i64,
416    pub propGetFloat: unsafe extern "system" fn(
417        map: *const VSMap,
418        key: *const c_char,
419        index: c_int,
420        error: *mut c_int,
421    ) -> f64,
422    pub propGetData: unsafe extern "system" fn(
423        map: *const VSMap,
424        key: *const c_char,
425        index: c_int,
426        error: *mut c_int,
427    ) -> *const c_char,
428    pub propGetDataSize: unsafe extern "system" fn(
429        map: *const VSMap,
430        key: *const c_char,
431        index: c_int,
432        error: *mut c_int,
433    ) -> c_int,
434    pub propGetNode: unsafe extern "system" fn(
435        map: *const VSMap,
436        key: *const c_char,
437        index: c_int,
438        error: *mut c_int,
439    ) -> *mut VSNodeRef,
440    pub propGetFrame: unsafe extern "system" fn(
441        map: *const VSMap,
442        key: *const c_char,
443        index: c_int,
444        error: *mut c_int,
445    ) -> *const VSFrameRef,
446    pub propGetFunc: unsafe extern "system" fn(
447        map: *const VSMap,
448        key: *const c_char,
449        index: c_int,
450        error: *mut c_int,
451    ) -> *mut VSFuncRef,
452    pub propDeleteKey: unsafe extern "system" fn(map: *mut VSMap, key: *const c_char) -> c_int,
453    pub propSetInt: unsafe extern "system" fn(
454        map: *mut VSMap,
455        key: *const c_char,
456        i: i64,
457        append: c_int,
458    ) -> c_int,
459    pub propSetFloat: unsafe extern "system" fn(
460        map: *mut VSMap,
461        key: *const c_char,
462        d: f64,
463        append: c_int,
464    ) -> c_int,
465    pub propSetData: unsafe extern "system" fn(
466        map: *mut VSMap,
467        key: *const c_char,
468        data: *const c_char,
469        size: c_int,
470        append: c_int,
471    ) -> c_int,
472    pub propSetNode: unsafe extern "system" fn(
473        map: *mut VSMap,
474        key: *const c_char,
475        node: *mut VSNodeRef,
476        append: c_int,
477    ) -> c_int,
478    pub propSetFrame: unsafe extern "system" fn(
479        map: *mut VSMap,
480        key: *const c_char,
481        f: *const VSFrameRef,
482        append: c_int,
483    ) -> c_int,
484    pub propSetFunc: unsafe extern "system" fn(
485        map: *mut VSMap,
486        key: *const c_char,
487        func: *mut VSFuncRef,
488        append: c_int,
489    ) -> c_int,
490    pub setMaxCacheSize: unsafe extern "system" fn(bytes: i64, core: *mut VSCore) -> i64,
491    pub getOutputIndex: unsafe extern "system" fn(frameCtx: *mut VSFrameContext) -> c_int,
492    pub newVideoFrame2: unsafe extern "system" fn(
493        format: *const VSFormat,
494        width: c_int,
495        height: c_int,
496        planeSrc: *mut *const VSFrameRef,
497        planes: *const c_int,
498        propSrc: *const VSFrameRef,
499        core: *mut VSCore,
500    ) -> *mut VSFrameRef,
501    #[cfg_attr(
502        feature = "gte-vapoursynth-api-36",
503        deprecated(note = "use `addMessageHandler` and `removeMessageHandler` instead")
504    )]
505    pub setMessageHandler:
506        unsafe extern "system" fn(handler: VSMessageHandler, userData: *mut c_void),
507    pub setThreadCount: unsafe extern "system" fn(threads: c_int, core: *mut VSCore) -> c_int,
508    pub getPluginPath: unsafe extern "system" fn(plugin: *const VSPlugin) -> *const c_char,
509
510    #[cfg(feature = "gte-vapoursynth-api-31")]
511    pub propGetIntArray: unsafe extern "system" fn(
512        map: *const VSMap,
513        key: *const c_char,
514        error: *mut c_int,
515    ) -> *const i64,
516    #[cfg(feature = "gte-vapoursynth-api-31")]
517    pub propGetFloatArray: unsafe extern "system" fn(
518        map: *const VSMap,
519        key: *const c_char,
520        error: *mut c_int,
521    ) -> *const f64,
522    #[cfg(feature = "gte-vapoursynth-api-31")]
523    pub propSetIntArray: unsafe extern "system" fn(
524        map: *mut VSMap,
525        key: *const c_char,
526        i: *const i64,
527        size: c_int,
528    ) -> c_int,
529    #[cfg(feature = "gte-vapoursynth-api-31")]
530    pub propSetFloatArray: unsafe extern "system" fn(
531        map: *mut VSMap,
532        key: *const c_char,
533        d: *const f64,
534        size: c_int,
535    ) -> c_int,
536    #[cfg(feature = "gte-vapoursynth-api-34")]
537    pub logMessage: unsafe extern "system" fn(msgType: c_int, msg: *const c_char),
538    #[cfg(feature = "gte-vapoursynth-api-36")]
539    pub addMessageHandler: unsafe extern "system" fn(
540        handler: VSMessageHandler,
541        free: VSMessageHandlerFree,
542        userData: *mut c_void,
543    ) -> VSMessageHandlerId,
544    #[cfg(feature = "gte-vapoursynth-api-36")]
545    pub removeMessageHandler: unsafe extern "system" fn(id: VSMessageHandlerId) -> c_int,
546    #[cfg(feature = "gte-vapoursynth-api-36")]
547    pub getCoreInfo2: unsafe extern "system" fn(core: *mut VSCore, info: *mut VSCoreInfo),
548}
549
550#[cfg(feature = "vapoursynth-functions")]
551extern "system" {
552    pub fn getVapourSynthAPI(version: c_int) -> *const VSAPI;
553}
554
555#[repr(C)]
556#[derive(Debug, Copy, Clone)]
557pub struct VSScript {
558    _unused: [u8; 0],
559}
560#[repr(i32)]
561#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
562pub enum VSEvalFlags {
563    efSetWorkingDir = 1,
564}
565
566#[cfg(feature = "vsscript-functions")]
567extern "system" {
568    #[cfg(feature = "gte-vsscript-api-31")]
569    pub fn vsscript_getApiVersion() -> c_int;
570    pub fn vsscript_init() -> c_int;
571    pub fn vsscript_finalize() -> c_int;
572    pub fn vsscript_evaluateScript(
573        handle: *mut *mut VSScript,
574        script: *const c_char,
575        scriptFilename: *const c_char,
576        flags: c_int,
577    ) -> c_int;
578    pub fn vsscript_evaluateFile(
579        handle: *mut *mut VSScript,
580        scriptFilename: *const c_char,
581        flags: c_int,
582    ) -> c_int;
583    pub fn vsscript_createScript(handle: *mut *mut VSScript) -> c_int;
584    pub fn vsscript_freeScript(handle: *mut VSScript);
585    pub fn vsscript_getError(handle: *mut VSScript) -> *const c_char;
586    pub fn vsscript_getOutput(handle: *mut VSScript, index: c_int) -> *mut VSNodeRef;
587    #[cfg(feature = "gte-vsscript-api-31")]
588    pub fn vsscript_getOutput2(
589        handle: *mut VSScript,
590        index: c_int,
591        alpha: *mut *mut VSNodeRef,
592    ) -> *mut VSNodeRef;
593    pub fn vsscript_clearOutput(handle: *mut VSScript, index: c_int) -> c_int;
594    pub fn vsscript_getCore(handle: *mut VSScript) -> *mut VSCore;
595    pub fn vsscript_getVSApi() -> *const VSAPI;
596    #[cfg(feature = "gte-vsscript-api-32")]
597    pub fn vsscript_getVSApi2(version: c_int) -> *const VSAPI;
598    pub fn vsscript_getVariable(
599        handle: *mut VSScript,
600        name: *const c_char,
601        dst: *mut VSMap,
602    ) -> c_int;
603    pub fn vsscript_setVariable(handle: *mut VSScript, vars: *const VSMap) -> c_int;
604    pub fn vsscript_clearVariable(handle: *mut VSScript, name: *const c_char) -> c_int;
605    pub fn vsscript_clearEnvironment(handle: *mut VSScript);
606}