Search code examples
objective-cpjsiprecorder

Creating pjmedia Recorder


I'm trying to create a pjmedia recorder but after the creation the status is 12001 instead of PJSUCCESS(0).

pj_status_t function()
{
    pjsua_recorder_id recorder_id;
    pj_status_t status;
    pj_str_t fileName =pj_str("mysong.wav");
    status = pjsua_recorder_create(&fileName, 0, NULL, 0, 0, &recorder_id);

    if (status != PJ_SUCCESS)
        return status;
}

Thanks.


Solution

  • My mistake was that I didn't specify the full path of the file and it didnt get permission to write the file in that location.