Question about reset_source_pipeline return value behavior and watch_source_status handling - Gst-nvurisrcbin

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
GPU
• DeepStream Version
7.1
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
questions
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

While implementing HLS, I noticed a potential concern regarding the interaction between reset_source_pipeline and watch_source_status functions in gstdsnvurisrcbin.cpp.

Current Observation:

  1. reset_source_pipeline function always returns FALSE regardless of the operation’s outcome
  2. watch_source_status function, which is responsible for source destruction signaling, doesn’t appear to handle this return value
  3. The FALSE return occurs in both success and error paths:
if (gst_element_set_state (GST_ELEMENT (src_bin->src_elem),
        GST_STATE_CHANGE_FAILURE) {
    GST_ERROR_OBJECT (src_bin, "Can't set source bin to PLAYING");
    return FALSE;  // Error case
}
// ... more code ...
return FALSE;  // Success case also returns FALSE

Questions:

  1. Is this behavior intentional? Are there any considerations I might be missing?
  2. Should watch_source_status be handling the return value from reset_source_pipeline?
  3. Would it be beneficial to differentiate between success and failure returns?

Potential Enhancement Consideration: I experimented with modifying the implementation to:

  • Return TRUE for successful pipeline resets
  • Return FALSE only for actual failures
  • Apply the same source removal logic used when maximum connection attempts are reached

I would appreciate guidance on whether:

  1. The current implementation has specific reasons for its behavior that I might have overlooked
  2. The suggested changes align with the intended design of the component
  3. There are any potential side effects or considerations I should be aware of

Code location: File: gstdsnvurisrcbin.cpp Functions: reset_source_pipeline, watch_source_status

Version: DeepStream SDK 7.1

This investigation stems from implementing HLS functionality, and I want to ensure any potential modifications align with the intended design and reliability requirements of the system.

Thank you for investigating the source code carefully. We will check the code internally.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.