2019-08-05 13:19:06 +00:00
|
|
|
extern crate cc;
|
2019-06-03 10:53:58 +00:00
|
|
|
extern crate gst_plugin_version_helper;
|
2019-08-05 13:19:06 +00:00
|
|
|
extern crate pkg_config;
|
2019-06-03 10:53:58 +00:00
|
|
|
|
|
|
|
fn main() {
|
2019-08-05 13:19:06 +00:00
|
|
|
let gstreamer = pkg_config::probe_library("gstreamer-1.0").unwrap();
|
|
|
|
let gstrtp = pkg_config::probe_library("gstreamer-rtp-1.0").unwrap();
|
|
|
|
let includes = [gstreamer.include_paths, gstrtp.include_paths];
|
|
|
|
|
|
|
|
let mut build = cc::Build::new();
|
|
|
|
|
2020-02-25 08:12:55 +00:00
|
|
|
for p in includes.iter().flatten() {
|
2019-08-05 13:19:06 +00:00
|
|
|
build.include(p);
|
|
|
|
}
|
|
|
|
|
2019-12-21 09:45:43 +00:00
|
|
|
build.file("src/jitterbuffer/rtpjitterbuffer.c");
|
|
|
|
build.file("src/jitterbuffer/rtpstats.c");
|
2019-08-05 13:19:06 +00:00
|
|
|
|
2020-03-04 14:23:39 +00:00
|
|
|
build.define("RTPJitterBuffer", "TsRTPJitterBuffer");
|
|
|
|
build.define("RTPJitterBufferClass", "TsRTPJitterBufferClass");
|
|
|
|
build.define("RTPJitterBufferPrivate", "TsRTPJitterBufferClass");
|
|
|
|
|
2019-08-05 13:19:06 +00:00
|
|
|
build.compile("libthreadshare-c.a");
|
|
|
|
|
|
|
|
println!("cargo:rustc-link-lib=dylib=gstrtp-1.0");
|
|
|
|
|
|
|
|
for path in gstrtp.link_paths.iter() {
|
|
|
|
println!(
|
|
|
|
"cargo:rustc-link-search=native={}",
|
|
|
|
path.to_str().expect("library path doesn't exist")
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2019-06-03 10:53:58 +00:00
|
|
|
gst_plugin_version_helper::get_info()
|
|
|
|
}
|