forked from mirrors/gstreamer-rs
Add gstreamer-mpegts-sys bindings
Fixes https://github.com/sdroege/gstreamer-sys/pull/4
This commit is contained in:
parent
52b7c65080
commit
b3cc2251ba
9 changed files with 7280 additions and 0 deletions
|
@ -9,4 +9,5 @@ members = [
|
|||
"gstreamer-pbutils-sys",
|
||||
"gstreamer-app-sys",
|
||||
"gstreamer-player-sys",
|
||||
"gstreamer-mpegts-sys",
|
||||
]
|
||||
|
|
13
Gir_GstMpegts.toml
Normal file
13
Gir_GstMpegts.toml
Normal file
|
@ -0,0 +1,13 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstMpegts"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.12"
|
||||
target_path = "gstreamer-mpegts-sys"
|
||||
work_mode = "sys"
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
"Gst",
|
||||
]
|
5276
gir-files/GstMpegts-1.0.gir
Normal file
5276
gir-files/GstMpegts-1.0.gir
Normal file
File diff suppressed because it is too large
Load diff
6
gstreamer-mpegts-sys/CHANGELOG.md
Normal file
6
gstreamer-mpegts-sys/CHANGELOG.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html),
|
||||
specifically the [variant used by Rust](http://doc.crates.io/manifest.html#the-version-field).
|
37
gstreamer-mpegts-sys/Cargo.toml
Normal file
37
gstreamer-mpegts-sys/Cargo.toml
Normal file
|
@ -0,0 +1,37 @@
|
|||
[badges.travis-ci]
|
||||
branch = "master"
|
||||
repository = "sdroege/gstreamer-sys"
|
||||
|
||||
[build-dependencies]
|
||||
pkg-config = "0.3.7"
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2"
|
||||
|
||||
[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-sys]
|
||||
path = "../gstreamer-sys"
|
||||
|
||||
[lib]
|
||||
name = "gstreamer_mpegts_sys"
|
||||
|
||||
[package]
|
||||
authors = ["Russel Winder <russel@winder.org.uk>", "Sebastian Dröge <sebastian@centricular.com>"]
|
||||
build = "build.rs"
|
||||
description = "FFI bindings to libgstmpegts-1.0"
|
||||
homepage = "https://gstreamer.freedesktop.org"
|
||||
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
|
||||
license = "MIT"
|
||||
links = "gstmpegts-1.0"
|
||||
name = "gstreamer-mpegts-sys"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/sdroege/gstreamer-sys"
|
||||
version = "0.3.0"
|
21
gstreamer-mpegts-sys/LICENSE
Normal file
21
gstreamer-mpegts-sys/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Russel Winder <russel@winder.org.uk>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
31
gstreamer-mpegts-sys/README.md
Normal file
31
gstreamer-mpegts-sys/README.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# gstreamer-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/) (MPEGTS library) 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-plugins-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.
|
61
gstreamer-mpegts-sys/build.rs
Normal file
61
gstreamer-mpegts-sys/build.rs
Normal file
|
@ -0,0 +1,61 @@
|
|||
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 = "gstreamer-mpegts-1.0";
|
||||
let shared_libs = ["gstmpegts-1.0"];
|
||||
let version = {
|
||||
"1.12"
|
||||
};
|
||||
|
||||
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);
|
||||
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),
|
||||
}
|
||||
}
|
||||
|
1834
gstreamer-mpegts-sys/src/lib.rs
Normal file
1834
gstreamer-mpegts-sys/src/lib.rs
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue