prominenceai / deepstream-services-library

A shared library of on-demand DeepStream Pipeline Services for Python and C/C++
MIT License
288 stars 67 forks source link

Implement dsl_component_media_type_get/set service as a prerequisite for supporting streaming audio and video #1304

Open rjhowell44 opened 3 weeks ago

rjhowell44 commented 3 weeks ago

New symbolic constants to define the specific streaming media types

/**
 * @brief DSL Supported Media Types for all Pipelines and Components
 */
#define DSL_MEDIA_TYPE_AUDIO_ONLY                                   0x01
#define DSL_MEDIA_TYPE_VIDEO_ONLY                                   0x10
#define DSL_MEDIA_TYPE_AUDIO_VIDEO                                  0x11
/**
 * @brief Gets the media type for the named Component.
 * @param name unique name of the Component to query.
 * @param[out] media_type one of the DSL_MEDIA_TYPE constant values. 
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_component_media_type_get(const wchar_t* name, uint* media_type);

/**
 * @brief Sets the media type for the named Component.
 * @param name unique name of the Component to update.
 * @param[in] media_type one of the DSL_MEDIA_TYPE constant values. 
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 * @note See the documentation for each component type to determine which
 * media type is supported.
 */
DslReturnType dsl_component_media_type_set(const wchar_t* name, uint media_type);