TI中文支持网
TI专业的中文技术问题搜集分享网站

为dm3730添加aac encode的问题

我跟着 How_do_I_Integrate_new_codecs_into_DVSDK 上面的文档给dm3730添加aacheenc

修改codec.cfg (codec decleration)

    var AACHEENC = xdc.useModule('ti.sdo.codecs.aacheenc.ce.AACHEENC');

        AACHEENC.serverFxns = "AUDENC1_SKEL";
        AACHEENC.stubFxns = "AUDENC1_STUBS";
        AACHEENC.useCache = false;
        AACHEENC.alg.watermark = false;
        AACHEENC.alg.codeSection = codeSection;
        AACHEENC.alg.udataSection = udataSection;
        AACHEENC.alg.dataSection = dataSection;

Server.algs = [ 

    {name: "aacheenc", mod: AACHEENC , threadAttrs: {
        stackMemId: 0, priority: Server.MINPRI + 3},
        groupId : 2,
    },

 

package.xs (for validation)

/*
 *  ======== package.xs ========
 */

function validate() {

    // Each codec is validated with the following call:
    //    validate_one_codec(<package name>, <module name>);

      validate_one_codec( "ti.sdo.codecs.aacheenc", "AACHEENC" );
 

gstticodecs_omap3530.c (codec added to gstreamer)

    {
        "AAC Audio Encoder",     /* String name of codec used by plugin      */
        "aacheenc",              /* String name of codec used by CE          */
        codecServer              /* Engine that contains this codec          */
    },

编译codecs,、dmai 、 gstreamer

拷贝cs.x64P到板子上,使用我写的测试程序
    /* Create device driver instance */
    sAttrs.sampleRate = g_aac.maxSampleRate;
    sAttrs.mode = Sound_Mode_INPUT;
    if (device == Cpu_Device_OMAPL137) {
        sAttrs.soundStd = Sound_Std_ALSA;
    }

    sAttrs.soundInput = g_aac.soundInput;
    hSound = Sound_create(&sAttrs);
    if (hSound == NULL) {
        printf("Failed to create audio device\n");
        goto cleanup;
    }

    hEngine = Engine_open(“encode”, NULL, NULL);
    if (hEngine == NULL) {
        printf("Failed to open codec engine %s\n", g_aac.engineName);
        goto cleanup;
    }

    params.sampleRate = dynParams.sampleRate = g_aac.maxSampleRate;
    params.bitRate = dynParams.bitRate = g_aac.maxBitrate;

    /* Create the AUDENC1 based audio encoder */
    hAe1 = Aenc1_create(hEngine, "aacheenc", &params, &dynParams);
    if (hAe1 == NULL) {
        printf("Failed to create audio encoder\n");
        goto cleanup;
    }

板子输出的debug信息

root@dm37x-evm:/mnt/rpl/examples# CE_DEBUG=1 ./aacencode test.aac
aac filename is test.aac
@0,283,570us: [+6 T:0x4001fdd0] CE – Engine_init> CE debugging on (CE_DEBUG=1; allowed CE_DEBUG levels: 1=min, 2=good, 3=max)
start aac encode
[DSP] @0x0000029e:[T:0x00000000] server – main> Welcome to DSP server's main().
@0,402,587us: [+6 T:0x4001fdd0] CE – Engine_createNode> Remote node creation FAILED (0x80008008).
[DSP] @0,012,090tk: [+7 T:0x87c37794] ti.sdo.ce.alg.Algorithm – Algorithm_create> Algorithm creation FAILED; make sure that 1) alg params are correct/appropriate, 2) there is enough internal and external algorithm memory available — check DSKT2 settings for heap assignments and scratch allocation
[DSP] @0,012,249tk: [+6 T:0x87c37794] CV – VISA_create2> FAILED to create local codec.
@0,403,137us: [+6 T:0x4001fdd0] CV – VISA_create2> FAILED to create remote codec (0x8).
@0,403,167us: [+7 T:0x4001fdd0] ti.sdo.dmai – [Aenc1] Failed to open audio encode algorithm: aacheenc
Failed to create audio encoder

请问一下是哪里的问题?

kooking:

 运行应用程序的时候,需要带参数-a 吧

panno ren:

回复 kooking:

程序是我自己写的,根据dmai里面的app修改的,不需要参数,请问你能从CE_DEBUG中看出什么问题么?

赞(0)
未经允许不得转载:TI中文支持网 » 为dm3730添加aac encode的问题
分享到: 更多 (0)