I wrote a python plugin ‘marineai-labeling’ that follows the Nvidia development guidelines :-) . The plugin works fine when it’s called through gst-launch-1.0 :
gst-launch-1.0 filesrc location=…/IMG_1868.mp4 ! decodebin ! m.sink_0 nvstreammux name=m batch-size=1 width=1280 height=720 ! nvinfer config-file-path= marineai_pgie_config.txt ! nvtracker ll-lib-file=/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_mot_klt.so ! nvinfer config-file-path= marineai_sgie1_config.txt ! nvinfer config-file-path= marineai_sgie2_config.txt ! nvvideoconvert ! tee name=t ! marineai_labeling t. ! queue ! nvdsosd ! nvegltransform ! nveglglessink sync=0 --gst-debug=3
The processing is done in the do_transform_ip() where I can access the content of the Gst buffer and I get the expected results.
When I create, add, link this plugin in a python application:
marineai_labeling = Gst.ElementFactory.make("marineai_labeling", "marineai-labeling") if not marineai_labeling: sys.stderr.write(" Unable to create marineai_labeling \n")
the plugin gets created, added and linked to the pipeline without any error. Adding some debug statements show that the init() in the plugin is called. However, the ‘do_transform_ip()’ is never called when the pipeline is started. The rest of the pipeline works as expected.
So my question is why is the behavior different when ran inside an application and gst-launch? Is there something obvious I missed ? Thanks for any comments that could help me to fix it.