deepstream-services-library icon indicating copy to clipboard operation
deepstream-services-library copied to clipboard

Implement new dsl_source_usb_device_location_get/set services to support multiple USB cameras

Open rjhowell44 opened this issue 2 years ago • 1 comments

New services to get/set the device location from a USB Source.

/**
 * @brief Gets the device location setting for the named USB Source. A unique 
 * device-location is assigned to each USB Source on creation, starting with 
 * "/dev/video0", followed by "/dev/video1", and so on. The default assignment 
 * can be overridden by calling dsl_source_usb_device_location_set. The call 
 * will fail if the given device-location is not unique. If a source is deleted, 
 * the device-location will be re-assigned to a new USB Source if one is created.
 * @param[in] name unique name of the USB Source to query.
 * @param[out] device_location current device location setting. Default: /dev/video0.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_usb_device_location_get(const wchar_t* name,
    const wchar_t** device_location);
    
/**
 * @brief Sets the device location setting for the named USB Source. A unique 
 * device-location is assigned to each USB Source on creation, starting with 
 * "/dev/video0", followed by "/dev/video1", and so on. The service will 
 * fail if the given device-location is not unique. If a source is deleted, 
 * the device-location will be re-assigned to a new USB Source if one is created.
 * @param[in] name unique name of the USB Source to update.
 * @param[in] device_location new device location setting to use.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_usb_device_location_set(const wchar_t* name,
    const wchar_t* device_location);

rjhowell44 avatar Sep 22 '22 02:09 rjhowell44

Merged into v0.26.alpha

rjhowell44 avatar Sep 27 '22 00:09 rjhowell44