prominenceai/deepstream-services-library

Rename/move dsl_gst_bin_* services to dsl_component_custom_* and refactor to include input queue; derive from QBintr.

Closed this issue · 0 comments

Want to rename the GST Bin Component to Custom Component and refactor by deriving from QBintr to include input queue and all component queue services (leaky, current-level, max-size, etc.)... as with all other components.

Moving these services to the Component API is a precursor for developing additional custom component types; Custom Video Source and Custom Sink.

New Component return codes:

#define DSL_RESULT_COMPONENT_ELEMENT_ADD_FAILED                     0x0001000F
#define DSL_RESULT_COMPONENT_ELEMENT_REMOVE_FAILED                  0x00010010
#define DSL_RESULT_COMPONENT_ELEMENT_NOT_IN_USE                     0x00010011

Services be will renamed to the following. Also, new constructor dsl_component_custom_new_element_add to be added.

/**
 * @brief creates a new, uniquely named Custom Component
 * @param[in] name unique name for the new Custom Component
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_COMPONENT_RESULT otherwise.
 */
DslReturnType dsl_component_custom_new(const wchar_t* name);

/**
 * @brief creates a new Custom Component and adds a new Element to it.
 * @param[in] name name of the Custom Component to update.
 * @param[in] element name of the GST Element to add.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_COMPONENT_RESULT otherwise.
 */
DslReturnType dsl_component_custom_new_element_add(const wchar_t* name, 
    const wchar_t* element);

/**
 * @brief creates a new Custom Component and adds a list of GST Elements to it.
 * @param[in] name name of the Custom Component to update.
 * @param[in] elements NULL terminated array of GST Element names to add.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_COMPONENT_RESULT otherwise.
 */
DslReturnType dsl_component_custom_new_element_add_many(const wchar_t* name, 
    const wchar_t** elements);

/**
 * @brief adds a single GST Element to a Custom Component.
 * @param[in] name name of the Custom Component to update.
 * @param[in] element Element names to add.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_COMPONENT_RESULT otherwise.
 */
DslReturnType dsl_component_custom_element_add(const wchar_t* name, 
    const wchar_t* elements);

/**
 * @brief adds a list of GST Elements to a Custom Component.
 * @param[in] name name of the Custom Component to update.
 * @param[in] elements NULL terminated array of GST Element names to add.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_COMPONENT_RESULT otherwise.
 */
DslReturnType dsl_component_custom_element_add_many(const wchar_t* name, 
    const wchar_t** elements);

/**
 * @brief removes an GST Element from a Custom Component.
 * @param[in] name name of the Custom Component to update.
 * @param[in] elements name of the GST Element to remove.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_COMPONENT_RESULT otherwise.
 */
DslReturnType dsl_component_custom_element_remove(const wchar_t* name, 
    const wchar_t* elements);

/**
 * @brief removes a list of GST Elements from a Custom Component.
 * @param[in] name name of the Custom Component to update.
 * @param[in] elements NULL terminated array of GST Element names to remove.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_COMPONENT_RESULT otherwise.
 */
DslReturnType dsl_component_custom_element_remove_many(const wchar_t* name, 
    const wchar_t** elements);