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 diff is collapsed.
[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 diff is collapsed.
// 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
#include "manual.h"
#include <stdio.h>
int main() {
printf(_Generic((ABI_CONSTANT_NAME),
char *: "%s",
const char *: "%s",
char: "%c",
signed char: "%hhd",
unsigned char: "%hhu",
short int: "%hd",
unsigned short int: "%hu",
int: "%d",
unsigned int: "%u",
long: "%ld",
unsigned long: "%lu",
long long: "%lld",
unsigned long long: "%llu",
double: "%f",
long double: "%ld"),
ABI_CONSTANT_NAME);
return 0;
}
// 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
#include "manual.h"
#include <stdalign.h>
#include <stdio.h>
int main() {
printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME));
return 0;
}
// Feel free to edit this file, it won't be regenerated by gir generator unless removed.
#include <ges/ges.h>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment