First kinda working
This commit is contained in:
parent
75ea4729ba
commit
0e572be6c0
1 changed files with 5 additions and 4 deletions
|
@ -16,13 +16,14 @@ fn main() -> Result<(), Error> {
|
||||||
.downcast::<gst::Pipeline>()
|
.downcast::<gst::Pipeline>()
|
||||||
.expect("Expected a gst::Pipeline");
|
.expect("Expected a gst::Pipeline");
|
||||||
|
|
||||||
let text_src = gst::ElementFactory::make("appsrc", Some("text-src")).unwrap();
|
let text_src = gst::ElementFactory::make("appsrc", Some("text-src")).unwrap().downcast::<gst_app::AppSrc>().unwrap();
|
||||||
text_src.set_property("is-live", true);
|
text_src.set_is_live(true);
|
||||||
text_src.set_property("caps",
|
text_src.set_format(gst::Format::Time);
|
||||||
|
text_src.set_caps(Some(
|
||||||
&gst::Caps::builder("text/x-raw")
|
&gst::Caps::builder("text/x-raw")
|
||||||
.field("format", "utf8")
|
.field("format", "utf8")
|
||||||
.build(),
|
.build(),
|
||||||
);
|
));
|
||||||
pipeline.add(&text_src).expect("Failed to add elements to pipeline");
|
pipeline.add(&text_src).expect("Failed to add elements to pipeline");
|
||||||
|
|
||||||
let converter = pipeline.by_name("converter").unwrap();
|
let converter = pipeline.by_name("converter").unwrap();
|
||||||
|
|
Loading…
Reference in a new issue