Re: rport function is not calling

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

 



I debugged the library more and found that in PC system i have a back trace like below:

#0  rport_put_frame (this_port=0x7fffe8033d78, frame=0x7fffedf31cd0) at ../src/pjmedia/splitcomb.c:724
#1  0x00007ffff7039c64 in pjmedia_port_put_frame (port=0x7fffe8033d78, frame=0x7fffedf31cd0) at ../src/pjmedia/port.c:115
#2  0x00007ffff702e9e5 in write_port (conf=0x619498, cport=0x7fffe80371f8, timestamp=0x7fffedf31e78, frm_type=0x7fffedf31d2c) at ../src/pjmedia/conference.c:1760
#3  0x00007ffff702efda in get_frame (this_port=0x694bb8, frame=0x7fffedf31e60) at ../src/pjmedia/conference.c:1998
#4  0x00007ffff7039c07 in pjmedia_port_get_frame (port=0x694bb8, frame=0x7fffedf31e60) at ../src/pjmedia/port.c:98
#5  0x00007ffff7047875 in play_cb (user_data=0x7fffe80388d8, frame=0x7fffedf31e60) at ../src/pjmedia/sound_port.c:89
#6  0x00007ffff5ca48ec in pb_thread_func (arg=0x7fffe80398e8) at ../src/pjmedia-audiodev/alsa_dev.c:463
#7  0x00007ffff6e01d6c in thread_main (param=0x7fffe8045908) at ../src/pj/os_core_unix.c:541
#8  0x00007ffff4bd76fa in start_thread (arg=0x7fffedf32700) at pthread_create.c:333
#9  0x00007ffff691bb5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

but in embedded board i have the following back trace:

#0  get_frame (this_port=0x419287bc, frame=0x429fedd8) at ../src/pjmedia/splitcomb.c:623
#1  0x402bd7f8 in pjmedia_port_get_frame (port=0x419287bc, frame=0x429fedd8) at ../src/pjmedia/port.c:98
#2  0x402c7a9e in play_cb (user_data=0x2beb4, frame=0x429fedd8) at ../src/pjmedia/sound_port.c:89
#3  0x40528d92 in pb_thread_func (arg=0x419244d4) at ../src/pjmedia-audiodev/alsa_dev.c:463
#4  0x403060b4 in thread_main (param=0x419246cc) at ../src/pj/os_core_unix.c:541
#5  0x406325a4 in start_thread (arg=0x0) at pthread_create.c:335
#6  0x403e0cec in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:89 from /lib/arm-linux-gnueabihf/libc.so.6

This means that in PC the get_frame function that exists in conference.c is called but in embedded board splitcomb version is called.
Anyone has an idea about this behaviour?

On Sun, Aug 14, 2016 at 4:08 PM, Shahram Shabpareh <shabpareh.shahram.7@xxxxxxxxx> wrote:
Hi
I have a PC with 2 sound cards. i used this snippet of code to stablish a connection as described in https://trac.pjsip.org/repos/wiki/FAQ#multi-snd

void MyCall::onCallMediaState(OnCallMediaStateParam &prm)
{
    pjmedia_snd_port    *sndport    = NULL;
    pjmedia_port        *splitcomb  = NULL;
    pjmedia_port        *revch      = NULL;
    int slot;
     
    static int sound_device = 1;
    pjsua_call_id call_id= this->getInfo().id;
    pjsua_call_info ci;     
    pjsua_call_get_info(call_id, &ci);
 
     
    pj_status_t status;
    status = pjmedia_snd_port_create(pjpool,sound_device,sound_device,8000,1,160,16,0,&sndport);
     
 
    status = pjmedia_splitcomb_create(pjpool,8000,1,160,16,0,&splitcomb);
    status = pjmedia_splitcomb_create_rev_channel(pjpool, splitcomb,0,0, &revch);
     
    status = pjsua_conf_add_port(pjpool, revch, &slot);
    status = pjmedia_snd_port_connect(sndport, splitcomb);
     
    pjsua_conf_connect(ci.conf_slot,slot);
    pjsua_conf_connect(slot, ci.conf_slot);
    sound_device++;
}

The result is ok, and i have sound in both sound card 1 and 2 with diferrent call sources.

I have a board with a SOC that 2 sound ports are enabled, so there are 2 sound cards on it exactly like PC. but when i run code mentioned above, there aren't any sound from embedded board.

I debugged the library and found that in PC when functions like get_frame and put_frame called the functions rport_put_frame and rport_get_frame are also called respectively.

but in embedded board only get_frame and put_frame functions are called.

what is the reason for this behaviour and how can i solve this issue?

thanks


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
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