How to decode all format images(png jpg tiff bmp) with the same docodebin

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Tesla T4
• DeepStream Version 5.0
• JetPack Version (valid for Jetson only)
• TensorRT Version 7.0
• NVIDIA GPU Driver Version (valid for GPU only) 450.51

  1. I merge deepstream_appsrc_test and deepstream_image_decode_test, using the same source_bin to analysis multiple images, but when the jpeg-parser plugin fails to parse, the system exits, when I blocks “g_main_loop_quit” in bus_Call, the program is stuck, how to handle this exception, ensure that the program continues to run.

2.Can deepstream use the same decodebin to decode images in all formats(like jpg png tiff bmp)?

  1. bus_call() is only a sample, you can do other things other than g_main_loop_quit() . g_main_loop_quit() means to cancel the pipeline(https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-main-loop-quit), so the g_main_loop_run() will return. It is not “stuck” but “quit”. Nobody says g_main_loop_quit() is the only choice when bus_call() get the error message. You can do anything you want to handle the error message in bus_call().
  2. Do you mean uridecodebin(https://gstreamer.freedesktop.org/documentation/playback/uridecodebin.html?gi-language=c https://gstreamer.freedesktop.org/documentation/playback/decodebin.html?gi-language=c)? The answer is NO. You need to decode the files one by one in loop.

The questions are quite basic GStreamer concepts and glib usages related, these are open source projects. I think there are a lot of resources with internet, “Google” may help you for these kinds of questions. Let’s focus on DeepStream related questions and issues in this forum.

thank you for reply.
As far as I know, most algorithm engineers are not familiar with gstreamer and glib, and I checked all the examples and documents deepstream provided, but there is no related solution.
1.I mean, if I comment out g_main_loop_quit(), when the jpegparse plugin reports an error, the program got stuck, So your solution is to g_main_loop_quit first and then g_main_loop_run?
2.I use appsrc+jpegparse +nvv4l2decoder to decode jpeg images one by one in loop ,But only pictures in jpg format can be decoded。How can I decode all picture in defferent format(tiff jpg png)one by one in loop?

DeepStream is a SDK based on GStreamer, it is for application development but not for algorithm. It is a must to have the capability to understand and develop with GStreamer APIs and methodology. GStreamer is an open source project developed by GStreamer community. There is a lot of resources to refer to. https://gstreamer.freedesktop.org/

What we can help you is for nvv4l2decoder. It is developed by Nvidia. It can only support h264, h265 and jpeg/mjpeg decoding. https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html#page/DeepStream%20Plugins%20Development%20Guide/deepstream_plugin_details.html#wwpID0E0GR0HA

You can not use it to decode tiff png …
TIFF (https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf) and PNG (http://www.w3.org/TR/PNG/) are different image compression formats compared to JPEG(http://www.w3.org/Graphics/JPEG/jfif3.pdf), you need different decoders for tiff and png files.

I know that deepstream is used to develop applications, but if “It is a must to have the capability to understand and develop with GStreamer APIs and methodology”,it is very unfriendly to developers.
At least its samples need to cover most of the application situations, so that developers don’t need to care too much about other library like gstreamer or glib.