I just migrate to DVRRDK4.0. I read the demo_vdec_vdis_bits_rd.c and find something abnormal in function VdecVdis_bitsRdSendFxn.
for (i = 0; i < gVdecVdis_config.numChannels; i++)
{
VdecVdis_bitsRdGetEmptyBitBufs(&emptyBufList, i);
if (emptyBufList.numBufs)
{
VdecVdis_bitsRdReadData(&emptyBufList);
VdecVdis_bitsRdSendFullBitBufs(&emptyBufList);
}
}
In DVRRDK3.5, the function VdecVdis_bitsRdGetEmptyBitBufs() gets all the buffers in emptyBufList at one time and calls VdecVdis_bitsRdReadData() and VdecVdis_bitsRdSendFullBitBufs() just one time. In DVRRDK4.0, the function VdecVdis_bitsRdGetEmptyBitBufs() could just get one emptyBuf a time, but I think we should call VdecVdis_bitsRdReadData() and VdecVdis_bitsRdSendFullBitBufs() just one time after we get all the buffers in emptyBufList. So, I change the codes as below:
for (i = 0; i < gVdecVdis_config.numChannels; i++)
{
VdecVdis_bitsRdGetEmptyBitBufs(&emptyBufList, i);
}
if (emptyBufList.numBufs)
{
VdecVdis_bitsRdReadData(&emptyBufList);
VdecVdis_bitsRdSendFullBitBufs(&emptyBufList);
}
But when I run the decode_display demo, I get the following message time and time again.
[host] RingBuf(377, RingBufferWriterAcquire) - Writer: Acquire already done
I don't understand why. Could someone tell me the reason?
Thanks in advance!