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

Implement new Inter-Pipe Sink and Source components

Open rjhowell44 opened this issue 2 years ago • 1 comments

Implement new components for RidgeRun's Inter-Pipe plugins.

The official Inter-Pipe user documentation is held at RidgeRun's Developers Wiki

The Inter-Pipe API reference can be found here GitHub's project page.

New Inter-Pipe Sink API

/**
 * @brief creates a new, uniquely named Interpipe Sink component.
 * @param[in] name unique coomponent name for the new Interpipe Sink
 * @param[in] forward_eos set to true to forward the EOS event to all the 
 * listeners. False to not forward.
 * @param[in] forward_events set to true to forward downstream events to 
 * all the listeners (except for EOS). False to not forward.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SINK_RESULT on failure
 */
DslReturnType dsl_sink_interpipe_new(const wchar_t* name,
    boolean forward_eos, boolean forward_events);

/**
 * @brief gets the current forward settings for named Interpipe Sink component.
 * @param[in] name unique coomponent name of the Interpipe Sink to query.
 * @param[in] forward_eos if true the EOS event will be forwarded to all the 
 * listeners. False otherwise.
 * @param[in] forward_events if true all downstream events will be forwarded 
 * to all the listeners (except for EOS). False otherwise.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SINK_RESULT on failure
 */
DslReturnType dsl_sink_interpipe_forward_settings_get(const wchar_t* name,
    boolean* forward_eos, boolean* forward_events);    

/**
 * @brief sets the forward settings for named Interpipe Sink component.
 * @param[in] name unique coomponent name of the Interpipe Sink to update.
 * @param[in] forward_eos set to true to forward the EOS event to all the 
 * listeners. False to not forward.
 * @param[in] forward_events set to true to forward downstream events to 
 * all the listeners (except for EOS). False to not forward.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SINK_RESULT on failure
 */
DslReturnType dsl_sink_interpipe_forward_settings_set(const wchar_t* name,
    boolean forward_eos, boolean forward_events);    
    
/**
 * @brief gets the current number of Interpipe Sources listening to 
 * the named Interpipe Sink component.
 * @param[out] num_listeners current number of Interpipe Sources listening.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SINK_RESULT on failure
 */ 
DslReturnType dsl_sink_interpipe_num_listeners_get(const wchar_t* name,
    uint* num_listeners);

New Inter-Pipe Source API

/**
 * @brief creates a new, uniquely named Interpipe Source component to listen to
 * an Interpipe Sink Component. Supports dynamic switching between Interpipe Sinks.
 * @param[in] name unique name for the new Interpipe Source
 * @param[in] listen_to unique name of the Interpipe Sink to listen to.
 * @param[in] is_live set to true to act as live source, false otherwise
 * @param[in] accept_eos set to true to accept EOS events from the Interpipe Sink,
 * false otherwise.
 * @param[in] accept_event set to true to accept events (except EOS event) from 
 * the Interpipe Sink, false otherwise.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_interpipe_new(const wchar_t* name, 
    const wchar_t* listen_to, boolean is_live, 
    boolean accept_eos, boolean accept_events);

/**
 * @brief gets the current name of the Interpipe Sink the Interpipe Source 
 * component is listening to.
 * @param[in] name unique name of Interpipe Source to query
 * @param[out] listen_to unique name of the Interpipe Sink the Source is listening to.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_interpipe_listen_to_get(const wchar_t* name, 
    const wchar_t** listen_to);

/**
 * @brief sets the name of the Interpipe Sink the named Interpipe Source 
 * component is to listening to.
 * @param[in] name unique name of Interpipe Source to update
 * @param[in] listen_to unique name of the Interpipe Sink to listen to.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_interpipe_listen_to_set(const wchar_t* name, 
    const wchar_t* listen_to);

/**
 * @brief Gets the current accept settings in use by the named Interpipe Source.
 * @param[out] accept_eos if true, the Source accepts EOS events from the Interpipe Sink.
 * @param[out] accept_event if true, the Source accepts events (except EOS event) from 
 * the Interpipe Sink.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_interpipe_accept_settings_get(const wchar_t* name,
    boolean* accept_eos, boolean* accept_events);

/**
 * @brief Sets the accept settings for the named Interpipe Source to use
 * @param[in] accept_eos set to true to accept EOS events from the Interpipe Sink,
 * false otherwise.
 * @param[in] accept_event set to true to accept events (except EOS event) from 
 * the Interpipe Sink, false otherwise.
 * @return DSL_RESULT_SUCCESS on success, DSL_RESULT_SOURCE_RESULT otherwise.
 */
DslReturnType dsl_source_interpipe_accept_settings_set(const wchar_t* name,
    boolean accept_eos, boolean accept_events);

rjhowell44 avatar Aug 18 '22 03:08 rjhowell44

Merged into v0.26.alpha

rjhowell44 avatar Aug 25 '22 16:08 rjhowell44