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