|
| config () |
|
void | enable_stream (rs2_stream stream_type, int stream_index, int width, int height, rs2_format format=RS2_FORMAT_ANY, int framerate=0) |
|
void | enable_stream (rs2_stream stream_type, int stream_index=-1) |
|
void | enable_stream (rs2_stream stream_type, int width, int height, rs2_format format=RS2_FORMAT_ANY, int framerate=0) |
|
void | enable_stream (rs2_stream stream_type, rs2_format format, int framerate=0) |
|
void | enable_stream (rs2_stream stream_type, int stream_index, rs2_format format, int framerate=0) |
|
void | enable_all_streams () |
|
void | enable_device (const std::string &serial) |
|
void | enable_device_from_file (const std::string &file_name, bool repeat_playback=true) |
|
void | enable_record_to_file (const std::string &file_name) |
|
void | disable_stream (rs2_stream stream, int index=-1) |
|
void | disable_all_streams () |
|
pipeline_profile | resolve (std::shared_ptr< rs2_pipeline > p) const |
|
bool | can_resolve (std::shared_ptr< rs2_pipeline > p) const |
|
std::shared_ptr< rs2_config > | get () const |
|
The config allows pipeline users to request filters for the pipeline streams and device selection and configuration. This is an optional step in pipeline creation, as the pipeline resolves its streaming device internally. Config provides its users a way to set the filters and test if there is no conflict with the pipeline requirements from the device. It also allows the user to find a matching device for the config filters and the pipeline, in order to select a device explicitly, and modify its controls before streaming starts.
Enable a device stream explicitly, with selected stream parameters. The method allows the application to request a stream with specific configuration. If no stream is explicitly enabled, the pipeline configures the device and its streams according to the attached computer vision modules and processing blocks requirements, or default configuration for the first available device. The application can configure any of the input stream parameters according to its requirement, or set to 0 for don't care value. The config accumulates the application calls for enable configuration methods, until the configuration is applied. Multiple enable stream calls for the same stream override each other, and the last call is maintained. Upon calling resolve()
, the config checks for conflicts between the application configuration requests and the attached computer vision modules and processing blocks requirements, and fails if conflicts are found. Before resolve()
is called, no conflict check is done.
- Parameters
-
[in] | stream_type | Stream type to be enabled |
[in] | stream_index | Stream index, used for multiple streams of the same type. -1 indicates any. |
[in] | width | Stream image width - for images streams. 0 indicates any. |
[in] | height | Stream image height - for images streams. 0 indicates any. |
[in] | format | Stream data format - pixel format for images streams, of data type for other streams. RS2_FORMAT_ANY indicates any. |
[in] | framerate | Stream frames per second. 0 indicates any. |
Resolve the configuration filters, to find a matching device and streams profiles. The method resolves the user configuration filters for the device and streams, and combines them with the requirements of the computer vision modules and processing blocks attached to the pipeline. If there are no conflicts of requests, it looks for an available device, which can satisfy all requests, and selects the first matching streams configuration. In the absence of any request, the rs2::config selects the first available device and the first color and depth streams configuration. The pipeline profile selection during start()
follows the same method. Thus, the selected profile is the same, if no change occurs to the available devices. Resolving the pipeline configuration provides the application access to the pipeline selected device for advanced control. The returned configuration is not applied to the device, so the application doesn't own the device sensors. However, the application can call enable_device()
, to enforce the device returned by this method is selected by pipeline start()
, and configure the device and sensors options or extensions before streaming starts.
- Parameters
-
[in] | p | The pipeline for which the selected filters are applied |
- Returns
- A matching device and streams profile, which satisfies the filters and pipeline requests.