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.

dvr_rdk h263 sliceMode= IMPEG4_SLICEMODE_BITS how to modify the test example funtion MPEG4E_TI_Update_putDataCallBack

hi all ,now i use the mpeg4 to enc h263 stream,i set the enc static paramters like following :

staticParams->useShortVideoHeader = 1;

staticParams->sliceCodingParams.sliceCodingPreset = 1;
staticParams->sliceCodingParams.sliceMode = 2;
staticParams->sliceCodingParams.sliceUnitSize = 1024;
staticParams->sliceCodingParams.gobInterval = 1;
staticParams->sliceCodingParams.useHec = 0;

so i accord the rdk mpeg4 doc to the the following dynamic paramters:

dynamicParams->sliceCodingParams.sliceCodingPreset = 1;
dynamicParams->sliceCodingParams.sliceMode = 2;
dynamicParams->sliceCodingParams.sliceUnitSize = 1024;
dynamicParams->sliceCodingParams.gobInterval = 1;
dynamicParams->sliceCodingParams.useHec = 0;

dynamicParams->videnc2DynamicParams.getDataFxn = (XDM_DataSyncGetFxn)MPEG4E_TI_Update_getDataCallBack;
dynamicParams->videnc2DynamicParams.getDataHandle = NULL;
dynamicParams->videnc2DynamicParams.getBufferFxn = (XDM_DataSyncGetFxn)MPEG4E_TI_Update_getBufferCallBack;
dynamicParams->videnc2DynamicParams.getBufferHandle = NULL;
dynamicParams->videnc2DynamicParams.putDataFxn = (XDM_DataSyncPutFxn)MPEG4E_TI_Update_putDataCallBack;
dynamicParams->videnc2DynamicParams.putDataHandle = NULL;

i want to know how to modify the function MPEG4E_TI_Update_putDataCallBack,because i just copy the function form the codec examples ,that when i 

run the app ,it can not make the h263 stream to be my set sliceUnitSize 1024.

so how can i fix it ?

tks

  • Hi Billy,

                 Can you provide more details on the issue.

    So its running fine but not able to generate the stream with mentioned slicesize ??

    Regards

    Gajanan

  • if i just to copy the demo example funtion:
    MPEG4E_TI_Update_putDataCallBack,MPEG4E_TI_Update_getBufferCallBack,MPEG4E_TI_Update_getDataCallBack
    my app can not run normal ,it will just enc for a little time ,i disable the following code:
    when isScattered=0 and dataSyncDescrSliceMode->varBlockSizesFlag=0
    //gSlicesBase[gSlicesBaseIndex] = (unsigned long*)baseAddr;
    //gSlicesSize[gSlicesSizeIndex] = blockSize;
    so it can enc normal ,but the size of the h263 stream between two 00 00 80 is about 64000 all the time ,so it is not the value i set