This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to ouput MJPEG only when calling Venc_snapshotDump()

Hello,
We're implementing "snapshot" feature with DVR_RDK 4.0 on ti8168 board. When setting MJPEG for primary channels of encoder, the data keeps outputting. However, in order to reduce CPU usage, we hope data outputs only when calling Venc_snapshotDump(). How can we config it in encode chain?

Note. we have tried to set pLinkDynPrm->targetBitRate=0, but got the same result. (Data is always outputted.)

Thank you.

for( i = 0; i < gVencModuleContext.vencConfig.numPrimaryChn; i++ )
{

pLinkChPrm = encPrm.chCreateParams[i];
pLinkDynPrm = &pLinkChPrm->defaultDynamicParams;

pChPrm = &gVencModuleContext.vencConfig.encChannelParams[i];
pDynPrm = &pChPrm->dynamicParam;

pLinkChPrm->format = IVIDEO_MJPEG;
pLinkChPrm->profile = 0;
pLinkChPrm->dataLayout = VCODEC_FIELD_SEPARATED;
pLinkChPrm->fieldMergeEncodeEnable = FALSE;
pLinkChPrm->enableAnalyticinfo = 0;
pLinkChPrm->enableWaterMarking = 0;
pLinkChPrm->maxBitRate = 0;
pLinkChPrm->encodingPreset = 0;
pLinkChPrm->rateControlPreset = 0;
pLinkChPrm->enableSVCExtensionFlag = 0;
pLinkChPrm->numTemporalLayer = 0;

pLinkDynPrm->intraFrameInterval = 0;
pLinkDynPrm->targetBitRate = 100*1000;  // 0
pLinkDynPrm->interFrameInterval = 0;
pLinkDynPrm->mvAccuracy = 0;
pLinkDynPrm->inputFrameRate = pDynPrm->inputFrameRate;
pLinkDynPrm->qpMin = 0;
pLinkDynPrm->qpMax = 0;
pLinkDynPrm->qpInit = -1;
pLinkDynPrm->vbrDuration = 0;
pLinkDynPrm->vbrSensitivity = 0;


}

  • You can use Venc_disableChn and Venc_enableChn to enable and disable a encoder channel.

    By default have the channel disabled.

    Enable encoder channel before invoking  Venc_snapshotDump

    Disable the encoder again after you get the shapshot frame