Add source dynamically and add prob but receive stream eos early


i add probe with sink, and first uri prob sucessfully, the back of the uri get eos firstly and prob nothing.

We have a reference sample of dynamically adding/deleting sources in

Please share a patch on it so that we can reproduce the issue.

demo.c.log (15.2 KB)

i refer to the sample.
set MAX_NUM_SOURCE=1, and when add source i check the num_source and delete,
to maintain the pipeline and init model once to detect file every time

We have the reference sample for dynamically adding/deleting sources. Please refer to it and debug your implementation. The sample is well verified by our QA teams. Shall be good and stable.

And your case may not be considered in the reference sample. In this condition, we would need your help to share a patch on the sample, and we can reproduce it for further investigation.

i have run your sample, but when the first file get eos, the loop quit.

i have a question, when i run my sample, how to reset the position of the pipeline, second uri get eos before prob.

It looks to be normal behavior that the loop quits when all sources are played to EOS. You have to keep one source alive at least.

i have many files to test and source will be add every once in a while, h264 source file finish in several seconds but the test interval is several minutes.

how can i encapsulate the pipeline as a function, so that i can init the model once and detect files at any time. it takes toi long to init a model and i have thounds of files to detect and track.

can i initial the position befor played to EOS?

i test a situation with two sources, source0 is rtsp and source1 is file, i can add and remove the file in source1, it works.
but the rtsp in source0 is runing, how can the pipeline run like this without rtsp

We are not able to handle the case no source is live. Please configure model-engine-file in nvifer.

  model-engine-file   : Absolute path to the pre-generated serialized engine file for the model
                        flags: readable, writable, changeable only in NULL or READY state

Without this configuration, it generates the model engine file at beginning. This take a while. You can save some time by configuring this property.

thanks anyway