Function rs2_config_enable_stream

Function Documentation

void rs2_config_enable_stream(rs2_config *config, rs2_stream stream, int index, int width, int height, rs2_format format, int framerate, rs2_error **error)

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 with conflicting parameters 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:
  • config[in] A pointer to an instance of a config

  • stream[in] Stream type to be enabled

  • index[in] Stream index, used for multiple streams of the same type. -1 indicates any.

  • width[in] Stream image width - for images streams. 0 indicates any.

  • height[in] Stream image height - for images streams. 0 indicates any.

  • format[in] Stream data format - pixel format for images streams, of data type for other streams. RS2_FORMAT_ANY indicates any.

  • framerate[in] Stream frames per second. 0 indicates any.

  • error[out] if non-null, receives any error that occurs during this call, otherwise, errors are ignored