handle mutiple media flows simultaneously

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

 



Hi,

Is there single memplayer instance for each call or shared by all
calls? Just in case you are using single memplayer instance for all
calls, but creating many conf ports for it.

Btw, in which callback is above code called? why does it always create
master port?

Regards,
nanang


On 02/09/2008, vopjessie <jessievop at hotmail.com> wrote:
> Hi All, my program is designed to be able to receive two calls
> simultaneously (in different threads). When an inbound comes in, my program
> plays audio data stored in memory to the caller. It works well when there is
> only one inbound. However, when two inbounds come in simultaneously, the
> sound quality heard by both callers is so poor that can be considered as
> noises. When one of the inbound calls has hung up, the sound quality on the
> other connected inbound call becomes good again. Could someone tell me what
> I am doing wrong?
>
>
> Thanks a lot!
>
> Jessica
>
> My code is included as follows:
>
>       // add port of the channel and the port of the audio buffer to the
> conference bridge
>
> if((pjmedia_conf_add_port(*(sipChannel->getPlayConf()),
> //pjmedia_conf *conf,
>          sipChannel->getPlayPool(), //pj_pool_t *pool,
>          portChannel, //pjmedia_port *strm_port,
>          NULL,//const pj_str_t *name,
>          &slotChannel//unsigned *p_slot)
>          ) == PJ_SUCCESS) &&
>       (pjmedia_conf_add_port(*(sipChannel->getPlayConf()),
> //pjmedia_conf *conf,
>          sipChannel->getPlayPool(), //pj_pool_t *pool,
>          portBuffer, //pjmedia_port *strm_port,
>          NULL,//const pj_str_t *name,
>          &slotBuffer//unsigned *p_slot)
>          ) == PJ_SUCCESS) &&
>       // connect audio and channel ports
>
> (pjmedia_conf_connect_port(*(sipChannel->getPlayConf()),
>           slotBuffer,
>           slotChannel,
>           0) == PJ_SUCCESS) &&
>
> (pjmedia_conf_adjust_tx_level(*(sipChannel->getPlayConf()),
> slotChannel, SIP_ADJUST_LEVEL) == PJ_SUCCESS) &&
>
> (pjmedia_conf_adjust_rx_level(*(sipChannel->getPlayConf()),
> slotBuffer, SIP_ADJUST_LEVEL) == PJ_SUCCESS) &&
>       // register call back
>       (pjmedia_mem_player_set_eof_cb(portBuffer,
> sipChannel, &fillPlayBuffer) == PJ_SUCCESS))
>   {
>     pj_status_t status = -1;
>     // create master port
>
> if((sipChannel->getSipStatus().compare("CONFIRMED")
> == 0) &&
>
> (status=pjmedia_master_port_create(sipChannel->getPlayPool(),
>                            portNull,
>
> pjmedia_conf_get_master_port(*(sipChannel->getPlayConf())),
>                            0,
>                            sipChannel->getPlayMasterPort()
>                        )) == PJ_SUCCESS)
>      // start the master port
>     status =
> pjmedia_master_port_start(*(sipChannel->getPlayMasterPort()));
> }
>
>
> ________________________________
> "?????????" ?????
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>


[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