Problems upgrading to 0.9 from 0.8

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

 



Hi Nanang,

Im giving you more details:

>>    Those values (256 & 352) seems odd, what is the value of
>>    'memory_port'->info.samples_per_frame? And also conference bridge's
>>    samples_per_frame value? Could you send along the result of 'cl'
>>    command in pjsua prompt?

   memory_port->info.samples_per_frame = 256

this value is achieved by frame_size / 2 / channel_count
frame_size is being sent with 512, the 2 is dividing the frame size by 2 (16
bit per samples, 2 bytes each sample) and channel_count = 1

regarding cl command in pjsua, we are running pjsualib on our own project, i
don't think i can use that here, right?

>> What is 512 stand for here?

this is passed to the create_memory_port function as explained above and its
used to set the port->info.bytes_per_frame value. its the frame size of
audio data we receive on application. We receive pcm audio frames.

>> Actually I am  interested to know what the value of memory
>> port->info.samples_per_frame and conference's samples_per_frame.

port->info.samples_per_frame = 256
conference samples_per_frame i think it has the value 320 as this is the
value actually on pjsua_var.mconf_cfg.samples_per_frame used when we call
pjmedia_snd_port_create_player.


Thanks in advance

Joao


On Fri, Aug 22, 2008 at 11:15 AM, Nanang Izzuddin <nanang at pjsip.org> wrote:

    Hi Joao,

    Please see inline comments..


    2008/8/22 Jo?o C?sar <jpcesar at gmail.com>:
    > Hi Nanang,
    >
    > these are the last values before the assertion fails:
    >
    > 256 <= 320
    > 160 <= 160
    > 352 <= 320

    Those values (256 & 352) seems odd, what is the value of
    'memory_port'->info.samples_per_frame? And also conference bridge's
    samples_per_frame value? Could you send along the result of 'cl'
    command in pjsua prompt?

    >
    > Assertion failed: cport->rx_buf_count <= cport->rx_buf_cap, file
    > e:\development\
    > jcesar\pjproject-0.9.0\pjmedia\src\pjmedia\conference.c, line 1404
    >
    >> Which codec and which clock rates are you using for
    >> the sound device/conference and conference ports used such as file
    >>ports if any. And, sometime reclean the whole project may resolve a
    >> problem occured after changing library.
    >
    > we are working with the no sound device option since we only use PJSIP
to
    > deliver the packets to a third party application via SIP. we receive
audio
    > packets from a socket, if we dont have a call for that client we make
the
    > call, else we just feed the memory port with more samples.
    >
    > we are making the call like this:
    >
    > sampleRate = 8000;
    > channels = 1;
    > number_frames = 960;
    > channel_count = 1;
    >
    > // create a media port to generate samples.
    > status = create_memory_port( pool, sampleRate, 512, number_frames,
    > channel_count, &callData[sessionId].memory_port_phone_out);
    >

    What is 512 stand for here?

    > // add port to conference
    > status = pjsua_conf_add_port(pool,
    > callData[sessionId].memory_port_phone_out,
&callData[sessionId].port_id);
    > if (status != PJ_SUCCESS) error_exit("Error adding memory port",
status);
    >
    > status = pjsua_call_make_call(acc_id,uri, 0,
&callData[sessionId].port_id,
    > NULL,NULL);
    > if (status != PJ_SUCCESS) error_exit("Error making call", status);
    >
    > // assign the callid to the current call in callData
    > callData[sessionId].call_id =  callId;
    >
    > // increment callId for next call
    > callId++;
    >
    > //creates the sound port
    > status = pjmedia_snd_port_create_player(pjsua_var.pool,
    >                                                 0,
    >
    >                                                 8000,
    >
    > pjsua_var.mconf_cfg.channel_count,
    >
    > pjsua_var.mconf_cfg.samples_per_frame,
    >
    > pjsua_var.mconf_cfg.bits_per_sample,
    >                                                 0,
    >                                                 &sound_port);
    >
    > status = pjmedia_snd_port_connect(sound_port,
    > pjmedia_conf_get_master_port(pjsua_var.mconf));
    >
    >
    > Each time we receive an audio packet we put that frame into
memory_port:
    >
    > // put frame
    > memory_put_frame(callData[sessionId].memory_port_phone_out, &pjframe
);
    >
    >
    > and these are the options on the create memory port function:
    >
    >
    >     /* Fill in port info. */
    >     port->info.bits_per_sample = 16;
    >     port->info.channel_count = channel_count;
    >     port->info.encoding_name = pj_str("pcm");
    >     port->info.has_info = 1;
    >     port->info.name = pj_str("memory playback");
    >     port->info.need_info = 0;
    >     port->info.pt = 0xFF;
    >     port->info.clock_rate = sampling_rate;
    >     port->info.samples_per_frame = frame_size / 2 / channel_count ;
    >     port->info.bytes_per_frame = frame_size;
    >     port->info.type = PJMEDIA_TYPE_AUDIO;
    >

    Couldn't find any suspect from the snippet code since it shows mostly
    variables without knowing the 'important' values. Actually I am
    interested to know what the value of memory
    port->info.samples_per_frame and conference's samples_per_frame.

    >
    > This was working fine on 0.8.
    >

    Conf port's buffer size (rx_buf_cap) calculation has been updated in
    0.9 due to multichannel/stereo support in conference (and also IIRC it
    seems rx_buf_cap in 0.8 is a bit over calculated, perhaps that's why
    it was working fine on 0.8, miscalculation was tolerated).

    Regards,
    nanang

    _______________________________________________
    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




-- 
Joao Cesar
msn: jpcesar at gmail.com
gtalk: jpcesar at gmail.com
icq: 13790802
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080822/1203e756/attachment.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