mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 17:41:05 +00:00
Regenerate everything with latest gir
This commit is contained in:
parent
a6c69264b3
commit
8ac0f92d7d
108 changed files with 486 additions and 360 deletions
|
@ -15,7 +15,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_2 = ["gstreamer-sys/v1_2", "gstreamer-base-sys/v1_2"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_app_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_app_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-app-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_2 = ["gstreamer-sys/v1_2", "gstreamer-base-sys/v1_2"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_audio_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_audio_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-audio-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -15,7 +15,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_0_1 = []
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_base_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_base_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-base-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -15,7 +15,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
dox = ["v1_16"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_check_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_check_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-check-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -24,7 +24,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
dox = ["v1_16"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_editing_services_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_editing_services_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gst-editing-services-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -24,7 +24,7 @@ features = ["v1_14"]
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
dox = ["v1_16"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_gl_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_gl_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-gl-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_2 = ["gstreamer-sys/v1_2", "gstreamer-base-sys/v1_2"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_mpegts_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_mpegts_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-mpegts-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_2 = ["gstreamer-sys/v1_2"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_net_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_net_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-net-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -21,7 +21,7 @@ path = "../gstreamer-video-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_2 = ["gstreamer-sys/v1_2", "gstreamer-audio-sys/v1_2", "gstreamer-video-sys/v1_2"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_pbutils_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_pbutils_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-pbutils-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -20,7 +20,7 @@ features = ["v1_12"]
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-video-sys/v1_14"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_player_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_player_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-player-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_4 = ["v1_2"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_rtp_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_rtp_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-rtp-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -27,7 +27,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
dox = ["v1_16"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_rtsp_server_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_rtsp_server_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-rtsp-server-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -21,7 +21,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
dox = ["v1_16"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_rtsp_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_rtsp_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-rtsp-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -15,7 +15,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
dox = ["v1_16"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_sdp_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_sdp_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-sdp-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -12,7 +12,7 @@ git = "https://github.com/gtk-rs/sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_0_10 = []
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_2 = ["gstreamer-sys/v1_2", "gstreamer-base-sys/v1_2"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_tag_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_tag_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-tag-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#include "manual.h"
|
||||
|
|
|
@ -18,7 +18,7 @@ path = "../gstreamer-sys"
|
|||
|
||||
[dev-dependencies]
|
||||
shell-words = "0.1.0"
|
||||
tempdir = "0.3"
|
||||
tempfile = "3"
|
||||
|
||||
[features]
|
||||
v1_0_3 = []
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8f15e55)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(not(feature = "dox"))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 7cca816)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// This file was generated by gir (https://github.com/gtk-rs/gir @ 1ee9edf)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ a6c6926)
|
||||
// DO NOT EDIT
|
||||
|
||||
extern crate gstreamer_video_sys;
|
||||
extern crate shell_words;
|
||||
extern crate tempdir;
|
||||
extern crate tempfile;
|
||||
use gstreamer_video_sys::*;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
|
@ -12,6 +12,7 @@ use std::mem::{align_of, size_of};
|
|||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::str;
|
||||
use tempfile::Builder;
|
||||
|
||||
static PACKAGES: &[&str] = &["gstreamer-video-1.0"];
|
||||
|
||||
|
@ -21,7 +22,7 @@ struct Compiler {
|
|||
}
|
||||
|
||||
impl Compiler {
|
||||
pub fn new() -> Result<Compiler, Box<Error>> {
|
||||
pub fn new() -> Result<Compiler, Box<dyn Error>> {
|
||||
let mut args = get_var("CC", "cc")?;
|
||||
args.push("-Wno-deprecated-declarations".to_owned());
|
||||
// For %z support in printf when using MinGW.
|
||||
|
@ -40,7 +41,7 @@ impl Compiler {
|
|||
self.args.push(arg);
|
||||
}
|
||||
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<Error>> {
|
||||
pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box<dyn Error>> {
|
||||
let mut cmd = self.to_command();
|
||||
cmd.arg(src);
|
||||
cmd.arg("-o");
|
||||
|
@ -59,7 +60,7 @@ impl Compiler {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
||||
fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
match env::var(name) {
|
||||
Ok(value) => Ok(shell_words::split(&value)?),
|
||||
Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?),
|
||||
|
@ -67,7 +68,7 @@ fn get_var(name: &str, default: &str) -> Result<Vec<String>, Box<Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<Error>> {
|
||||
fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||
if packages.is_empty() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
@ -126,7 +127,10 @@ impl Results {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_constants_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -163,7 +167,10 @@ fn cross_validate_constants_with_c() {
|
|||
|
||||
#[test]
|
||||
fn cross_validate_layout_with_c() {
|
||||
let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory");
|
||||
let tmpdir = Builder::new()
|
||||
.prefix("abi")
|
||||
.tempdir()
|
||||
.expect("temporary directory");
|
||||
let cc = Compiler::new().expect("configured compiler");
|
||||
|
||||
assert_eq!(
|
||||
|
@ -201,7 +208,7 @@ fn cross_validate_layout_with_c() {
|
|||
results.expect_total_success();
|
||||
}
|
||||
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Error>> {
|
||||
fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<dyn Error>> {
|
||||
let exe = dir.join("layout");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_TYPE_NAME", name);
|
||||
|
@ -220,7 +227,7 @@ fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result<Layout, Box<Err
|
|||
Ok(Layout { size, alignment })
|
||||
}
|
||||
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<Error>> {
|
||||
fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result<String, Box<dyn Error>> {
|
||||
let exe = dir.join("constant");
|
||||
let mut cc = cc.clone();
|
||||
cc.define("ABI_CONSTANT_NAME", name);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue