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
fn stream_profile(&self) -> &StreamProfile
fn stream_profile(&self) -> &StreamProfile
Get the stream profile associated with the frame.
fn timestamp_domain(&self) -> Rs2TimestampDomain
fn timestamp_domain(&self) -> Rs2TimestampDomain
Get the RealSense timestamp domain for the current timestamp.
fn metadata(&self, metadata_kind: Rs2FrameMetadata) -> Option<c_longlong>
fn metadata(&self, metadata_kind: Rs2FrameMetadata) -> Option<c_longlong>
Get frame metadata.
Returns None
if the metadata_kind
is not supported by the frame type.
fn supports_metadata(&self, metadata_kind: Rs2FrameMetadata) -> bool
fn supports_metadata(&self, metadata_kind: Rs2FrameMetadata) -> bool
Test whether the metadata arguemnt is supported by the frame.
unsafe fn get_owned_raw(self) -> NonNull<rs2_frame>
unsafe fn get_owned_raw(self) -> NonNull<rs2_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.