Commit bfba540f authored by Thibault Saunier's avatar Thibault Saunier Committed by Sebastian Dröge

Build GES sys

parent f9ff027a
......@@ -16,4 +16,5 @@ members = [
"gstreamer-rtsp-server-sys",
"gstreamer-webrtc-sys",
"gstreamer-gl-sys",
"gstreamer-editing-services-sys",
]
[options]
girs_dir = "gir-files"
library = "GES"
version = "1.0"
min_cfg_version = "1.0"
target_path = "gstreamer-editing-services-sys"
work_mode = "sys"
external_libraries = [
"GLib",
"GObject",
"Gio",
]
[external_libraries]
gstreamer="Gst"
gstreamer_base="GstBase"
gstreamer_pbutils="GstPbutils"
This source diff could not be displayed because it is too large. You can view the blob instead.
[badges.travis-ci]
branch = "master"
repository = "sdroege/gstreamer-sys"
[build-dependencies]
pkg-config = "0.3.7"
[dependencies]
libc = "0.2"
[dependencies.gio-sys]
git = "https://github.com/gtk-rs/sys"
[dependencies.glib-sys]
git = "https://github.com/gtk-rs/sys"
[dependencies.gobject-sys]
git = "https://github.com/gtk-rs/sys"
[dependencies.gstreamer-base-sys]
path = "../gstreamer-base-sys"
[dependencies.gstreamer-pbutils-sys]
path = "../gstreamer-pbutils-sys"
[dependencies.gstreamer-sys]
path = "../gstreamer-sys"
[dev-dependencies]
shell-words = "0.1.0"
tempdir = "0.3"
[features]
dox = []
v1_6 = []
v1_8 = ["v1_6"]
v1_10 = ["v1_8"]
v1_12 = ["v1_10"]
v1_14 = ["v1_12"]
v1_16 = ["v1_14"]
[lib]
name = "gstreamer_editing_services_sys"
[package]
authors = ["Thibault Saunier <tsaunier@igalia.com>", "Sebastian Dröge <sebastian@centricular.com>"]
build = "build.rs"
description = "FFI bindings to libges-1.0"
homepage = "https://gstreamer.freedesktop.org"
keywords = ["ffi", "gstreamer", "gnome", "multimedia", "nle"]
license = "MIT"
links = "ges-1.0"
name = "gstreamer-editing-services-sys"
readme = "README.md"
repository = "https://github.com/sdroege/gstreamer-sys"
version = "0.7.0"
# gstreamer-editing-services-sys [![crates.io](https://img.shields.io/crates/v/gstreamer-sys.svg)](https://crates.io/crates/gstreamer-sys) [![Build Status](https://travis-ci.org/sdroege/gstreamer-sys.svg?branch=master)](https://travis-ci.org/sdroege/gstreamer-sys)
[GStreamer](https://gstreamer.freedesktop.org/) (Editing Services) FFI bindings for Rust.
These bindings are providing unsafe FFI API that can be used to interface with
GStreamer. Generally they are meant to be used as the building block for
higher-level abstractions like:
* Application-side bindings for GStreamer: https://github.com/sdroege/gstreamer-rs
* Crate for writing GStreamer plugins in Rust: https://github.com/sdroege/gst-plugin-rs
The bindings are autogenerated with [gir](https://github.com/gtk-rs/gir/)
based on the [GObject-Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection/)
API metadata provided by the GStreamer project.
## LICENSE
gstreamer-sys and all crates contained here are licensed under the MIT
license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT).
GStreamer itself is licensed under the Lesser General Public License version
2.1 or (at your option) any later version:
https://www.gnu.org/licenses/lgpl-2.1.html
## Contribution
Any kinds of contributions are welcome as a pull request.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in gstreamer-rs by you shall be licensed under the MIT license as above,
without any additional terms or conditions.
extern crate pkg_config;
use pkg_config::{Config, Error};
use std::env;
use std::io::prelude::*;
use std::io;
use std::process;
fn main() {
if let Err(s) = find() {
let _ = writeln!(io::stderr(), "{}", s);
process::exit(1);
}
}
fn find() -> Result<(), Error> {
let package_name = "gst-editing-services-1.0";
let shared_libs = ["ges-1.0"];
let version = if cfg!(feature = "v1_14") {
"1.14"
} else if cfg!(feature = "v1_12") {
"1.12"
} else if cfg!(feature = "v1_10") {
"1.10"
} else if cfg!(feature = "v1_8") {
"1.8"
} else if cfg!(feature = "v1_6") {
"1.6"
} else {
"1.0"
};
if let Ok(lib_dir) = env::var("GTK_LIB_DIR") {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
println!("cargo:rustc-link-search=native={}", lib_dir);
return Ok(())
}
let target = env::var("TARGET").expect("TARGET environment variable doesn't exist");
let hardcode_shared_libs = target.contains("windows");
let mut config = Config::new();
config.atleast_version(version);
config.print_system_libs(false);
if hardcode_shared_libs {
config.cargo_metadata(false);
}
match config.probe(package_name) {
Ok(library) => {
if hardcode_shared_libs {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
for path in library.link_paths.iter() {
println!("cargo:rustc-link-search=native={}",
path.to_str().expect("library path doesn't exist"));
}
}
Ok(())
}
Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
Ok(())
}
Err(err) => Err(err),
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
// This file was generated by gir (https://github.com/gtk-rs/gir @ f5fca82)
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
// DO NOT EDIT
extern crate gstreamer_editing_services_sys;
extern crate shell_words;
extern crate tempdir;
use std::env;
use std::error::Error;
use std::path::Path;
use std::mem::{align_of, size_of};
use std::process::Command;
use std::str;
use gstreamer_editing_services_sys::*;
static PACKAGES: &[&str] = &["gst-editing-services-1.0"];
#[derive(Clone, Debug)]
struct Compiler {
pub args: Vec<String>,
}
impl Compiler {
pub fn new() -> Result<Compiler, Box<Error>> {
let mut args = get_var("CC", "cc")?;
args.push("-Wno-deprecated-declarations".to_owned());
// For %z support in printf when using MinGW.
args.push("-D__USE_MINGW_ANSI_STDIO".to_owned());
args.extend(get_var("CFLAGS", "")?);
args.extend(get_var("CPPFLAGS", "")?);
args.extend(pkg_config_cflags(PACKAGES)?);
Ok(Compiler { args })
}
pub fn define<'a, V: Into<Option<&'a str>>>(&mut self, var: &str, val: V) {
let arg = match val.into() {
None => format!("-D{}", var),
Some(val) => format!("-D{}={}", var, val),
};
self.args.push(arg);
}
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
let mut cmd = self.to_command();
cmd.arg(src);
cmd.arg("-o");
cmd.arg(out);
let status = cmd.spawn()?.wait()?;
if !status.success() {
return Err(format!("compilation command {:?} failed, {}",
&cmd, status).into());
}
Ok(())
}
fn to_command(&self) -> Command {
let mut cmd = Command::new(&self.args[0]);
cmd.args(&self.args[1..]);
cmd
}
}
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
match env::var(name) {
Ok(value) => Ok(shell_words::split(&value)?),
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
Err(err) => Err(format!("{} {}", name, err).into()),
}
}
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
if packages.is_empty() {
return Ok(Vec::new());
}
let mut cmd = Command::new("pkg-config");
cmd.arg("--cflags");
cmd.args(packages);
let out = cmd.output()?;
if !out.status.success() {
return Err(format!("command {:?} returned {}",
&cmd, out.status).into());
}
let stdout = str::from_utf8(&out.stdout)?;
Ok(shell_words::split(stdout.trim())?)
}
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
struct Layout {
size: usize,
alignment: usize,
}
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)]
struct Results {
/// Number of successfully completed tests.
passed: usize,
/// Total number of failed tests (including those that failed to compile).
failed: usize,
/// Number of tests that failed to compile.
failed_to_compile: usize,
}
impl Results {
fn record_passed(&mut self) {
self.passed += 1;
}
fn record_failed(&mut self) {
self.failed += 1;
}
fn record_failed_to_compile(&mut self) {
self.failed += 1;
self.failed_to_compile += 1;
}
fn summary(&self) -> String {
format!(
"{} passed; {} failed (compilation errors: {})",
self.passed,
self.failed,
self.failed_to_compile)
}
fn expect_total_success(&self) {
if self.failed == 0 {
println!("OK: {}", self.summary());
} else {
panic!("FAILED: {}", self.summary());
};
}
}
#[test]
fn cross_validate_constants_with_c() {
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
let cc = Compiler::new().expect("configured compiler");
assert_eq!("1",
get_c_value(tmpdir.path(), &cc, "1").expect("C constant"),
"failed to obtain correct constant value for 1");
let mut results : Results = Default::default();
for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() {
match get_c_value(tmpdir.path(), &cc, name) {
Err(e) => {
results.record_failed_to_compile();
eprintln!("{}", e);
},
Ok(ref c_value) => {
if rust_value == c_value {
results.record_passed();
} else {
results.record_failed();
eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}",
name, rust_value, c_value);
}
}
};
if (i + 1) % 25 == 0 {
println!("constants ... {}", results.summary());
}
}
results.expect_total_success();
}
#[test]
fn cross_validate_layout_with_c() {
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
let cc = Compiler::new().expect("configured compiler");
assert_eq!(Layout {size: 1, alignment: 1},
get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"),
"failed to obtain correct layout for char type");
let mut results : Results = Default::default();
for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() {
match get_c_layout(tmpdir.path(), &cc, name) {
Err(e) => {
results.record_failed_to_compile();
eprintln!("{}", e);
},
Ok(c_layout) => {
if rust_layout == c_layout {
results.record_passed();
} else {
results.record_failed();
eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}",
name, rust_layout, &c_layout);
}
}
};
if (i + 1) % 25 == 0 {
println!("layout ... {}", results.summary());
}
}
results.expect_total_success();
}
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
let exe = dir.join("layout");
let mut cc = cc.clone();
cc.define("ABI_TYPE_NAME", name);
cc.compile(Path::new("tests/layout.c"), &exe)?;
let mut abi_cmd = Command::new(exe);
let output = abi_cmd.output()?;
if !output.status.success() {
return Err(format!("command {:?} failed, {:?}",
&abi_cmd, &output).into());
}
let stdout = str::from_utf8(&output.stdout)?;
let mut words = stdout.trim().split_whitespace();
let size = words.next().unwrap().parse().unwrap();
let alignment = words.next().unwrap().parse().unwrap();
Ok(Layout {size, alignment})
}
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
let exe = dir.join("constant");
let mut cc = cc.clone();
cc.define("ABI_CONSTANT_NAME", name);
cc.compile(Path::new("tests/constant.c"), &exe)?;
let mut abi_cmd = Command::new(exe);
let output = abi_cmd.output()?;
if !output.status.success() {
return Err(format!("command {:?} failed, {:?}",
&abi_cmd, &output).into());
}
Ok(str::from_utf8(&output.stdout)?.trim().to_owned())
}
const RUST_LAYOUTS: &[(&str, Layout)] = &[
("GESAsset", Layout {size: size_of::<GESAsset>(), alignment: align_of::<GESAsset>()}),
("GESAssetClass", Layout {size: size_of::<GESAssetClass>(), alignment: align_of::<GESAssetClass>()}),
("GESAssetLoadingReturn", Layout {size: size_of::<GESAssetLoadingReturn>(), alignment: align_of::<GESAssetLoadingReturn>()}),
("GESAudioSource", Layout {size: size_of::<GESAudioSource>(), alignment: align_of::<GESAudioSource>()}),
("GESAudioSourceClass", Layout {size: size_of::<GESAudioSourceClass>(), alignment: align_of::<GESAudioSourceClass>()}),
("GESAudioTestSource", Layout {size: size_of::<GESAudioTestSource>(), alignment: align_of::<GESAudioTestSource>()}),
("GESAudioTestSourceClass", Layout {size: size_of::<GESAudioTestSourceClass>(), alignment: align_of::<GESAudioTestSourceClass>()}),
("GESAudioTrack", Layout {size: size_of::<GESAudioTrack>(), alignment: align_of::<GESAudioTrack>()}),
("GESAudioTrackClass", Layout {size: size_of::<GESAudioTrackClass>(), alignment: align_of::<GESAudioTrackClass>()}),
("GESAudioTransition", Layout {size: size_of::<GESAudioTransition>(), alignment: align_of::<GESAudioTransition>()}),
("GESAudioTransitionClass", Layout {size: size_of::<GESAudioTransitionClass>(), alignment: align_of::<GESAudioTransitionClass>()}),
("GESAudioUriSource", Layout {size: size_of::<GESAudioUriSource>(), alignment: align_of::<GESAudioUriSource>()}),
("GESAudioUriSourceClass", Layout {size: size_of::<GESAudioUriSourceClass>(), alignment: align_of::<GESAudioUriSourceClass>()}),
("GESBaseEffect", Layout {size: size_of::<GESBaseEffect>(), alignment: align_of::<GESBaseEffect>()}),
("GESBaseEffectClass", Layout {size: size_of::<GESBaseEffectClass>(), alignment: align_of::<GESBaseEffectClass>()}),
("GESBaseEffectClip", Layout {size: size_of::<GESBaseEffectClip>(), alignment: align_of::<GESBaseEffectClip>()}),
("GESBaseEffectClipClass", Layout {size: size_of::<GESBaseEffectClipClass>(), alignment: align_of::<GESBaseEffectClipClass>()}),
("GESBaseTransitionClip", Layout {size: size_of::<GESBaseTransitionClip>(), alignment: align_of::<GESBaseTransitionClip>()}),
("GESBaseTransitionClipClass", Layout {size: size_of::<GESBaseTransitionClipClass>(), alignment: align_of::<GESBaseTransitionClipClass>()}),
("GESBaseXmlFormatter", Layout {size: size_of::<GESBaseXmlFormatter>(), alignment: align_of::<GESBaseXmlFormatter>()}),
("GESBaseXmlFormatterClass", Layout {size: size_of::<GESBaseXmlFormatterClass>(), alignment: align_of::<GESBaseXmlFormatterClass>()}),
("GESChildrenControlMode", Layout {size: size_of::<GESChildrenControlMode>(), alignment: align_of::<GESChildrenControlMode>()}),
("GESClip", Layout {size: size_of::<GESClip>(), alignment: align_of::<GESClip>()}),
("GESClipAsset", Layout {size: size_of::<GESClipAsset>(), alignment: align_of::<GESClipAsset>()}),
("GESClipAssetClass", Layout {size: size_of::<GESClipAssetClass>(), alignment: align_of::<GESClipAssetClass>()}),
("GESClipClass", Layout {size: size_of::<GESClipClass>(), alignment: align_of::<GESClipClass>()}),
("GESCommandLineFormatter", Layout {size: size_of::<GESCommandLineFormatter>(), alignment: align_of::<GESCommandLineFormatter>()}),
("GESCommandLineFormatterClass", Layout {size: size_of::<GESCommandLineFormatterClass>(), alignment: align_of::<GESCommandLineFormatterClass>()}),
("GESContainer", Layout {size: size_of::<GESContainer>(), alignment: align_of::<GESContainer>()}),
("GESContainerClass", Layout {size: size_of::<GESContainerClass>(), alignment: align_of::<GESContainerClass>()}),
("GESEdge", Layout {size: size_of::<GESEdge>(), alignment: align_of::<GESEdge>()}),
("GESEditMode", Layout {size: size_of::<GESEditMode>(), alignment: align_of::<GESEditMode>()}),
("GESEffect", Layout {size: size_of::<GESEffect>(), alignment: align_of::<GESEffect>()}),
("GESEffectAsset", Layout {size: size_of::<GESEffectAsset>(), alignment: align_of::<GESEffectAsset>()}),
("GESEffectAssetClass", Layout {size: size_of::<GESEffectAssetClass>(), alignment: align_of::<GESEffectAssetClass>()}),
("GESEffectClass", Layout {size: size_of::<GESEffectClass>(), alignment: align_of::<GESEffectClass>()}),
("GESEffectClip", Layout {size: size_of::<GESEffectClip>(), alignment: align_of::<GESEffectClip>()}),
("GESEffectClipClass", Layout {size: size_of::<GESEffectClipClass>(), alignment: align_of::<GESEffectClipClass>()}),
("GESError", Layout {size: size_of::<GESError>(), alignment: align_of::<GESError>()}),
("GESExtractableInterface", Layout {size: size_of::<GESExtractableInterface>(), alignment: align_of::<GESExtractableInterface>()}),
("GESFormatter", Layout {size: size_of::<GESFormatter>(), alignment: align_of::<GESFormatter>()}),
("GESFormatterClass", Layout {size: size_of::<GESFormatterClass>(), alignment: align_of::<GESFormatterClass>()}),
("GESGroup", Layout {size: size_of::<GESGroup>(), alignment: align_of::<GESGroup>()}),
("GESGroupClass", Layout {size: size_of::<GESGroupClass>(), alignment: align_of::<GESGroupClass>()}),
("GESImageSource", Layout {size: size_of::<GESImageSource>(), alignment: align_of::<GESImageSource>()}),
("GESImageSourceClass", Layout {size: size_of::<GESImageSourceClass>(), alignment: align_of::<GESImageSourceClass>()}),
("GESLayer", Layout {size: size_of::<GESLayer>(), alignment: align_of::<GESLayer>()}),
("GESLayerClass", Layout {size: size_of::<GESLayerClass>(), alignment: align_of::<GESLayerClass>()}),
("GESMetaContainerInterface", Layout {size: size_of::<GESMetaContainerInterface>(), alignment: align_of::<GESMetaContainerInterface>()}),
("GESMetaFlag", Layout {size: size_of::<GESMetaFlag>(), alignment: align_of::<GESMetaFlag>()}),
("GESMultiFileSource", Layout {size: size_of::<GESMultiFileSource>(), alignment: align_of::<GESMultiFileSource>()}),
("GESMultiFileSourceClass", Layout {size: size_of::<GESMultiFileSourceClass>(), alignment: align_of::<GESMultiFileSourceClass>()}),
("GESOperation", Layout {size: size_of::<GESOperation>(), alignment: align_of::<GESOperation>()}),
("GESOperationClass", Layout {size: size_of::<GESOperationClass>(), alignment: align_of::<GESOperationClass>()}),
("GESOperationClip", Layout {size: size_of::<GESOperationClip>(), alignment: align_of::<GESOperationClip>()}),
("GESOperationClipClass", Layout {size: size_of::<GESOperationClipClass>(), alignment: align_of::<GESOperationClipClass>()}),
("GESOverlayClip", Layout {size: size_of::<GESOverlayClip>(), alignment: align_of::<GESOverlayClip>()}),
("GESOverlayClipClass", Layout {size: size_of::<GESOverlayClipClass>(), alignment: align_of::<GESOverlayClipClass>()}),
("GESPipeline", Layout {size: size_of::<GESPipeline>(), alignment: align_of::<GESPipeline>()}),
("GESPipelineClass", Layout {size: size_of::<GESPipelineClass>(), alignment: align_of::<GESPipelineClass>()}),
("GESPipelineFlags", Layout {size: size_of::<GESPipelineFlags>(), alignment: align_of::<GESPipelineFlags>()}),
("GESPitiviFormatter", Layout {size: size_of::<GESPitiviFormatter>(), alignment: align_of::<GESPitiviFormatter>()}),
("GESPitiviFormatterClass", Layout {size: size_of::<GESPitiviFormatterClass>(), alignment: align_of::<GESPitiviFormatterClass>()}),
("GESProject", Layout {size: size_of::<GESProject>(), alignment: align_of::<GESProject>()}),
("GESProjectClass", Layout {size: size_of::<GESProjectClass>(), alignment: align_of::<GESProjectClass>()}),
("GESSource", Layout {size: size_of::<GESSource>(), alignment: align_of::<GESSource>()}),
("GESSourceClass", Layout {size: size_of::<GESSourceClass>(), alignment: align_of::<GESSourceClass>()}),
("GESSourceClip", Layout {size: size_of::<GESSourceClip>(), alignment: align_of::<GESSourceClip>()}),
("GESSourceClipClass", Layout {size: size_of::<GESSourceClipClass>(), alignment: align_of::<GESSourceClipClass>()}),
("GESTestClip", Layout {size: size_of::<GESTestClip>(), alignment: align_of::<GESTestClip>()}),
("GESTestClipClass", Layout {size: size_of::<GESTestClipClass>(), alignment: align_of::<GESTestClipClass>()}),
("GESTextHAlign", Layout {size: size_of::<GESTextHAlign>(), alignment: align_of::<GESTextHAlign>()}),
("GESTextOverlay", Layout {size: size_of::<GESTextOverlay>(), alignment: align_of::<GESTextOverlay>()}),
("GESTextOverlayClass", Layout {size: size_of::<GESTextOverlayClass>(), alignment: align_of::<GESTextOverlayClass>()}),
("GESTextOverlayClip", Layout {size: size_of::<GESTextOverlayClip>(), alignment: align_of::<GESTextOverlayClip>()}),
("GESTextOverlayClipClass", Layout {size: size_of::<GESTextOverlayClipClass>(), alignment: align_of::<GESTextOverlayClipClass>()}),
("GESTextVAlign", Layout {size: size_of::<GESTextVAlign>(), alignment: align_of::<GESTextVAlign>()}),
("GESTimeline", Layout {size: size_of::<GESTimeline>(), alignment: align_of::<GESTimeline>()}),
("GESTimelineClass", Layout {size: size_of::<GESTimelineClass>(), alignment: align_of::<GESTimelineClass>()}),
("GESTimelineElement", Layout {size: size_of::<GESTimelineElement>(), alignment: align_of::<GESTimelineElement>()}),
("GESTimelineElementClass", Layout {size: size_of::<GESTimelineElementClass>(), alignment: align_of::<GESTimelineElementClass>()}),
("GESTitleClip", Layout {size: size_of::<GESTitleClip>(), alignment: align_of::<GESTitleClip>()}),
("GESTitleClipClass", Layout {size: size_of::<GESTitleClipClass>(), alignment: align_of::<GESTitleClipClass>()}),
("GESTitleSource", Layout {size: size_of::<GESTitleSource>(), alignment: align_of::<GESTitleSource>()}),
("GESTitleSourceClass", Layout {size: size_of::<GESTitleSourceClass>(), alignment: align_of::<GESTitleSourceClass>()}),
("GESTrack", Layout {size: size_of::<GESTrack>(), alignment: align_of::<GESTrack>()}),
("GESTrackClass", Layout {size: size_of::<GESTrackClass>(), alignment: align_of::<GESTrackClass>()}),
("GESTrackElement", Layout {size: size_of::<GESTrackElement>(), alignment: align_of::<GESTrackElement>()}),
("GESTrackElementAsset", Layout {size: size_of::<GESTrackElementAsset>(), alignment: align_of::<GESTrackElementAsset>()}),
("GESTrackElementAssetClass", Layout {size: size_of::<GESTrackElementAssetClass>(), alignment: align_of::<GESTrackElementAssetClass>()}),
("GESTrackElementClass", Layout {size: size_of::<GESTrackElementClass>(), alignment: align_of::<GESTrackElementClass>()}),
("GESTrackType", Layout {size: size_of::<GESTrackType>(), alignment: align_of::<GESTrackType>()}),
("GESTransition", Layout {size: size_of::<GESTransition>(), alignment: align_of::<GESTransition>()}),
("GESTransitionClass", Layout {size: size_of::<GESTransitionClass>(), alignment: align_of::<GESTransitionClass>()}),
("GESTransitionClip", Layout {size: size_of::<GESTransitionClip>(), alignment: align_of::<GESTransitionClip>()}),
("GESTransitionClipClass", Layout {size: size_of::<GESTransitionClipClass>(), alignment: align_of::<GESTransitionClipClass>()}),
("GESUriClip", Layout {size: size_of::<GESUriClip>(), alignment: align_of::<GESUriClip>()}),
("GESUriClipAsset", Layout {size: size_of::<GESUriClipAsset>(), alignment: align_of::<GESUriClipAsset>()}),
("GESUriClipAssetClass", Layout {size: size_of::<GESUriClipAssetClass>(), alignment: align_of::<GESUriClipAssetClass>()}),
("GESUriClipClass", Layout {size: size_of::<GESUriClipClass>(), alignment: align_of::<GESUriClipClass>()}),
("GESUriSourceAsset", Layout {size: size_of::<GESUriSourceAsset>(), alignment: align_of::<GESUriSourceAsset>()}),
("GESUriSourceAssetClass", Layout {size: size_of::<GESUriSourceAssetClass>(), alignment: align_of::<GESUriSourceAssetClass>()}),
("GESVideoSource", Layout {size: size_of::<GESVideoSource>(), alignment: align_of::<GESVideoSource>()}),
("GESVideoSourceClass", Layout {size: size_of::<GESVideoSourceClass>(), alignment: align_of::<GESVideoSourceClass>()}),
("GESVideoStandardTransitionType", Layout {size: size_of::<GESVideoStandardTransitionType>(), alignment: align_of::<GESVideoStandardTransitionType>()}),
("GESVideoTestPattern", Layout {size: size_of::<GESVideoTestPattern>(), alignment: align_of::<GESVideoTestPattern>()}),
("GESVideoTestSource", Layout {size: size_of::<GESVideoTestSource>(), alignment: align_of::<GESVideoTestSource>()}),
("GESVideoTestSourceClass", Layout {size: size_of::<GESVideoTestSourceClass>(), alignment: align_of::<GESVideoTestSourceClass>()}),
("GESVideoTrack", Layout {size: size_of::<GESVideoTrack>(), alignment: align_of::<GESVideoTrack>()}),
("GESVideoTrackClass", Layout {size: size_of::<GESVideoTrackClass>(), alignment: align_of::<GESVideoTrackClass>()}),
("GESVideoTransition", Layout {size: size_of::<GESVideoTransition>(), alignment: align_of::<GESVideoTransition>()}),
("GESVideoTransitionClass", Layout {size: size_of::<GESVideoTransitionClass>(), alignment: align_of::<GESVideoTransitionClass>()}),
("GESVideoUriSource", Layout {size: size_of::<GESVideoUriSource>(), alignment: align_of::<GESVideoUriSource>()}),
("GESVideoUriSourceClass", Layout {size: size_of::<GESVideoUriSourceClass>(), alignment: align_of::<GESVideoUriSourceClass>()}),
("GESXmlFormatter", Layout {size: size_of::<GESXmlFormatter>(), alignment: align_of::<GESXmlFormatter>()}),
("GESXmlFormatterClass", Layout {size: size_of::<GESXmlFormatterClass>(), alignment: align_of::<GESXmlFormatterClass>()}),
];
const RUST_CONSTANTS: &[(&str, &str)] = &[
("GES_ASSET_LOADING_ASYNC", "1"),
("GES_ASSET_LOADING_ERROR", "0"),
("GES_ASSET_LOADING_OK", "2"),
("GES_CHILDREN_IGNORE_NOTIFIES", "1"),
("GES_CHILDREN_LAST", "4"),
("GES_CHILDREN_UPDATE", "0"),
("GES_CHILDREN_UPDATE_ALL_VALUES", "3"),
("GES_CHILDREN_UPDATE_OFFSETS", "2"),
("GES_EDGE_END", "1"),
("GES_EDGE_NONE", "2"),
("GES_EDGE_START", "0"),
("GES_EDIT_MODE_NORMAL", "0"),
("GES_EDIT_MODE_RIPPLE", "1"),
("GES_EDIT_MODE_ROLL", "2"),
("GES_EDIT_MODE_SLIDE", "4"),
("GES_EDIT_MODE_TRIM", "3"),
("GES_ERROR_ASSET_LOADING", "1"),
("GES_ERROR_ASSET_WRONG_ID", "0"),
("GES_ERROR_FORMATTER_MALFORMED_INPUT_FILE", "2"),
("GES_META_DESCRIPTION", "description"),
("GES_META_FORMATTER_EXTENSION", "extension"),
("GES_META_FORMATTER_MIMETYPE", "mimetype"),
("GES_META_FORMATTER_NAME", "name"),
("GES_META_FORMATTER_RANK", "rank"),
("GES_META_FORMATTER_VERSION", "version"),
("GES_META_FORMAT_VERSION", "format-version"),
("GES_META_READABLE", "1"),
("GES_META_READ_WRITE", "3"),
("GES_META_VOLUME", "volume"),
("GES_META_VOLUME_DEFAULT", "1.000000"),
("GES_META_WRITABLE", "2"),
("GES_MULTI_FILE_URI_PREFIX", "multifile://"),
("GES_PADDING", "4"),
("GES_PADDING_LARGE", "20"),
("GES_PIPELINE_MODE_PREVIEW", "3"),
("GES_PIPELINE_MODE_PREVIEW_AUDIO", "1"),
("GES_PIPELINE_MODE_PREVIEW_VIDEO", "2"),
("GES_PIPELINE_MODE_RENDER", "4"),
("GES_PIPELINE_MODE_SMART_RENDER", "8"),
("GES_TEXT_HALIGN_ABSOLUTE", "5"),
("GES_TEXT_HALIGN_CENTER", "1"),
("GES_TEXT_HALIGN_LEFT", "0"),
("GES_TEXT_HALIGN_POSITION", "4"),
("GES_TEXT_HALIGN_RIGHT", "2"),
("GES_TEXT_VALIGN_ABSOLUTE", "5"),
("GES_TEXT_VALIGN_BASELINE", "0"),
("GES_TEXT_VALIGN_BOTTOM", "1"),
("GES_TEXT_VALIGN_CENTER", "4"),
("GES_TEXT_VALIGN_POSITION", "3"),
("GES_TEXT_VALIGN_TOP", "2"),
("GES_TRACK_TYPE_AUDIO", "2"),
("GES_TRACK_TYPE_CUSTOM", "16"),
("GES_TRACK_TYPE_TEXT", "8"),
("GES_TRACK_TYPE_UNKNOWN", "1"),
("GES_TRACK_TYPE_VIDEO", "4"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL", "45"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL", "46"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H", "22"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V", "21"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D", "65"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L", "66"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R", "68"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U", "67"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR", "1"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB", "2"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H", "44"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V", "43"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC", "25"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL", "6"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR", "5"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC", "26"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC", "24"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC", "23"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL", "3"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR", "4"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12", "201"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3", "202"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6", "203"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9", "204"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE", "512"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL", "41"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR", "42"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH", "236"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV", "235"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH", "214"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV", "213"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH", "228"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV", "227"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD", "226"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL", "246"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL", "245"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV", "225"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B", "233"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR", "212"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT", "211"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L", "234"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R", "232"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T", "231"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI", "7"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO", "8"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT", "101"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD", "47"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD", "48"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE", "0"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB", "207"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH", "206"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV", "205"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B", "253"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L", "252"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R", "254"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T", "251"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB", "223"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL", "242"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR", "243"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL", "224"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR", "222"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT", "221"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL", "241"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR", "244"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D", "61"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L", "62"),
("GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R", "64"),