Skip to main content

vapoursynth4_sys/
lib.rs

1/*
2 This Source Code Form is subject to the terms of the Mozilla Public
3 License, v. 2.0. If a copy of the MPL was not distributed with this
4 file, You can obtain one at http://mozilla.org/MPL/2.0/.
5*/
6
7//! Raw bindings to [VapourSynth](https://github.com/vapoursynth/vapoursynth).
8
9#![cfg_attr(docsrs, feature(doc_auto_cfg))]
10
11mod constants;
12pub mod helper;
13mod vs;
14mod vsscript;
15#[cfg(feature = "vulkan")]
16pub mod vulkan;
17
18pub use crate::constants::*;
19pub use crate::vs::*;
20#[cfg(feature = "vsscript")]
21pub use crate::vsscript::*;
22#[cfg(feature = "vulkan")]
23pub use crate::vulkan::*;
24
25macro_rules! opaque_struct {
26    ($($(#[$outer:meta])*$name:ident),+) => {
27        $(
28            $(#[$outer])*
29            #[repr(C)]
30            pub struct $name {
31                _data: [u8; 0],
32                _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
33            }
34        )*
35    };
36}
37pub(crate) use opaque_struct;
38
39/// Used to create version numbers.
40/// The first argument is the major version and second is the minor.
41#[must_use]
42pub const fn vs_make_version(major: u16, minor: u16) -> i32 {
43    ((major as i32) << 16) | minor as i32
44}