Struct PadBuilder
Sourcepub struct PadBuilder<T> { /* private fields */ }Implementations§
Source§impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T>
impl<T: IsA<GhostPad> + IsA<Pad>> PadBuilder<T>
pub fn proxy_pad_activate_function<F>(self, func: F) -> Self
pub fn proxy_pad_activate_function_if_some<F>(self, func: Option<F>) -> Self
pub fn proxy_pad_activatemode_function<F>(self, func: F) -> Self
pub fn proxy_pad_activatemode_function_if_some<F>(self, func: Option<F>) -> Self
pub fn proxy_pad_chain_function<F>(self, func: F) -> Self
pub fn proxy_pad_chain_function_if_some<F>(self, func: Option<F>) -> Self
pub fn proxy_pad_chain_list_function<F>(self, func: F) -> Selfwhere
F: Fn(&ProxyPad, Option<&Object>, BufferList) -> Result<FlowSuccess, FlowError> + Send + Sync + 'static,
pub fn proxy_pad_chain_list_function_if_some<F>(self, func: Option<F>) -> Selfwhere
F: Fn(&ProxyPad, Option<&Object>, BufferList) -> Result<FlowSuccess, FlowError> + Send + Sync + 'static,
pub fn proxy_pad_event_function<F>(self, func: F) -> Self
pub fn proxy_pad_event_function_if_some<F>(self, func: Option<F>) -> Self
pub fn proxy_pad_event_full_function<F>(self, func: F) -> Self
pub fn proxy_pad_event_full_function_if_some<F>(self, func: Option<F>) -> Self
pub fn proxy_pad_getrange_function<F>(self, func: F) -> Self
pub fn proxy_pad_getrange_function_if_some<F>(self, func: Option<F>) -> Self
pub fn proxy_pad_iterate_internal_links_function<F>(self, func: F) -> Self
pub fn proxy_pad_iterate_internal_links_function_if_some<F>( self, func: Option<F>, ) -> Self
pub fn proxy_pad_link_function<F>(self, func: F) -> Selfwhere
F: Fn(&ProxyPad, Option<&Object>, &Pad) -> Result<PadLinkSuccess, PadLinkError> + Send + Sync + 'static,
pub fn proxy_pad_link_function_if_some<F>(self, func: Option<F>) -> Selfwhere
F: Fn(&ProxyPad, Option<&Object>, &Pad) -> Result<PadLinkSuccess, PadLinkError> + Send + Sync + 'static,
pub fn proxy_pad_query_function<F>(self, func: F) -> Self
pub fn proxy_pad_query_function_if_some<F>(self, func: Option<F>) -> Self
pub fn proxy_pad_unlink_function<F>(self, func: F) -> Self
pub fn proxy_pad_unlink_function_if_some<F>(self, func: Option<F>) -> Self
pub fn proxy_pad_flags(self, flags: PadFlags) -> Self
pub fn proxy_pad_flags_if_some(self, flags: Option<PadFlags>) -> Self
Sourcepub fn with_target<P: IsA<Pad> + IsA<Object>>(
self,
target: &P,
) -> Result<Self, BoolError>
pub fn with_target<P: IsA<Pad> + IsA<Object>>( self, target: &P, ) -> Result<Self, BoolError>
Specifies a target Pad for the GhostPad.
If the PadBuilder was created from
a PadTemplate and the PadTemplate has a specific name_template,
i.e. if it’s not a wildcard-name containing %u, %s or %d,
the GhostPad will automatically be named after the name_template.
If the name_template is a wildcard-name, then the target name is used,
if it is compatible. Otherwise, a specific name must be provided using
PadBuilder::name or PadBuilder::name_if_some.
Use generated_name() to keep the gst::Object
automatically generated unique name.
Source§impl<T: IsA<Pad> + IsA<Object> + IsClass> PadBuilder<T>
impl<T: IsA<Pad> + IsA<Object> + IsClass> PadBuilder<T>
Sourcepub fn new(direction: PadDirection) -> Self
pub fn new(direction: PadDirection) -> Self
Creates a PadBuilder with the specified PadDirection.
Sourcepub fn from_static_template(templ: &StaticPadTemplate) -> Self
pub fn from_static_template(templ: &StaticPadTemplate) -> Self
Creates a PadBuilder from the specified StaticPadTemplate.
If the StaticPadTemplate has a specific name_template,
i.e. if it’s not a wildcard-name containing %u, %s or %d,
the Pad will automatically be named after the name_template.
Use generated_name() to keep the gst::Object
automatically generated unique name.
Sourcepub fn from_template(templ: &PadTemplate) -> Self
pub fn from_template(templ: &PadTemplate) -> Self
Creates a PadBuilder from the specified PadTemplate.
If the PadTemplate has a specific name_template,
i.e. if it’s not a wildcard-name containing %u, %s or %d,
the Pad will automatically be named after the name_template.
Use generated_name() to keep the gst::Object
automatically generated unique name.
Sourcepub fn generated_name(self) -> Self
pub fn generated_name(self) -> Self
Uses the gst::Object generated unique name.
Sourcepub fn maybe_name<N: Into<String>>(self, name: Option<N>) -> Self
👎Deprecated: use name_if_some() instead
pub fn maybe_name<N: Into<String>>(self, name: Option<N>) -> Self
name_if_some() insteadOptionally sets the name of the Pad.
This method is convenient when the name is provided as an Option.
If the name is None, this has no effect.
Sourcepub fn name_if_some<N: Into<String>>(self, name: Option<N>) -> Self
pub fn name_if_some<N: Into<String>>(self, name: Option<N>) -> Self
Optionally sets the name of the Pad.
This method is convenient when the name is provided as an Option.
If the name is None, this has no effect.
pub fn activate_function<F>(self, func: F) -> Self
pub fn activate_function_if_some<F>(self, func: Option<F>) -> Self
pub fn activatemode_function<F>(self, func: F) -> Self
pub fn activatemode_function_if_some<F>(self, func: Option<F>) -> Self
pub fn chain_function<F>(self, func: F) -> Self
pub fn chain_function_if_some<F>(self, func: Option<F>) -> Self
pub fn chain_list_function<F>(self, func: F) -> Selfwhere
F: Fn(&T, Option<&Object>, BufferList) -> Result<FlowSuccess, FlowError> + Send + Sync + 'static,
pub fn chain_list_function_if_some<F>(self, func: Option<F>) -> Selfwhere
F: Fn(&T, Option<&Object>, BufferList) -> Result<FlowSuccess, FlowError> + Send + Sync + 'static,
pub fn event_function<F>(self, func: F) -> Self
pub fn event_function_if_some<F>(self, func: Option<F>) -> Self
pub fn event_full_function<F>(self, func: F) -> Self
pub fn event_full_function_if_some<F>(self, func: Option<F>) -> Self
pub fn getrange_function<F>(self, func: F) -> Self
pub fn getrange_function_if_some<F>(self, func: Option<F>) -> Self
pub fn iterate_internal_links_function<F>(self, func: F) -> Self
pub fn iterate_internal_links_function_if_some<F>(self, func: Option<F>) -> Self
pub fn link_function<F>(self, func: F) -> Selfwhere
F: Fn(&T, Option<&Object>, &Pad) -> Result<PadLinkSuccess, PadLinkError> + Send + Sync + 'static,
pub fn link_function_if_some<F>(self, func: Option<F>) -> Selfwhere
F: Fn(&T, Option<&Object>, &Pad) -> Result<PadLinkSuccess, PadLinkError> + Send + Sync + 'static,
pub fn query_function<F>(self, func: F) -> Self
pub fn query_function_if_some<F>(self, func: Option<F>) -> Self
pub fn unlink_function<F>(self, func: F) -> Self
pub fn unlink_function_if_some<F>(self, func: Option<F>) -> Self
pub fn flags(self, flags: PadFlags) -> Self
pub fn flags_if_some(self, flags: Option<PadFlags>) -> Self
Sourcepub fn build(self) -> T
pub fn build(self) -> T
Builds the Pad.
§Panics
Panics if the Pad was built from a PadTemplate
with a wildcard-name name_template (i.e. containing %u, %s or %d)
and no specific name was provided using PadBuilder::name
or PadBuilder::name_if_some, or for GhostPads,
by defining a target.
Use generated_name() to keep the gst::Object
automatically generated unique name.
Auto Trait Implementations§
impl<T> Freeze for PadBuilder<T>where
T: Freeze,
impl<T> RefUnwindSafe for PadBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for PadBuilder<T>where
T: Send,
impl<T> Sync for PadBuilder<T>where
T: Sync,
impl<T> Unpin for PadBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for PadBuilder<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more