Issue with Adding Bus Watch in NVDSAnalytics Test App

Hello,

I’m currently working with the NVDSAnalytics test app and I’m trying to add a bus watch so I can handle messages (errors or state changes). However, I’m encountering some issues.

Here’s what I’ve tried:

First, I used the following code:

GstBus *bus = gst_pipeline_get_bus(GST_PIPELINE(appCtx[0]->pipeline.pipeline));
bus_watch_id = gst_bus_add_watch(bus, bus_call, appCtx[0]->pipeline.pipeline);

But I’m getting bus_watch_id = 0.

Then, I tried this:

// Get the bus from the pipeline
GstBus *bus = gst_pipeline_get_bus(GST_PIPELINE(appCtx[0]->pipeline.pipeline));
// Add a signal watch to the bus
gst_bus_add_signal_watch(bus);
// Connect to the "message" signal
g_signal_connect(bus, "message", G_CALLBACK(bus_call), appCtx[0]->pipeline.pipeline);

But I’m getting the following error: GStreamer:ERROR:gstbus.c:1400:gst_bus_add_signal_watch_full: assertion failed: (!bus->priv->signal_watch).

I’m not sure how to proceed from here. How can I call the bus_call method to handle errors and state changes? Any help would be greatly appreciated.

Thank you.

Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• 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)

*Hardware Platform: Jetson AGX Orin 64GB Developer Kit
*DeepStream Version: 6.3
*JetPack Version: 5.1.2.
*TensorRT Version: 8.5.2.2.
*Issue Type: cannot connect bus_call method for handling messages
*How to reproduce the issue: I’m using NVDSANALYTICS-TEST-APP from demo and I tried to add call bus_call method as described above

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

please refer to deepstrea-test1. the third parameter of gst_bus_add_watch is GMainLoop* , not pipeline.

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