Error is occured on pyds.gst_element_send_nvevent_new_stream_reset

I am converting the contents of “deepstream_source_bin.c” code to python language for rtspsrc reconnection.

I use the pyds.gst_element_send_nvevent_new_stream_reset() function to reset the source according to document.

That function receives “gst_element” and “source_id” as parameters. However, both arguments are supposed to receive int. And the following error occurs when i use the current function.

Traceback (most recent call last):
    # parser : gst element - h264parser
    if not pyds.gst_element_send_nvevent_new_stream_reset(parser, 0):
TypeError: gst_element_send_nvevent_new_stream_reset(): incompatible function arguments. The following argument types are supported:
    1. (arg0: int, arg1: int) -> int

Maybe i think wrong argument type(int) of gst_element is problem. How to solve this problem?

• Hardware Platform (Jetson / GPU) : Jetson & GPU
• DeepStream Version : 6.1(Jetson - pyds 1.1.4) & 6.1.1(GPU - pyds 1.1.4)
• JetPack Version (valid for Jetson only) : 5.0.1
• TensorRT Version :
• NVIDIA GPU Driver Version (valid for GPU only) : 525.60.11
• Issue Type( questions, new requirements, bugs) 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)

1. install pyds
2. run code on python3

import pyds
from gi.repository import Gst

queue = Gst.ElementFactory.make("queue", "temp")
pyds.gst_element_send_nvevent_new_stream_reset(queue, 0)

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Could you try to convert the queue and parser to int with python?

1 Like

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