Add bindings for enum types of element properties in pipeline
Created by: js4785
There are missing enum type bindings in regards to Element
s in a given Pipeline
.
One problematic example:
let queue = gst::ElementFactory::make("queue", "queue")
.expect("Could not create queue element.");
// queue.set_property("leaky", & ??? .to_value())
// .expect("Can't set property leaky of queue element");
It isn't possible to set the leaky
property of queue
because it is of type GstQueueLeaky
, which is an enum that doesn't at all exist in gstreamer-rs
or its associated crates.
However it does (obviously) exist on C-level and gets instantiated at compile-time, and its representation on Rust-level can be easily shown:
let leaky_type = queue.get_property("leaky").unwrap().type_();
println!("{:?}", leaky_type);
Running cargo run
would give:
GstQueueLeaky
but, at least according to my understanding of the docs, I can't use the wrapper glib::types::Type
around GstQueueLeaky
to set the value of the enum to something else.
If there are currently ways around this issue, I'd like to know also. Thanks!