The Pipeline Component API provides the common services that apply to multiple Pipeline Component types.
- Sources
- Taps
- Inference Engines and Servers
- Trackers
- Segmentation Visualizers
- Splitters and Demuxers
- 2D-Tilers
- On Screen Displays
- Sinks
- Branches
Methods
- dsl_component_delete
- dsl_component_delete_many
- dsl_component_delete_all
- dsl_component_list_size
- dsl_component_gpuid_get
- dsl_component_gpuid_set
- dsl_component_gpuid_set_many
- dsl_component_nvbuf_mem_type_get
- dsl_component_nvbuf_mem_type_set
- dsl_component_nvbuf_mem_type_set_many
The following return codes are used by the Component API
#define DSL_RESULT_SUCCESS 0x00000000
#define DSL_RESULT_COMPONENT_RESULT 0x00010000
#define DSL_RESULT_COMPONENT_NAME_NOT_UNIQUE 0x00010001
#define DSL_RESULT_COMPONENT_NAME_NOT_FOUND 0x00010002
#define DSL_RESULT_COMPONENT_NAME_BAD_FORMAT 0x00010003
#define DSL_RESULT_COMPONENT_THREW_EXCEPTION 0x00010004
#define DSL_RESULT_COMPONENT_IN_USE 0x00010005
#define DSL_RESULT_COMPONENT_NOT_USED_BY_PIPELINE 0x00010006
#define DSL_RESULT_COMPONENT_NOT_USED_BY_BRANCH 0x00010007
#define DSL_RESULT_COMPONENT_NOT_THE_CORRECT_TYPE 0x00010008
#define DSL_RESULT_COMPONENT_SET_GPUID_FAILED 0x00010009
#define DSL_RESULT_COMPONENT_SET_NVBUF_MEM_TYPE_FAILED 0x0001000A
#define DSL_NVBUF_MEM_TYPE_DEFAULT 0
#define DSL_NVBUF_MEM_TYPE_PINNED 1
#define DSL_NVBUF_MEM_TYPE_DEVICE 2
#define DSL_NVBUF_MEM_TYPE_UNIFIED 3
DslReturnType dsl_component_delete(const wchar_t* component);
This service deletes a single Pipeline Component of any type. The call will fail if the Component is currently in-use
by a Pipeline.
Parameters
component
- [in] unique name of the component to delete.
Returns
DSL_RESULT_SUCCESS
on successful delete. One of the Return Values defined above on failure.
Python Example
retval = dsl_component_delete('my-uri-source')
DslReturnType dsl_component_delete_many(const wchar_t** component);
This service deletes a Null terminated list of named Components of any type. The call will fail if any Component is currently in-use
by a Pipeline.
Parameters
components
- [in] Null terminated list of unique component names to delete.
Returns
DSL_RESULT_SUCCESS
on successful delete. One of the Return Values defined above on failure.
Python Example
retval = dsl_component_delete_many(['my-uri-source', 'my-primary-gie', 'my-osd', 'my-window-sink', None])
DslReturnType dsl_component_delete_all();
This service deletes all Components in memory. The call will fail if any Component is currently in-use
by a Pipeline.
Returns
DSL_RESULT_SUCCESS
on successful delete. One of the Return Values defined above on failure.
Python Example
retval = dsl_component_all()
uint dsl_component_list_size();
This service returns the current number of Components (all types) in memory. The number does not include Pipelines.
Returns
- The number of Components in memory
Python Example
number_of_components = dsl_component_list_size()
DslReturnType dsl_component_gpuid_get(const wchar_t* component, uint* gpuid);
This service returns the current GPU ID for the named Component. The default setting for all components is GPU ID = 0.
Parameters
component
- [in] unique name of the Component to query.gpuid
- [out] current GPU ID in use by the Component.
Returns
DSL_RESULT_SUCCESS
on successful query. One of the Return Values defined above otherwise.
Python Example
retval, gpuid = dsl_component_gpuid_get('my-primary-gie')
DslReturnType dsl_component_gpuid_set(const wchar_t* component, uint gpuid);
This service sets the current GPU ID for the named Component to use. The call will fail if the Component is currently linked.
Parameters
component
- [in] unique name of the Component to query.gpuid
- [in] new GPU ID to use by the Component.
Returns
DSL_RESULT_SUCCESS
on successful update. One of the Return Values defined above otherwise.
Python Example
retval = dsl_component_gpuid_set('my-primary-gie', 1)
DslReturnType dsl_component_gpuid_set_many(const wchar_t** component, uint gpuid);
This service sets the GPU ID for a Null terminated list of named components. The call will fail if any Component is currently linked, on first exception.
Parameters
components
- [in] Null terminated list of unique Component names to update.gpuid
- [in] new GPU ID to use by all named Components.
Returns
DSL_RESULT_SUCCESS
on successful update. One of the Return Values defined above on failure.
Python Example
retval = dsl_component_gpuid_set_many(['my-uri-source', 'my-primary-gie', 'my-osd', 'my-window-sink', None], 1)
DslReturnType dsl_component_nvbuf_mem_type_get(const wchar_t* name,
uint* type);
This service returns the current NVIDIA buffer memory type for the named Component. The default setting for all components that support this propery is = DSL_NVBUF_MEM_TYPE_DEFAULT
. Refer to the NVIDIA Reference for more information on the memory types supported on Jetson and dGPU.
Note: Only Sources, Primary GIEs/TIEs, OSDs, and Window Sinks (on x86_64) support the NVIDIA buffer memory type setting.
Parameters
component
- [in] unique name of the Component to query.type
- [out] one of the NVIDIA buffer memory types defined above.
Returns
DSL_RESULT_SUCCESS
on successful query. One of the Return Values defined above otherwise.
Python Example
retval, type = dsl_component_nvbuf_mem_type_get('my-primary-gie')
DslReturnType dsl_component_nvbuf_mem_type_set(const wchar_t* name,
uint type);
This service sets the current NVIDIA buffer memory type for the named Component to use. The call will fail if the Component is currently linked. Refer to the NVIDIA Reference for more information on the memory types supported on Jetson and dGPU.
Note: Only Sources, Primary GIEs/TIEs, OSDs, and Window Sinks (on x86_64) support the NVIDIA buffer memory type setting.
Parameters
component
- [in] unique name of the Component to update.type
- [in] one of the NVIDIA buffer memory types defined above.
Returns
DSL_RESULT_SUCCESS
on successful update. One of the Return Values defined above otherwise.
Python Example
retval = dsl_component_nvbuf_mem_type_set('my-primary-gie', DSL_NVBUF_MEM_TYPE_DEVICE)
DslReturnType dsl_component_nvbuf_mem_type_set_many(const wchar_t** names,
uint type);
This service sets the NVIDIA buffer memory type for a Null terminated list of named components. The call will fail if any Component is currently linked, on first exception. Refer to the NVIDIA Reference for more information on the memory types supported on Jetson and dGPU.
Note: Only Sources, Primary GIEs/TIEs, OSDs, and Window Sinks (on x86_64) support the NVIDIA buffer memory type setting.
Parameters
components
- [in] Null terminated list of unique Component names to update.type
- [in] one of the NVIDIA buffer memory types defined above.
Returns
DSL_RESULT_SUCCESS
on successful update. One of the Return Values defined above on failure.
Python Example
retval = dsl_component_nvbuf_mem_type_set_many(
['my-uri-source', 'my-primary-gie', 'my-osd', 'my-window-sink', None], DSL_NVBUF_MEM_TYPE_DEVICE)
- List of all Services
- Pipeline
- Player
- Source
- Tap
- Dewarper
- Preprocessor
- Inference Engine and Server
- Tracker
- Segmentation Visualizer
- Tiler
- Demuxer and Splitter
- On-Screen Display
- Sink
- Pad Probe Handler
- ODE Trigger
- ODE Accumulator
- ODE Acton
- ODE Area
- ODE Heat-Mapper
- Display Type
- Branch
- Component
- Mailer
- WebSocket Server
- Message Broker
- Info API