What is the correct way to connect SIPL camera and nvmedia IEP encoder

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version

Target Operating System

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version

Host Machine Version
native Ubuntu 18.04

I’m building a pipeline processing project that has an SIPL camera as producer and an encoder as consumer. One key part of it is getting frame object NvMediaImage from SIPL camera completion queue and then feed it to the encoder.

Should I:

  1. get frame pointer → register pointer to encoder → feed the pointer directly to encoder, OR
  2. allocate and register local frame object → get frame pointer → copy content of frame pointer to local object → feed to local frame object to the encoder ?

I tried with method 1 and got this error when calling NvMediaIEPBitsAvailable:

NvEnc_Tvmr_Error: tvmrVideoEncoderBitsAvailable_MSENC: ucode ERROR = 1 

what does this mean?

The sample code for encoder encodes frames from a file. Is there any example that is related encoding live frames from SIPL camera?

Dear @leqiang.wang,
Is it possible to share some code snippet?

    void feedNext(INvSIPLClient::INvSIPLNvMBuffer *pBuffer) {
        NvMediaImage *imageFrame = pBuffer->GetImage()
        NvMediaStatus status = NvMediaIEPImageRegister(encoder.get(), imageFrame, NVMEDIA_ACCESS_MODE_READ);
        status = NvMediaIEPFeedFrame(encoder, imageFrame, &sourceRect, &encodePicParams, instanceId);

the above feedNext methods shows how I feed result pBuffer from SIPL camera to encoder. Is that correct. I saw in the img_enc sample, the NvMediaImage object fed to the encoder is set with 32bit-aligned height and width not sure if feeding image from the SIPL camra’s result buffer is OK.

Hi @leqiang.wang,

Please modify nvsipl_camera to see if you can reproduce the issue.
If you can reproduce it, please provide the patch and the reproducing steps for our investigation.