examples/glupload: Clean up

This commit is contained in:
Marijn Suijten 2021-05-22 22:05:48 +02:00
parent 9501f71fbf
commit 036ecef4bc
No known key found for this signature in database
GPG key ID: 23E7CB3F180C39F2
2 changed files with 4 additions and 3 deletions

1
Cargo.lock generated
View file

@ -1574,6 +1574,7 @@ dependencies = [
name = "gstreamer-vulkan"
version = "0.24.0"
dependencies = [
"ash",
"bitflags 1.3.2",
"byteorder",
"glib",

View file

@ -5,6 +5,8 @@
//! <https://github.com/rust-windowing/glutin/blob/master/glutin_examples/src/lib.rs>
// {videotestsrc} - { glsinkbin }
// Or:
// {videotestsrc} - { glupload } - { filter }? - { appsink }
use std::{
ffi::{CStr, CString},
@ -649,9 +651,7 @@ impl App {
if let Some(gl_element) = gl_element {
let glupload = gst::ElementFactory::make("glupload").build()?;
pipeline.add_many([&src, &glupload])?;
pipeline.add(gl_element)?;
pipeline.add(&appsink)?;
pipeline.add_many([&src, &glupload, gl_element, appsink.upcast_ref()])?;
src.link(&glupload)?;
glupload.link(gl_element)?;