[test]: Improve decoder reader usage

1. Change to new reader slot interface.
2. Use reader slot in all decoder test case.
3. Do not async reset on eos to avoid eos stream issue.

Change-Id: If296f6555fd0e57f6931085f02b0378e41a5f2ce
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2021-10-19 17:03:48 +08:00
parent 7b86c1abe4
commit d56760acd2
5 changed files with 132 additions and 79 deletions

View File

@@ -83,17 +83,25 @@ static int multi_dec_simple(MpiDecCtx *data)
RK_U32 pkt_done = 0;
RK_U32 pkt_eos = 0;
RK_U32 err_info = 0;
MPP_RET ret = MPP_OK;
MppCtx ctx = data->ctx;
MppApi *mpi = data->mpi;
char *buf = data->buf;
MppPacket packet = data->packet;
MppFrame frame = NULL;
FileReader reader = data->reader;
FileBufSlot *slot = NULL;
size_t read_size = 0;
RK_U32 quiet = data->quiet;
MPP_RET ret = reader_read(reader, &slot);
mpp_assert(ret == MPP_OK);
mpp_assert(slot);
pkt_eos = slot->eos;
buf = slot->data;
read_size = slot->size;
data->eos = pkt_eos;
data->eos = pkt_eos = reader_read(reader, &buf, &read_size);
if (pkt_eos) {
if (data->frame_num < 0) {
mpp_log_q(quiet, "%p loop again\n", ctx);