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

Implement new Custom Source Component API - A Custom Video Source made from Custom GST Elements.

Open rjhowell44 opened this issue 8 months ago • 0 comments

New Source type. Clients can create a Custom Source and add GST Elements to it. Elements will be linked in the order added. The last element will be linked to the common Video Source elements (queue, converter, caps-filter). The Source will be linked to the Pipeline's Streammux along with all other sources added.

New constant return values

#define DSL_RESULT_SOURCE_ELEMENT_ADD_FAILED                        0x00020019
#define DSL_RESULT_SOURCE_ELEMENT_REMOVE_FAILED                     0x0002002A
#define DSL_RESULT_SOURCE_ELEMENT_NOT_IN_USE                        0x0003002B

New Services API - Note, this API is identical to the Custom Component API.

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

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

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

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

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

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

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

rjhowell44 avatar Jun 24 '24 18:06 rjhowell44