prominenceai/deepstream-services-library

Implement new DSL GST Caps Object API - will be used to set/get the caps property of a DSL GST Element.

Closed this issue · 0 comments

Custom Sources, Sinks, and Components will need to include/use GStreamer caps-filters and other plugins that support a "caps" property. GStreamer Caps Objects are created, passed, and unrefed by pointer type GstCaps*. With DSL the Objects will be referenced by name.

The DSL GST Element API will need to be updated with new Get/Set Caps Property services as well.

New API used to create named Caps Objects from strings. The named Objects will then be used to set Element properties of type "caps". The Caps Object can be deleted as soon as the property is set.

/** 
 * @brief Creates a uniquely named GSTCaps Object from a string representation.
 * @param[in] name unique name for the GST Caps Object to create.
 * @param[in] caps a string defining the caps to create.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_GST_CAPS_RESULT otherwise.
 */ 
DslReturnType dsl_gst_caps_new(const wchar_t* name, const wchar_t* caps);

/** 
 * @brief Queries a uniquely named GST Caps Object for its current caps string representation.
 * @param[in] name unique name for the GST Caps Object to query.
 * @param[out] caps a string representation of the Caps Object current caps.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_GST_CAPS_RESULT otherwise.
 */ 
DslReturnType dsl_gst_caps_string_get(const wchar_t** name, const wchar_t** caps);

/**
 * @brief Deletes a GST Caps Object by name.
 * @param[in] name unique name of the GST Caps Object to delete.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_GST_CAPS_RESULT otherwise.
 */
DslReturnType dsl_gst_caps_delete(const wchar_t* name);

/**
 * @brief deletes a NULL terminated list of GST Caps Objects.
 * @param[in] names NULL terminated list of names of Caps Objects to delete.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_GST_CAPS_RESULT otherwise.
 */
DslReturnType dsl_gst_caps_delete_many(const wchar_t** names);

/**
 * @brief deletes all GST Caps Objects in memory.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_GST_CAPS_RESULT otherwise.

 */
DslReturnType dsl_gst_caps_delete_all();

/**
 * @brief returns the current number of GST Caps Objects.
 * @return size of the list of GST Caps Objects.
 */
uint dsl_gst_element_list_size();