Hi,
PJMEDIA - IPP - G729-codec generates silence packet and sends no RTP during silence, although it has received SDP containing “fmtp:18 annexb=no”
In ipp_codec.c - ipp_codec_open the ipp-codec-attribute vad is switched off when params (from SDP) contains “annexb=0”. (OK)
However also ipp_codec_modify is called twice at the beginning of the call to temporarily reset vad,
and restore it again according the original value of pjmedia-codec-parameter “attr->setting.vad”.
Thus when “attr->setting.vad” is 1, then ipp-codec-attribute vad will be set to 1 again, despite the SDP-contents.
(NOT OK)
I have solved this as follows:
In ipp_codec.c - ipp_codec_open set add the marked lines:
/* Check if G729 Annex B is signaled to be disabled */
for (i = 0; i < attr->setting.enc_fmtp.cnt; ++i) {
if (pj_stricmp2(&attr->setting.enc_fmtp.param[i].name, "annexb")==0)
{
if (pj_stricmp2(&attr->setting.enc_fmtp.param[i].val, "no")==0)
add>> {
add>> attr->setting.vad = 0;
codec_data->info->params.modes.vad = 0;
add>> }
break;
}
Regards,
Arie
Hi Benny,
I sent fix below some weeks ago.
I noticed that it didn't make into the 1.7 release.
Maybe you can add it to the trunk for a next release?
Regards,
Arie Velthoen
From: arie_velthoen@hotmail.com
To: pjsip@lists.pjsip.org
Date: Mon, 2 Aug 2010 10:58:12 +0200
Subject: [pjsip] Fix for: PJMEDIA - IPP - G729-codec generates silence packet when annexb=no
Hi,
PJMEDIA - IPP - G729-codec generates silence packet and sends no RTP during silence, although it has received SDP containing “fmtp:18 annexb=no”
In ipp_codec.c - ipp_codec_open the ipp-codec-attribute vad is switched off when params (from SDP) contains “annexb=0”. (OK)
However also ipp_codec_modify is called twice at the beginning of the call to temporarily reset vad,
and restore it again according the original value of pjmedia-codec-parameter “attr->setting.vad”.
Thus when “attr->setting.vad” is 1, then ipp-codec-attribute vad will be set to 1 again, despite the SDP-contents.
(NOT OK)
I have solved this as follows:
In ipp_codec.c - ipp_codec_open set add the marked lines:
/* Check if G729 Annex B is signaled to be disabled */
for (i = 0; i < attr->setting.enc_fmtp.cnt; ++i) {
if (pj_stricmp2(&attr->setting.enc_fmtp.param[i].name, "annexb")==0)
{
if (pj_stricmp2(&attr->setting.enc_fmtp.param[i].val, "no")==0)
add>> {
add>> attr->setting.vad = 0;
codec_data->info->params.modes.vad = 0;
add>> }
break;
}
Regards,
Arie
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Hi Arie,
Just created ticket #1112 (http://trac.pjsip.org/repos/ticket/1112)
and checked in the patch to SVN trunk.
Thanks for such detail report and including the fix.
BR,
nanang
On Tue, Aug 17, 2010 at 10:01 PM, Arie Velthoen
arie_velthoen@hotmail.com wrote:
Hi Benny,
I sent fix below some weeks ago.
I noticed that it didn't make into the 1.7 release.
Maybe you can add it to the trunk for a next release?
Regards,
Arie Velthoen
From: arie_velthoen@hotmail.com
To: pjsip@lists.pjsip.org
Date: Mon, 2 Aug 2010 10:58:12 +0200
Subject: [pjsip] Fix for: PJMEDIA - IPP - G729-codec generates silence
packet when annexb=no
Hi,
PJMEDIA - IPP - G729-codec generates silence packet and sends no RTP during
silence, although it has received SDP containing “fmtp:18 annexb=no”
In ipp_codec.c - ipp_codec_open the ipp-codec-attribute vad is switched off
when params (from SDP) contains “annexb=0”. (OK)
However also ipp_codec_modify is called twice at the beginning of the call
to temporarily reset vad,
and restore it again according the original value of pjmedia-codec-parameter
“attr->setting.vad”.
Thus when “attr->setting.vad” is 1, then ipp-codec-attribute vad will be
set to 1 again, despite the SDP-contents.
(NOT OK)
I have solved this as follows:
In ipp_codec.c - ipp_codec_open set add the marked lines:
/* Check if G729 Annex B is signaled to be disabled */
for (i = 0; i < attr->setting.enc_fmtp.cnt; ++i) {
if (pj_stricmp2(&attr->setting.enc_fmtp.param[i].name, "annexb")==0)
{
if (pj_stricmp2(&attr->setting.enc_fmtp.param[i].val, "no")==0)
add>> {
add>> attr->setting.vad = 0;
codec_data->info->params.modes.vad = 0;
add>> }
break;
}
Regards,
Arie
_______________________________________________ Visit our blog:
http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org