How to handle dynamic nvstreammux (new) EOS events

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
GPU
• DeepStream Version
6.0.1
• JetPack Version (valid for Jetson only)
• TensorRT Version
8.0.2
• NVIDIA GPU Driver Version (valid for GPU only)
512
• Issue Type( questions, new requirements, bugs)
question
• 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)

Hi,

I have a simple pipeline as below:

Each source bin is reading mp4 files and decoding them to nv12 format. Whenever one mp4 file is completed, I want to start decoding the next one, so every source is always decoding a file.

Whenever a video file is completely decoded, an EOS event is generated by the filesrc element as expected. When the EOS event is received by the nvstreammux, a nv-stream-eos event is generated as described Additionally, the muxer also sends a GST_NVEVENT_STREAM_EOS to indicate EOS from the source.

When the nv-stream-eos event is received on the fakesink in a probe callback, i want to set the appropriate source state to null, change the location of the filesink and set the state to playing in order to start decoding the next videofile.

Currently however, i am unable to achieve the above, since the nvstreammux goes into EOS state.

Example:

  1. Source0 generates EOS while Source1 and Source2 are still playing
  2. EOS is received by nvstreammux
  3. NV-STREAM-EOS is generated by nvstreammux and pushed downstream
  4. NV-STREAM-EOS is received on fakesink sinkpad probe.
  5. Source0 state is set to NULL
  6. Source0 filesink location is changed to a new .mp4 file
  7. Source0 state is set to PLAYING
  • How should i deal with the original EOS event? Should it be dropped on the nvstreammux src pad?
  • How do i make sure that changing the .mp4 file of Source0 does not stop decoding on Source1 and Source2
  • When the original EOS event from Source 0 is received by nvstreammux, and “stream-eos” is posted on the bus, Source 1 and Source 2 dataflow stops

Thanks in advance,

/M

Why did you handle EOS message with pad probe?

More reasonable way is to use bus Bus (gstreamer.freedesktop.org)
It is just gstreamer coding skills, please refer to gstreamer community.

That is exactly the question… WHERE Should i handle the EOS event in order for dataflow to be uninterrupted. Please see my questions above.

/M

Please use bus Bus (gstreamer.freedesktop.org)
It is just gstreamer coding skills, please refer to gstreamer community.