Audio recording in WAV format using PJSUA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Friends,

 

I am trying to record Audio in WAV file format using the following code, but
when I don't know how to identify in the application that recording has
finished. How can we set such a call-back which is called when recording is
over. Also when I am recording using the below code, the recorded file is
not playable in media player.

 

Code for recording file:

 

            std::string fileName =
generateFileName(pCallData->cli,pCallData->msisdn);

            VEK_LOG_DEBUG("Trying to record file with Name = %s",
fileName.c_str());

            const pj_str_t recordFile = pj_str
(const_cast<char*>(fileName.c_str()));

 

 

            pj_status_t status = pjsua_recorder_create(&recordFile, 0, NULL,
0, 0, &pCallData->recorder_p_id);

            pjmedia_port *mediaPort = NULL;

            status = pjsua_recorder_get_port(pCallData->recorder_p_id,
&mediaPort);

 

            

            status = pjsua_conf_connect(pCallData->destConfPort,
pjsua_recorder_get_conf_port(pCallData->recorder_p_id));

 

My question is how to set a call-back which is called when the recording is
over and how to get the duration and size of file in this code.

 

Thanks,
Jitendra

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120905/253513be/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux