[mpp_enc]: Prepareation for slice output mode

1. Add mpp_enc_callback for hal module.
2. Add low delay output check.

Change-Id: Ibda81043e3760defc0c2fd41166197a57abbbbe3
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2022-06-07 14:47:24 +08:00
parent 3cd4fecca5
commit 326dd264b8
7 changed files with 166 additions and 14 deletions

View File

@@ -28,6 +28,7 @@
#include "mpp_enc_debug.h"
#include "mpp_enc_cfg_impl.h"
#include "mpp_enc_impl.h"
#include "mpp_enc_cb_param.h"
RK_U32 mpp_enc_debug = 0;
@@ -62,10 +63,15 @@ MPP_RET mpp_enc_init_v2(MppEnc *enc, MppEncInitCfg *cfg)
goto ERR_RET;
}
p->output_cb.callBack = mpp_enc_callback;
p->output_cb.ctx = p;
p->output_cb.cmd = ENC_CALLBACK_BASE;
// H.264 encoder use mpp_enc_hal path
// create hal first
enc_hal_cfg.coding = coding;
enc_hal_cfg.cfg = &p->cfg;
enc_hal_cfg.output_cb = &p->output_cb;
enc_hal_cfg.task_cnt = cfg->task_cnt;
enc_hal_cfg.type = VPU_CLIENT_BUTT;
enc_hal_cfg.dev = NULL;