However I found another to make the appsrc, which allows me to do appsrc.push_buffer later on
let appsrc = AppSrc::builder()
.is_live(true)
.format(gst::Format::Time)
.min_latency(cam_latency)
.build();
But all properties are not there (such as max-buffers)
What’s the preferred way to use appsrc? As a gst_element (but then I need how to I call push_buffer), or as a gst_appsrc (but access to the properties is different)
124 | let appsrc = self.appsrc.dynamic_cast::().unwrap();
| ^^^^^^^^^^^ ------------------------ self.appsrc moved due to this method call
| |
| move occurs because self.appsrc has type gstreamer::Element, which does not implement the Copy trait
error[E0599]: no method named `max_buffers` found for struct `AppSrcBuilder` in the current scope
--> src/gst_av_pipeline.rs:28:14
|
25 | let appsrc = AppSrc::builder()
| ______________________-
26 | | .is_live(true)
27 | | .format(gst::Format::Time)
28 | | .max_buffers(100)
| |_____________-^^^^^^^^^^^
|
I see this in the source code (gstreamer-app-0.23.0/src/app_src.rs)