How to obey the ptime-value in SDP-Answer for RTP-stream?

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

 



Hi,

Just created ticket #1133 and checked in the patch to SVN trunk. Thanks!

A bit modification: rounding up the frm_per_pkt when "ptime" value is
not multiple of frm_ptime (speex codec recommends this, RFC 5574
Section 5.6).

Btw, could you describe more regarding "unstable packet time" when
sending 30ms payload length on audio_frame_ptime=20ms, as we used to
use 30ms iLBC payload length on audio_frame_ptime 20ms without
problem.

BR,
nanang


On Wed, Sep 15, 2010 at 4:38 PM, EiSl 1972 <eisl1972 at gmail.com> wrote:
> Hello all,
>
> A short update:
> I've introduced a patch which seems to work OK for me. Any "ptime" attribute
> in the remote SDP is now applied to the stream encoder. To have a good 30ms
> payload (and other payloads), the media_cfg.audio_frame_ptime should be set
> to 10. Using the default of 20 will give an unstable packet time (when using
> null-audio device)
>
> One comment...
> While I was investigating, I got the feeling that the "ptime" is just
> ignored. It is parsed from the SDP and stored, but it seems never been
> applied. What IS applied is the more exotical "maxptime".
> Is there a reason why "ptime" is ignored? Did I overlooked something?
> I've introduced my patch at the same location as where the "maxptime" is
> applied to the encoder settings.
>
> The patch (applied on 1.5.5 release)
>
> @session.c (pjmedia-tree ) pjmedia_stream_info_from_sdp(...) around line 530
>
> ??? ...
>
> ??? ...
>
> ??? /* Get local fmtp for our decoder. */
>
> ??? parse_fmtp(pool, local_m, si->fmt.pt, &si->param->setting.dec_fmtp);
>
> +
>
> +? ? /* Get the remote ptime for our encoder. */
>
> + ?? attr = pjmedia_sdp_attr_find2(rem_m->attr_count, rem_m->attr,
>
> +??????????????????????? ? "ptime", NULL);
>
> +??? if (attr) {
>
> +????? pj_str_t tmp_val = attr->value;
>
> +
>
> +????? pj_strltrim(&tmp_val);
>
> +??????? si->param->setting.frm_per_pkt = (pj_uint8_t)(pj_strtoul(&tmp_val)
> / si->param->info.frm_ptime);
>
> +
>
> +??????? if ( si->param->setting.frm_per_pkt == 0 )
>
> +??????? {
>
> +??????????? si->param->setting.frm_per_pkt = 1;
>
> +??????? }
>
> +??? }
>
>
>
> ??? /* Get remote maxptime for our encoder. */
>
> ??? attr = pjmedia_sdp_attr_find2(rem_m->attr_count, rem_m->attr,
>
> ??????????????????????? ? "maxptime", NULL);
>
> ??? ...
>
> ??? ...
>
> With regards,
> Eize
>
>
> _______________________________________________
> 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