How to decide the plugins order

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU) GPU
**• DeepStream Version 6.1
**• JetPack Version (valid for Jetson only)
**• TensorRT Version8.4
**• NVIDIA GPU Driver Version (valid for GPU only)540
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Dear professor:
Thank you very much for your help.
I have wroten a plugin as dsexample. It is name is fenceplugin. I added it in the “deepstream-app.c->create pipeline(,)”. In the configure file, the two plugin are enabled. They can work fine.

My question is how to decide the plugin order in deepstream-app.c?

 if my code like this one, the fenceplugin is ahead of dsexample,   But I find the dsexample works at first.   So I hope to understand, which code is decide the order of the plugin.

Thank you very much,

Code:

pipeline->common_elements.appCtx = appCtx;

  // Decide where in the pipeline the element should be added and add only if enabled

  //---------------- I  added here -------//
  if (config->fenceplugin_config.enable)
  {
    // Create fenceplugin element bin and set properties
    if (!create_fenceplugin_bin (&config->fenceplugin_config, &pipeline->fenceplugin_bin))
    {
      goto done;
    }
    // Add fenceplugin bin to instance bin
    gst_bin_add (GST_BIN (pipeline->pipeline), pipeline->fenceplugin_bin.bin);
    // Link this bin to the last element in the bin
    NVGSTDS_LINK_ELEMENT (pipeline->fenceplugin_bin.bin, last_elem);
    // Set this bin as the last element
    last_elem = pipeline->fenceplugin_bin.bin;
  }
  //---------------------------------------------//

if (config->dsexample_config.enable)
  {
    // Create dsexample element bin and set properties
    if (!create_dsexample_bin (&config->dsexample_config, &pipeline->dsexample_bin))
    {
      goto done;
    }
    // Add dsexample bin to instance bin
    gst_bin_add (GST_BIN (pipeline->pipeline), pipeline->dsexample_bin.bin);
    // Link this bin to the last element in the bin
    NVGSTDS_LINK_ELEMENT (pipeline->dsexample_bin.bin, last_elem);
    // Set this bin as the last element
    last_elem = pipeline->dsexample_bin.bin;
  }

Hi @yangyi , you cannot change the plugins order from the config file. Generally speaking for DeepStream, they have a fixed order in a pipeline.
You can change it in the code with gst_element_link_many, you could learn more about Gstreamer for detailed information. Thanks

Thank you very much. I am trying.

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