Struct realsense_rust::stream_profile::StreamProfile[][src]

pub struct StreamProfile { /* fields omitted */ }
Expand description

Type for holding the stream profile information.

This type exists as a high-level wrapper around an underlying rs2_stream_profile pointer. On construction, we cache a copy of the stream data and also cache whether or not this stream profile is the default stream for a sensor.

Lifetimes

Stream profiles are acquired one of three ways:

  1. The stream profile list via the stream_profiles) method on the Sensor type.
  2. The stream profile list via the streams associated function on the PipelineProfile type.
  3. The frame-specific frame_stream_profile member via the Frame type.

Stream profiles from the sensor can outlive the parent object that you obtain them from. In cases two and three above we return references to a stream profile owned by that type, so they may not. In most cases you will probably want to grab the stream profile from the pipeline profile, which will give you all streams that are actively streaming from a given pipeline.

Implementations

Predicate for whether or not the stream is a default stream.

Gets the stream kind from the stream data.

This can be e.g. Depth, Video, Accel, Gyro, etc.

Gets the format for the underlying data.

For video streams this will describe how the pixels are packed and padded, for motion, pose, and point frame streams this will describe how to deconstruct individual points or observations.

Gets the stream’s index.

This is useful if you want to enable / disable a particular stream according to its index.

Gets the stream’s unique identifier.

Gets the framerate / data rate of frames generated by the stream.

Get extrinsics between the origin stream (self) and target stream (to_profile).

Returns the extrinsics between the origin and target streams from the underlying realsense driver iff both underlying stream pointers are valid and extrinsics exist. Otherwise returns an error.

Errors

Returns DataError::CouldNotGetExtrinsics if this call fails for whatever reason.

Set extrinsics between the origin stream (self) and target stream (to_profile).

Returns null tuple () iff the streams are valid and the extrinsics are successfully set. Otherwise returns an error.

Errors

Returns DataError::CouldNotSetExtrinsics if this call fails for whatever reason.

Get video intrinsics from the stream.

Returns a set of video intrinsics for the stream iff the stream has video intrinsics and the stream pointer is valid. Otherwise returns an error.

Errors

Returns DataError::StreamDoesNotHaveVideoIntrinsics if the stream does not have video intrinsics.

Returns DataError::CouldNotGetIntrinsics if this call fails for any other reason.

Get motion intrinsics from the stream.

Returns a set of motion device intrinsics for the stream iff the stream has motion device intrinsics and the stream pointer is valid. Otherwise returns an error.

Errors

Returns DataError::StreamDoesNotHaveMotionIntrinsics if the stream does not have motion intrinsics.

Returns DataError::CouldNotGetMotionIntrinsics if this call fails for any other reason.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Attempt to create a stream profile from a pointer to an rs2_stream_profile type.

Errors

Returns StreamConstructionError::CouldNotRetrieveStreamData if the stream data associated with this stream profile cannot be retrieved.

Returns StreamConstructionError::CouldNotDetermineIsDefault if it cannot be determined whether or not this stream is a default stream. This usually will only happen if the stream is invalidated (e.g. due to a device disconnect) when you try to construct it.

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.