What is samples_per_frame ?

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

 



Please help me with these questions. The "max_rr_frame_size" and "pkt_size"
confuse


On Mon, Jan 28, 2013 at 10:50 AM, Khoa Pham <onmyway133 at gmail.com> wrote:

> Please help with these questions. The calculation makes no sense
>
>
> On Wed, Jan 23, 2013 at 9:47 AM, Khoa Pham <onmyway133 at gmail.com> wrote:
>
>> Hi Ming, you fixed OK for samples_per_frame. I have some other questions
>>
>> Question 1:  pjmedia-codec/silk.c, in function silk_codec_open()
>>
>> /* Inform the stream to prepare a larger buffer since we cannot parse
>>  * SILK packets and split it into individual frames.
>> */
>> attr->info.max_rx_frame_size = attr->info.max_bps *
>>  attr->info.frm_ptime / 8 / 1000;
>> if ((attr->info.max_bps * attr->info.frm_ptime) % 8000 != 0)
>>  {
>> ++attr->info.max_rx_frame_size;
>> }
>> attr->info.max_rx_frame_size *= SILK_MAX_FRAMES_PER_PACKET;
>>
>> Why should we multiply with SILK_MAX_FRAMES_PER_PACKET?
>>
>> Question 2: pjmedia/rtcp.c, in function pjmedia_rtcp_init2()
>> /* Set clock rate */
>>     sess->clock_rate = settings->clock_rate;
>>     sess->pkt_size = settings->samples_per_frame;
>>
>> Why should not it be like this  sess->pkt_size =
>> settings->samples_per_frame * si->param->setting.frm_per_pkt (with si is
>> pjmedia_stream_info) ?
>>
>>
>>
>>
>> On Wed, Jan 23, 2013 at 8:41 AM, Ming <ming at teluu.com> wrote:
>>
>>> Hi Khoa Pham,
>>>
>>> Thanks for spotting this, I just fixed the calculation in r4328
>>> (https://trac.pjsip.org/repos/changeset/4328).
>>>
>>> Regards,
>>> Ming
>>>
>>> On Tue, Jan 22, 2013 at 7:05 PM, Khoa Pham <onmyway133 at gmail.com> wrote:
>>> > Hi all,
>>> >
>>> > In pjmedia-codec/silk.c, the struct silk_private contains the field
>>> > "samples_per_frame", what is that? Is that the number of sample per
>>> frame?
>>> >
>>> > If yes, this code in silk_codec_open() in silk.c does not make sense
>>> >
>>> > silk->samples_per_frame = attr->setting.frm_per_pkt * FRAME_LENGTH_MS *
>>> > attr->info.clock_rate / 1000;
>>> >
>>> > Why should we multiply with "frm_per_pkt" ??
>>> >
>>> > --
>>> > Khoa Pham
>>> > HCMC University of Science
>>> > Faculty of Information Technology
>>> >
>>> > _______________________________________________
>>> > 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
>>> >
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>>
>>
>> --
>> Khoa Pham
>> HCMC University of Science
>> Faculty of Information Technology
>>
>
>
>
> --
> Khoa Pham
> HCMC University of Science
> Faculty of Information Technology
>



-- 
Khoa Pham
HCMC University of Science
Faculty of Information Technology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130129/791db77b/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