mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-02 09:43:48 +00:00
ts: standalone example: add a ts-queue
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2278>
This commit is contained in:
parent
7ed24eac0a
commit
e3c97941ec
1 changed files with 12 additions and 1 deletions
|
@ -47,6 +47,7 @@ fn main() {
|
|||
use std::time::Instant;
|
||||
|
||||
gst::init().unwrap();
|
||||
gstthreadshare::plugin_register_static().unwrap();
|
||||
self::plugin_register_static().unwrap();
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
|
@ -68,6 +69,16 @@ fn main() {
|
|||
.build()
|
||||
.unwrap();
|
||||
|
||||
let queue = gst::ElementFactory::make("ts-queue")
|
||||
.name(format!("queue-{i}").as_str())
|
||||
.property("context", &ctx_name)
|
||||
.property("context-wait", args.wait)
|
||||
.property("max-size-buffers", 1u32)
|
||||
.property("max-size-bytes", 0u32)
|
||||
.property("max-size-time", 0u64)
|
||||
.build()
|
||||
.unwrap();
|
||||
|
||||
let sink = gst::ElementFactory::make(args.sink.element_name())
|
||||
.name(format!("sink-{i}").as_str())
|
||||
.property("context", &ctx_name)
|
||||
|
@ -97,7 +108,7 @@ fn main() {
|
|||
}
|
||||
}
|
||||
|
||||
let elements = &[&src, &sink];
|
||||
let elements = &[&src, &queue, &sink];
|
||||
pipeline.add_many(elements).unwrap();
|
||||
gst::Element::link_many(elements).unwrap();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue