feat: Added PipelineExt trait for all Children of Pipelines
Some checks failed
build / checks-matrix (push) Has been cancelled
build / codecov (push) Has been cancelled
docs / docs (push) Has been cancelled
build / checks-build (push) Has been cancelled

This commit is contained in:
uttarayan21
2025-12-23 01:33:54 +05:30
parent 8d46bd2b85
commit 3382aebb1f
6 changed files with 93 additions and 136 deletions

View File

@@ -1,37 +1,6 @@
use crate::priv_prelude::*;
#[derive(Debug)]
#[repr(transparent)]
pub struct Pad {
pub(crate) inner: gstreamer::Pad,
}
impl From<gstreamer::Pad> for Pad {
fn from(inner: gstreamer::Pad) -> Self {
Self { inner }
}
}
impl From<Pad> for gstreamer::Pad {
fn from(wrapper: Pad) -> Self {
wrapper.inner
}
}
impl Pad {
pub fn into_inner(self) -> gstreamer::Pad {
self.inner
}
}
impl GstWrapper for Pad {
type GstType = gstreamer::Pad;
fn from_gst(gst: Self::GstType) -> Self {
Self { inner: gst }
}
fn into_gst(self) -> Self::GstType {
self.inner
}
fn as_gst_ref(&self) -> &Self::GstType {
&self.inner
}
}
/// Pads are link points between elements
wrap_gst!(Pad, gstreamer::Pad);
impl Pad {
pub fn ghost(target: &Pad) -> Result<Pad> {