pub struct Harness(/* private fields */);
Implementations§
Source§impl Harness
impl Harness
pub fn add_element_full<P: IsA<Element>>( &mut self, element: &P, hsrc: Option<&StaticPadTemplate>, element_sinkpad_name: Option<&str>, hsink: Option<&StaticPadTemplate>, element_srcpad_name: Option<&str>, )
pub fn add_element_sink_pad<P: IsA<Pad>>(&mut self, sinkpad: &P)
pub fn add_element_src_pad<P: IsA<Pad>>(&mut self, srcpad: &P)
pub fn add_parse(&mut self, launchline: &str)
pub fn add_probe<F>( &mut self, element_name: &str, pad_name: &str, mask: PadProbeType, func: F, )
pub fn add_propose_allocation_meta( &mut self, api: Type, params: Option<&StructureRef>, )
Available on crate feature
v1_16
only.pub fn add_sink(&mut self, sink_element_name: &str)
pub fn add_sink_harness(&mut self, sink_harness: Harness)
pub fn add_sink_parse(&mut self, launchline: &str)
pub fn add_src(&mut self, src_element_name: &str, has_clock_wait: bool)
pub fn add_src_harness(&mut self, src_harness: Harness, has_clock_wait: bool)
pub fn add_src_parse(&mut self, launchline: &str, has_clock_wait: bool)
pub fn buffers_in_queue(&self) -> u32
pub fn buffers_received(&self) -> u32
pub fn crank_multiple_clock_waits( &mut self, waits: u32, ) -> Result<(), BoolError>
pub fn crank_single_clock_wait(&mut self) -> Result<(), BoolError>
pub fn create_buffer(&mut self, size: usize) -> Result<Buffer, BoolError>
pub fn dump_to_file(&mut self, filename: impl AsRef<Path>)
pub fn events_in_queue(&self) -> u32
pub fn events_received(&self) -> u32
pub fn find_element(&mut self, element_name: &str) -> Option<Element>
pub fn last_pushed_timestamp(&self) -> Option<ClockTime>
pub fn testclock(&self) -> Option<TestClock>
pub fn play(&mut self)
pub fn pull(&mut self) -> Result<Buffer, BoolError>
pub fn pull_until_eos(&mut self) -> Result<Option<Buffer>, BoolError>
Available on crate feature
v1_18
only.pub fn pull_event(&mut self) -> Result<Event, BoolError>
pub fn pull_upstream_event(&mut self) -> Result<Event, BoolError>
pub fn push(&mut self, buffer: Buffer) -> Result<FlowSuccess, FlowError>
pub fn push_and_pull(&mut self, buffer: Buffer) -> Result<Buffer, BoolError>
pub fn push_event(&mut self, event: Event) -> bool
pub fn push_from_src(&mut self) -> Result<FlowSuccess, FlowError>
pub fn push_to_sink(&mut self) -> Result<FlowSuccess, FlowError>
pub fn push_upstream_event(&mut self, event: Event) -> bool
pub fn query_latency(&self) -> Option<ClockTime>
pub fn set_blocking_push_mode(&mut self)
pub fn set_caps(&mut self, in_: Caps, out: Caps)
pub fn set_caps_str(&mut self, in_: &str, out: &str)
pub fn set_drop_buffers(&mut self, drop_buffers: bool)
pub fn set_forwarding(&mut self, forwarding: bool)
pub fn set_live(&mut self, is_live: bool)
Available on crate feature
v1_20
only.pub fn set_sink_caps(&mut self, caps: Caps)
pub fn set_sink_caps_str(&mut self, str: &str)
pub fn set_src_caps(&mut self, caps: Caps)
pub fn set_src_caps_str(&mut self, str: &str)
pub fn set_time(&mut self, time: ClockTime) -> Result<(), BoolError>
pub fn set_upstream_latency(&mut self, latency: ClockTime)
pub fn sink_push_many(&mut self, pushes: u32) -> Result<FlowSuccess, FlowError>
pub fn src_crank_and_push_many( &mut self, cranks: u32, pushes: u32, ) -> Result<FlowSuccess, FlowError>
pub fn src_push_event(&mut self) -> bool
pub fn take_all_data_as_buffer(&mut self) -> Result<Buffer, BoolError>
pub fn take_all_data_as_bytes(&mut self) -> Result<Bytes, BoolError>
pub fn try_pull(&mut self) -> Option<Buffer>
pub fn try_pull_event(&mut self) -> Option<Event>
pub fn try_pull_upstream_event(&mut self) -> Option<Event>
pub fn upstream_events_in_queue(&self) -> u32
pub fn upstream_events_received(&self) -> u32
pub fn use_systemclock(&mut self)
pub fn use_testclock(&mut self)
pub fn wait_for_clock_id_waits( &mut self, waits: u32, timeout: u32, ) -> Result<(), BoolError>
pub fn new(element_name: &str) -> Harness
pub fn new_empty() -> Harness
pub fn new_full<P: IsA<Element>>( element: &P, hsrc: Option<&StaticPadTemplate>, element_sinkpad_name: Option<&str>, hsink: Option<&StaticPadTemplate>, element_srcpad_name: Option<&str>, ) -> Harness
pub fn new_parse(launchline: &str) -> Harness
pub fn with_element<P: IsA<Element>>( element: &P, element_sinkpad_name: Option<&str>, element_srcpad_name: Option<&str>, ) -> Harness
pub fn with_padnames( element_name: &str, element_sinkpad_name: Option<&str>, element_srcpad_name: Option<&str>, ) -> Harness
pub fn with_templates( element_name: &str, hsrc: Option<&StaticPadTemplate>, hsink: Option<&StaticPadTemplate>, ) -> Harness
pub fn element(&self) -> Option<Element>
pub fn sinkpad(&self) -> Option<Pad>
pub fn srcpad(&self) -> Option<Pad>
pub fn sink_harness(&self) -> Option<Ref<'_>>
pub fn src_harness(&self) -> Option<Ref<'_>>
pub fn sink_harness_mut(&mut self) -> Option<RefMut<'_>>
pub fn src_harness_mut(&mut self) -> Option<RefMut<'_>>
Trait Implementations§
impl Send for Harness
impl Sync for Harness
Auto Trait Implementations§
impl Freeze for Harness
impl RefUnwindSafe for Harness
impl Unpin for Harness
impl UnwindSafe for Harness
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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