Trait gstreamer::prelude::ElementExt [−][src]
pub trait ElementExt: 'static {}Show methods
fn abort_state(&self); fn add_pad<P: IsA<Pad>>(&self, pad: &P) -> Result<(), BoolError>; fn change_state(
&self,
transition: StateChange
) -> Result<StateChangeSuccess, StateChangeError>; fn continue_state(
&self,
ret: impl Into<StateChangeReturn>
) -> Result<StateChangeSuccess, StateChangeError>; fn create_all_pads(&self); fn foreach_pad<P: FnMut(&Element, &Pad) -> bool>(&self, func: P) -> bool; fn foreach_sink_pad<P: FnMut(&Element, &Pad) -> bool>(
&self,
func: P
) -> bool; fn foreach_src_pad<P: FnMut(&Element, &Pad) -> bool>(&self, func: P) -> bool; fn base_time(&self) -> ClockTime; fn bus(&self) -> Option<Bus>; fn clock(&self) -> Option<Clock>; fn compatible_pad<P: IsA<Pad>>(
&self,
pad: &P,
caps: Option<&Caps>
) -> Option<Pad>; fn compatible_pad_template(
&self,
compattempl: &PadTemplate
) -> Option<PadTemplate>; fn context(&self, context_type: &str) -> Option<Context>; fn contexts(&self) -> Vec<Context>; fn factory(&self) -> Option<ElementFactory>; fn request_pad_simple(&self, name: &str) -> Option<Pad>; fn start_time(&self) -> ClockTime; fn state(
&self,
timeout: ClockTime
) -> (Result<StateChangeSuccess, StateChangeError>, State, State); fn static_pad(&self, name: &str) -> Option<Pad>; fn is_locked_state(&self) -> bool; fn link<P: IsA<Element>>(&self, dest: &P) -> Result<(), BoolError>; fn link_filtered<P: IsA<Element>>(
&self,
dest: &P,
filter: Option<&Caps>
) -> Result<(), BoolError>; fn link_pads<P: IsA<Element>>(
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>
) -> Result<(), BoolError>; fn link_pads_filtered<P: IsA<Element>>(
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>,
filter: Option<&Caps>
) -> Result<(), BoolError>; fn link_pads_full<P: IsA<Element>>(
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>,
flags: PadLinkCheck
) -> Result<(), BoolError>; fn lost_state(&self); fn no_more_pads(&self); fn provide_clock(&self) -> Option<Clock>; fn release_request_pad<P: IsA<Pad>>(&self, pad: &P); fn remove_pad<P: IsA<Pad>>(&self, pad: &P) -> Result<(), BoolError>; fn request_pad(
&self,
templ: &PadTemplate,
name: Option<&str>,
caps: Option<&Caps>
) -> Option<Pad>; fn set_base_time(&self, time: ClockTime); fn set_bus(&self, bus: Option<&Bus>); fn set_clock<P: IsA<Clock>>(
&self,
clock: Option<&P>
) -> Result<(), BoolError>; fn set_context(&self, context: &Context); fn set_locked_state(&self, locked_state: bool) -> bool; fn set_start_time(&self, time: ClockTime); fn set_state(
&self,
state: State
) -> Result<StateChangeSuccess, StateChangeError>; fn sync_state_with_parent(&self) -> Result<(), BoolError>; fn unlink<P: IsA<Element>>(&self, dest: &P); fn unlink_pads<P: IsA<Element>>(
&self,
srcpadname: &str,
dest: &P,
destpadname: &str
); fn connect_no_more_pads<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_pad_added<F: Fn(&Self, &Pad) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_pad_removed<F: Fn(&Self, &Pad) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
Trait containing all Element
methods.
Implementors
crate::Bin
, crate::Element
, crate::TagSetter
, crate::TocSetter
Required methods
fn abort_state(&self)
[src]
Abort the state change of the element. This function is used by elements that do asynchronous state changes and find out something is wrong.
This function should be called with the STATE_LOCK held.
MT safe.
fn add_pad<P: IsA<Pad>>(&self, pad: &P) -> Result<(), BoolError>
[src]
Adds a pad (link point) to self
. pad
’s parent will be set to self
;
see crate::prelude::GstObjectExt::set_parent()
for refcounting information.
Pads are automatically activated when added in the PAUSED or PLAYING state.
The pad and the element should be unlocked when calling this function.
This function will emit the [crate::Element::pad-added
] signal on the element.
pad
the crate::Pad
to add to the element.
Returns
true
if the pad could be added. This function can fail when
a pad with the same name already existed or the pad already had another
parent.
MT safe.
fn change_state(
&self,
transition: StateChange
) -> Result<StateChangeSuccess, StateChangeError>
[src]
&self,
transition: StateChange
) -> Result<StateChangeSuccess, StateChangeError>
Perform transition
on self
.
This function must be called with STATE_LOCK held and is mainly used internally.
transition
the requested transition
Returns
the crate::StateChangeReturn
of the state transition.
fn continue_state(
&self,
ret: impl Into<StateChangeReturn>
) -> Result<StateChangeSuccess, StateChangeError>
[src]
&self,
ret: impl Into<StateChangeReturn>
) -> Result<StateChangeSuccess, StateChangeError>
Commit the state change of the element and proceed to the next
pending state if any. This function is used
by elements that do asynchronous state changes.
The core will normally call this method automatically when an
element returned crate::StateChangeReturn::Success
from the state change function.
If after calling this method the element still has not reached the pending state, the next state change is performed.
This method is used internally and should normally not be called by plugins or applications.
This function must be called with STATE_LOCK held.
ret
The previous state return value
Returns
The result of the commit state change.
MT safe.
fn create_all_pads(&self)
[src]
fn foreach_pad<P: FnMut(&Element, &Pad) -> bool>(&self, func: P) -> bool
[src]
v1_14
only.fn foreach_sink_pad<P: FnMut(&Element, &Pad) -> bool>(&self, func: P) -> bool
[src]
v1_14
only.fn foreach_src_pad<P: FnMut(&Element, &Pad) -> bool>(&self, func: P) -> bool
[src]
v1_14
only.fn base_time(&self) -> ClockTime
[src]
fn bus(&self) -> Option<Bus>
[src]
fn clock(&self) -> Option<Clock>
[src]
fn compatible_pad<P: IsA<Pad>>(
&self,
pad: &P,
caps: Option<&Caps>
) -> Option<Pad>
[src]
&self,
pad: &P,
caps: Option<&Caps>
) -> Option<Pad>
fn compatible_pad_template(
&self,
compattempl: &PadTemplate
) -> Option<PadTemplate>
[src]
&self,
compattempl: &PadTemplate
) -> Option<PadTemplate>
fn context(&self, context_type: &str) -> Option<Context>
[src]
fn contexts(&self) -> Vec<Context>
[src]
fn factory(&self) -> Option<ElementFactory>
[src]
fn request_pad_simple(&self, name: &str) -> Option<Pad>
[src]
fn start_time(&self) -> ClockTime
[src]
fn state(
&self,
timeout: ClockTime
) -> (Result<StateChangeSuccess, StateChangeError>, State, State)
[src]
&self,
timeout: ClockTime
) -> (Result<StateChangeSuccess, StateChangeError>, State, State)
fn static_pad(&self, name: &str) -> Option<Pad>
[src]
fn is_locked_state(&self) -> bool
[src]
fn link<P: IsA<Element>>(&self, dest: &P) -> Result<(), BoolError>
[src]
fn link_filtered<P: IsA<Element>>(
&self,
dest: &P,
filter: Option<&Caps>
) -> Result<(), BoolError>
[src]
&self,
dest: &P,
filter: Option<&Caps>
) -> Result<(), BoolError>
fn link_pads<P: IsA<Element>>(
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>
) -> Result<(), BoolError>
[src]
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>
) -> Result<(), BoolError>
fn link_pads_filtered<P: IsA<Element>>(
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>,
filter: Option<&Caps>
) -> Result<(), BoolError>
[src]
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>,
filter: Option<&Caps>
) -> Result<(), BoolError>
fn link_pads_full<P: IsA<Element>>(
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>,
flags: PadLinkCheck
) -> Result<(), BoolError>
[src]
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>,
flags: PadLinkCheck
) -> Result<(), BoolError>
fn lost_state(&self)
[src]
fn no_more_pads(&self)
[src]
fn provide_clock(&self) -> Option<Clock>
[src]
fn release_request_pad<P: IsA<Pad>>(&self, pad: &P)
[src]
fn remove_pad<P: IsA<Pad>>(&self, pad: &P) -> Result<(), BoolError>
[src]
fn request_pad(
&self,
templ: &PadTemplate,
name: Option<&str>,
caps: Option<&Caps>
) -> Option<Pad>
[src]
&self,
templ: &PadTemplate,
name: Option<&str>,
caps: Option<&Caps>
) -> Option<Pad>
fn set_base_time(&self, time: ClockTime)
[src]
fn set_bus(&self, bus: Option<&Bus>)
[src]
fn set_clock<P: IsA<Clock>>(&self, clock: Option<&P>) -> Result<(), BoolError>
[src]
fn set_context(&self, context: &Context)
[src]
fn set_locked_state(&self, locked_state: bool) -> bool
[src]
fn set_start_time(&self, time: ClockTime)
[src]
fn set_state(
&self,
state: State
) -> Result<StateChangeSuccess, StateChangeError>
[src]
&self,
state: State
) -> Result<StateChangeSuccess, StateChangeError>
fn sync_state_with_parent(&self) -> Result<(), BoolError>
[src]
fn unlink<P: IsA<Element>>(&self, dest: &P)
[src]
fn unlink_pads<P: IsA<Element>>(
&self,
srcpadname: &str,
dest: &P,
destpadname: &str
)
[src]
&self,
srcpadname: &str,
dest: &P,
destpadname: &str
)
fn connect_no_more_pads<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_pad_added<F: Fn(&Self, &Pad) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_pad_removed<F: Fn(&Self, &Pad) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<Element>> ElementExt for O
[src]
impl<O: IsA<Element>> ElementExt for O
[src]fn abort_state(&self)
[src]
fn add_pad<P: IsA<Pad>>(&self, pad: &P) -> Result<(), BoolError>
[src]
fn change_state(
&self,
transition: StateChange
) -> Result<StateChangeSuccess, StateChangeError>
[src]
&self,
transition: StateChange
) -> Result<StateChangeSuccess, StateChangeError>
fn continue_state(
&self,
ret: impl Into<StateChangeReturn>
) -> Result<StateChangeSuccess, StateChangeError>
[src]
&self,
ret: impl Into<StateChangeReturn>
) -> Result<StateChangeSuccess, StateChangeError>
fn create_all_pads(&self)
[src]
fn foreach_pad<P: FnMut(&Element, &Pad) -> bool>(&self, func: P) -> bool
[src]
fn foreach_pad<P: FnMut(&Element, &Pad) -> bool>(&self, func: P) -> bool
[src]v1_14
only.fn foreach_sink_pad<P: FnMut(&Element, &Pad) -> bool>(&self, func: P) -> bool
[src]
fn foreach_sink_pad<P: FnMut(&Element, &Pad) -> bool>(&self, func: P) -> bool
[src]v1_14
only.fn foreach_src_pad<P: FnMut(&Element, &Pad) -> bool>(&self, func: P) -> bool
[src]
fn foreach_src_pad<P: FnMut(&Element, &Pad) -> bool>(&self, func: P) -> bool
[src]v1_14
only.fn base_time(&self) -> ClockTime
[src]
fn bus(&self) -> Option<Bus>
[src]
fn clock(&self) -> Option<Clock>
[src]
fn compatible_pad<P: IsA<Pad>>(
&self,
pad: &P,
caps: Option<&Caps>
) -> Option<Pad>
[src]
&self,
pad: &P,
caps: Option<&Caps>
) -> Option<Pad>
fn compatible_pad_template(
&self,
compattempl: &PadTemplate
) -> Option<PadTemplate>
[src]
&self,
compattempl: &PadTemplate
) -> Option<PadTemplate>
fn context(&self, context_type: &str) -> Option<Context>
[src]
fn contexts(&self) -> Vec<Context>
[src]
fn factory(&self) -> Option<ElementFactory>
[src]
fn request_pad_simple(&self, name: &str) -> Option<Pad>
[src]
fn start_time(&self) -> ClockTime
[src]
fn state(
&self,
timeout: ClockTime
) -> (Result<StateChangeSuccess, StateChangeError>, State, State)
[src]
&self,
timeout: ClockTime
) -> (Result<StateChangeSuccess, StateChangeError>, State, State)
fn static_pad(&self, name: &str) -> Option<Pad>
[src]
fn is_locked_state(&self) -> bool
[src]
fn link<P: IsA<Element>>(&self, dest: &P) -> Result<(), BoolError>
[src]
fn link_filtered<P: IsA<Element>>(
&self,
dest: &P,
filter: Option<&Caps>
) -> Result<(), BoolError>
[src]
&self,
dest: &P,
filter: Option<&Caps>
) -> Result<(), BoolError>
fn link_pads<P: IsA<Element>>(
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>
) -> Result<(), BoolError>
[src]
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>
) -> Result<(), BoolError>
fn link_pads_filtered<P: IsA<Element>>(
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>,
filter: Option<&Caps>
) -> Result<(), BoolError>
[src]
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>,
filter: Option<&Caps>
) -> Result<(), BoolError>
fn link_pads_full<P: IsA<Element>>(
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>,
flags: PadLinkCheck
) -> Result<(), BoolError>
[src]
&self,
srcpadname: Option<&str>,
dest: &P,
destpadname: Option<&str>,
flags: PadLinkCheck
) -> Result<(), BoolError>
fn lost_state(&self)
[src]
fn no_more_pads(&self)
[src]
fn provide_clock(&self) -> Option<Clock>
[src]
fn release_request_pad<P: IsA<Pad>>(&self, pad: &P)
[src]
fn remove_pad<P: IsA<Pad>>(&self, pad: &P) -> Result<(), BoolError>
[src]
fn request_pad(
&self,
templ: &PadTemplate,
name: Option<&str>,
caps: Option<&Caps>
) -> Option<Pad>
[src]
&self,
templ: &PadTemplate,
name: Option<&str>,
caps: Option<&Caps>
) -> Option<Pad>
fn set_base_time(&self, time: ClockTime)
[src]
fn set_bus(&self, bus: Option<&Bus>)
[src]
fn set_clock<P: IsA<Clock>>(&self, clock: Option<&P>) -> Result<(), BoolError>
[src]
fn set_context(&self, context: &Context)
[src]
fn set_locked_state(&self, locked_state: bool) -> bool
[src]
fn set_start_time(&self, time: ClockTime)
[src]
fn set_state(
&self,
state: State
) -> Result<StateChangeSuccess, StateChangeError>
[src]
&self,
state: State
) -> Result<StateChangeSuccess, StateChangeError>
fn sync_state_with_parent(&self) -> Result<(), BoolError>
[src]
fn unlink<P: IsA<Element>>(&self, dest: &P)
[src]
fn unlink_pads<P: IsA<Element>>(
&self,
srcpadname: &str,
dest: &P,
destpadname: &str
)
[src]
&self,
srcpadname: &str,
dest: &P,
destpadname: &str
)
fn connect_no_more_pads<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_pad_added<F: Fn(&Self, &Pad) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_pad_removed<F: Fn(&Self, &Pad) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId