19 lines
546 B
Rust
19 lines
546 B
Rust
use crate::priv_prelude::*;
|
|
|
|
wrap_gst!(AutoVideoSink, gstreamer::Element);
|
|
parent_child!(Element, AutoVideoSink);
|
|
parent_child!(Bin, AutoVideoSink, downcast);
|
|
|
|
impl Sink for AutoVideoSink {}
|
|
|
|
impl AutoVideoSink {
|
|
pub fn new(name: impl AsRef<str>) -> Result<Self> {
|
|
let element = gstreamer::ElementFactory::make("autovideosink")
|
|
.name(name.as_ref())
|
|
.build()
|
|
.change_context(Error)
|
|
.attach("Failed to create autovideosink element")?;
|
|
Ok(AutoVideoSink { inner: element })
|
|
}
|
|
}
|