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>()
|
||||
.expect("Expected a gst::Pipeline");
|
||||
|
||||
let text_src = gst::ElementFactory::make("appsrc", Some("text-src")).unwrap();
|
||||
text_src.set_property("is-live", true);
|
||||
text_src.set_property("caps",
|
||||
let text_src = gst::ElementFactory::make("appsrc", Some("text-src")).unwrap().downcast::<gst_app::AppSrc>().unwrap();
|
||||
text_src.set_is_live(true);
|
||||
text_src.set_format(gst::Format::Time);
|
||||
text_src.set_caps(Some(
|
||||
&gst::Caps::builder("text/x-raw")
|
||||
.field("format", "utf8")
|
||||
.build(),
|
||||
);
|
||||
));
|
||||
pipeline.add(&text_src).expect("Failed to add elements to pipeline");
|
||||
|
||||
let converter = pipeline.by_name("converter").unwrap();
|
||||
|
|
Loading…
Reference in a new issue