[mpp_enc]: remove mpp_enc_get_extra_data and mpp_enc_get_extra_data_size function and use control to get sps/pps of H.264 encoder

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1104 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2016-07-27 06:27:32 +00:00
parent 1407f07185
commit abc3e78078
12 changed files with 91 additions and 39 deletions

View File

@@ -170,10 +170,27 @@ int mpi_enc_test(MpiEncTestCmd *cmd)
ret = mpi->control(ctx, MPP_ENC_SET_CFG, &mpp_cfg);
if (MPP_OK != ret) {
mpp_err("mpi control failed\n");
mpp_err("mpi control enc set cfg failed\n");
goto MPP_TEST_OUT;
}
ret = mpi->control(ctx, MPP_ENC_GET_EXTRA_INFO, &packet);
if (MPP_OK != ret) {
mpp_err("mpi control enc get extra info failed\n");
goto MPP_TEST_OUT;
}
/* get and write sps/pps for H.264 */
if (packet) {
void *ptr = mpp_packet_get_pos(packet);
size_t len = mpp_packet_get_length(packet);
if (fp_output)
fwrite(ptr, 1, len, fp_output);
packet = NULL;
}
ret = mpp_frame_init(&frame);
if (MPP_OK != ret) {
mpp_err("mpp_frame_init failed\n");