Struct realsense_rust::pipeline::ActivePipeline [−][src]
pub struct ActivePipeline { /* fields omitted */ }
Expand description
Type representing an “active” pipeline which is configured and can acquire frames.
Implementations
Gets the active profile of pipeline.
Stop the pipeline.
This method consumes the pipeline instance and returns pipeline markered inactive.
pub fn wait(
&mut self,
timeout_ms: Option<Duration>
) -> Result<CompositeFrame, FrameWaitError>
pub fn wait(
&mut self,
timeout_ms: Option<Duration>
) -> Result<CompositeFrame, FrameWaitError>
Waits to get a new composite frame, blocking the calling thread.
Returns a composite frame from the pipeline, blocking the calling thread until a frame is
available. This method can return an error if an internal exception occurs or if the thread
waits more than the duration provided by timeout_ms
(in milliseconds).
Arguments
timeout_ms
- The timeout in milliseconds. If the thread blocks for longer than this duration, it will exit early with aFrameWaitError::DidTimeoutBeforeFrameArrival
. IfNone
is passed in, the default timeout is applied.
Errors
Returns FrameWaitError::DidErrorDuringFrameWait
if an internal error occurs while
waiting for next frame(s).
Returns FrameWaitError::DidTimeoutBeforeFrameArrival
if the thread waits more than
timeout_ms
(in milliseconds) without returning a frame.
Poll if next frame is immediately available.
Unlike ActivePipeline::wait
, the method does not block and returns None immediately if
the next frame is not available. Returns Poll::Pending
if no frame is yet available,
and returns Poll::Ready
if the next composite frame is found.
Errors
Returns FrameWaitError::DidErrorDuringFramePoll
if an internal error occurs while
polling for the next frame.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ActivePipeline
impl !Sync for ActivePipeline
impl Unpin for ActivePipeline
impl UnwindSafe for ActivePipeline