Methods
canResolve(pipeline) → {boolean}
Check if the config can resolve the configuration filters, to find a matching device and
streams profiles. The resolution conditions are as described in Config.resolve.
Parameters:
| Name | Type | Description |
|---|---|---|
pipeline |
Pipeline | the pipeline for which the selected filters are applied |
Returns:
true if a valid profile selection exists, false if no selection can be found
under the config filters and the available devices.
- Type
- boolean
destroy()
Release resources associated with the object
disableAllStreams()
Disable all device streams explicitly.
disableStream()
Disable a device stream explicitly, to remove any requests on this stream profile.
enableAllStreams()
Enable all device streams explicitly.
enableDevice(serial)
Select a specific device explicitly by its serial number, to be used by the pipeline.
The conditions and behavior of this method are similar to those of Config.enableStream.
This method is required if the application needs to set device or sensor settings prior to
pipeline streaming, to enforce the pipeline to use the configured device.
Parameters:
| Name | Type | Description |
|---|---|---|
serial |
String | device serial number, as returned by Device.getCameraInfo(camera_info.CAMERA_INFO_SERIAL_NUMBER). |
enableDeviceFromFile(fileName, repeat)
Select a recorded device from a file, to be used by the pipeline through playback.
The device available streams are as recorded to the file, and Config.resolve considers
only this device and configuration as available.
This request cannot be used if Config.enableRecordToFile is called for the current
config, and vise versa
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
fileName |
String | the playback file of the device | |
repeat |
Boolean | true | whether to repeat the playback automatically |
enableRecordToFile(fileName)
Requires that the resolved device would be recorded to file
This request cannot be used if Config.enableDeviceFromFile is called for the current
config, and vise versa as available.
Parameters:
| Name | Type | Description |
|---|---|---|
fileName |
String | the desired file for the output record |
enableStream(stream, index, width, height, format, fps)
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 Config.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 Config.resolve is called, no conflict check is done.
Parameters:
| Name | Type | Description |
|---|---|---|
stream |
Integer | String | stream type to be enabled |
index |
Integer | stream index, used for multiple streams of the same type. -1 indicates any. |
width |
Integer | stream image width - for images streams. 0 indicates any. |
height |
Integer | stream image height - for images streams. 0 indicates any. |
format |
Integer | String | stream data format - pixel format for images streams, of data type for other streams. format.FORMAT_ANY indicates any. |
fps |
Integer | stream frames per second. 0 indicates any. |
resolve(pipeline) → {PipelineProfile|undefined}
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 config selects the first
available device and the first color and depth streams configuration.
The pipeline profile selection during Pipeline.start follows the same method. Thus,
the selected profile is the same, if no change occurs to the available devices occurs.
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 Cofnig.enableDevice, 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:
| Name | Type | Description |
|---|---|---|
pipeline |
Pipeline | the pipeline for which the selected filters are applied |
Returns:
a matching device and streams profile, which satisfies the
filters and pipeline requests.
- Type
- PipelineProfile | undefined