can parts of IPP pipeline works?

If I have two output components and they are running in separate thread, can thread OUTPUT2 working correctly when I terminate thread OUTPUT1?

Now when I terminate thread OUTPUT1, the state of eglstream1 always is EGL_STREAM_STATE_EMPTY_KHR. Do you have any suggestion to solve this problem? Thanks.

IPP pipeline (I use ipp_raw source code as the code base) is:

camera->ICP->ISP->OUTPUT1->eglstream1 (OUTPUT1 is using inthread1)
->OUTPUT2->eglstream2 (OUTPUT2 is using inthread2)

Dear ya3bnxm,
Few things to clarify here. EGLStream facilitates flow of frames from producer to consumer. In this case, you are sending from thread 1 to thread 2. So when you terminate first thread, you are stopping the flow of frames.
EGL_STREAM_STATE_EMPTY_KHR indicates there are no frames in EGLStream buffer which is expected as you are stopping the producer.

Dear SivaRamaKrishna,

Sorry I did not explain the case clearly. In ipp raw sample code, there are two output components (raw/yuv), and one single process EGLStream facilitates flow of YUV frames from producer to consumer and meanwhile we could save the RAW frames.

Two modifications I have made:

  1. use cross partition EGLStream, so producer and consumer can run in two shells.
  2. use another cross partition EGLStream to facilitate flow of RAW frames from producer to consumer

In this case, there are 2 threads, one for yuv producer and the other for RAW producer.

If I terminate the consumer corresponding to yuv producer, yuv producer will know eglstream disconnected through the eglstate and then this yuv producer thread can be terminated. In my understanding, the raw producer thread should continue posting raw frame to its eglstream. But the results show that the raw thread cannot get the RawOutput when we call NvMediaIPPComponentGetOutput function. And in this case, I also found that the eglstream’s state becomes EGL_STREAM_STATE_EMPTY_KHR. So I want to know how does the IPP pipeline work if we terminate only one thread in a multiple thread case. Thanks.

Dear ya3bnxm,
In this usecase, when you terminate the EGLStream which gets frames from the second Output component that is connected to the ISP, they effectively stop the consumption of frames generated by the ISP. This stops ISP and it is not consuming frames from the Capture, and the pipeline stalls. IPP architecture does not support dynamic de-attachment from a component. The only solution in this particular case would be to continue consuming the frames from the second Output and immediately return the frames with the NvMediaIPPComponentReturnOutput() API. Other questions related to similar topic are answered at [url]https://devtalk.nvidia.com/default/topic/1049195/driveworks/one-camera-has-multiple-pipelines/[/url]