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
16pub use crate::constants::*;
17pub use crate::vs::*;
18#[cfg(feature = "vsscript")]
19pub use crate::vsscript::*;
20
21macro_rules! opaque_struct {
22    ($($(#[$outer:meta])*$name:ident),+) => {
23        $(
24            $(#[$outer])*
25            #[repr(C)]
26            pub struct $name {
27                _data: [u8; 0],
28                _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
29            }
30        )*
31    };
32}
33pub(crate) use opaque_struct;
34
35/// Used to create version numbers.
36/// The first argument is the major version and second is the minor.
37#[must_use]
38pub const fn vs_make_version(major: u16, minor: u16) -> i32 {
39    ((major as i32) << 16) | minor as i32
40}