examples: glupload example

parent 2c13a753
Pipeline #11238 passed with stages
in 15 minutes and 29 seconds
......@@ -6,6 +6,7 @@ authors = ["Sebastian Dröge <sebastian@centricular.com>"]
[dependencies]
glib = { git = "https://github.com/gtk-rs/glib", features = ["subclassing"] }
gstreamer = { path = "../gstreamer" }
gstreamer-gl = { path = "../gstreamer-gl", optional = true }
gstreamer-app = { path = "../gstreamer-app" }
gstreamer-audio = { path = "../gstreamer-audio" }
gstreamer-video = { path = "../gstreamer-video" }
......@@ -25,6 +26,12 @@ failure_derive = "0.1"
cairo-rs = { git = "https://github.com/gtk-rs/cairo", features=["use_glib"], optional = true }
pango = { git = "https://github.com/gtk-rs/pango", optional = true }
pangocairo = { git = "https://github.com/gtk-rs/pangocairo", optional = true }
# Using my personal repository (vjaquez) for glutin until
# https://github.com/tomaka/glutin/pull/1082 is merged
glutin = { git = "https://github.com/ceyusa/glutin", branch="native-display", optional = true }
[build-dependencies]
gl_generator = { version = "0.9", optional = true }
[features]
gst-player = ["gstreamer-player"]
......@@ -40,6 +47,7 @@ gst-rtsp-server-record = ["gstreamer-rtsp-server-sys", "gstreamer-rtsp-server",
default-features = []
v1_10 = ["gstreamer/v1_10"]
pango-cairo = ["pango", "pangocairo", "cairo-rs"]
gl = ["gstreamer-gl/egl", "gl_generator", "glutin"]
[[bin]]
name = "appsink"
......@@ -127,3 +135,7 @@ required-features = ["pango-cairo"]
[[bin]]
name = "ges"
required-features = ["ges"]
[[bin]]
name = "glupload"
required-features = ["gl"]
#[cfg(feature = "gl")]
extern crate gl_generator;
#[cfg(feature = "gl")]
fn generate_gl_bindings() {
let dest = std::path::PathBuf::from(&std::env::var("OUT_DIR").unwrap());
let mut file = std::fs::File::create(&dest.join("test_gl_bindings.rs")).unwrap();
gl_generator::Registry::new(
gl_generator::Api::Gles2,
(3, 0),
gl_generator::Profile::Core,
gl_generator::Fallbacks::All,
[],
)
.write_bindings(gl_generator::StructGenerator, &mut file)
.unwrap();
}
#[cfg(not(feature = "gl"))]
fn generate_gl_bindings() {}
fn main() {
println!("cargo:rerun-if-changed=build.rs");
generate_gl_bindings();
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment