Trait realsense_rust::frame::FrameEx[][src]

pub trait FrameEx {
    fn stream_profile(&self) -> &StreamProfile;
fn sensor(&self) -> Result<Sensor>;
fn timestamp(&self) -> f64;
fn timestamp_domain(&self) -> Rs2TimestampDomain;
fn metadata(&self, metadata_kind: Rs2FrameMetadata) -> Option<c_longlong>;
fn supports_metadata(&self, metadata_kind: Rs2FrameMetadata) -> bool;
unsafe fn get_owned_raw(self) -> NonNull<rs2_frame>; }
Expand description

Describes common functionality across frame types.

Required methods

Get the stream profile associated with the frame.

Get the sensor associated with the frame.

Get the frame timestamp.

Get the RealSense timestamp domain for the current timestamp.

Get frame metadata.

Returns None if the metadata_kind is not supported by the frame type.

Test whether the metadata arguemnt is supported by the frame.

Get (and own) the underlying frame pointer for this frame.

This is primarily useful for passing this frame forward to a processing block or blocks (either via frame queue, directly, callback, etc).

Safety

This does not destroy the underlying frame pointer once self goes out of scope. Instead, the program expects that whatever object was assigned to by this function now manages the lifetime.

Implementors