[Asterisk-video] AMR: WARNING[4493]: translate.c:175 framein: no samples for amrtolin

Klaus Darilion klaus.mailinglists at pernau.at
Wed Jun 25 03:28:58 CDT 2008



Patrick schrieb:
> Hi Klaus,
> 
> On Mon, 2008-06-23 at 10:10 +0200, Klaus Darilion wrote:
>> Patrick schrieb:
>>> Hi Klaus,
>>>> 3. review the source code to see when this message is printed
>>> The error can be found on line 175 in main/translate.c
>>
>> Do a little bit more reviewing. Why is this message printed. Check the 
>> source code and go back from here to find the problem with the frame.
> 
> That will be a bit of a challenge since I know very little C :(

/*! \brief framein wrapper, deals with plc and bound checks.  */
static int framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
{
         int16_t *dst = (int16_t *)pvt->outbuf;
         int ret;
         int samples = pvt->samples;     /* initial value */

         /* Copy the last in jb timing info to the pvt */
         pvt->f.has_timing_info = f->has_timing_info;
         pvt->f.ts = f->ts;
         pvt->f.len = f->len;
         pvt->f.seqno = f->seqno;

         if (f->samples == 0) {
                 ast_log(LOG_WARNING, "no samples for %s\n", pvt->t->name);


So, in your scenario f->samples is 0. Lets look up the doxygen docu:
http://www.asterisk.org/doxygen/1.4/structast__frame.html#3fe9cc73676c96804037ee2e880792cc

this is the number of samples in the frame. The question is: Why is it 
set to 0? Who sets it?

First guess: rtp.c: rtp->f.samples = ast_codec_get_samples(&rtp->f);

this gets forwarded to amr_samples() in main.c.

Probably there is a bug as this always asumes octed-aligned format.

Thus the next steps would be to
1. get a capture from the Nokia phone:
  - SIP (for SDP analyzing)
  - RTP (for AMR analyzing)

2. find ouf if nokia uses octed-aligned format or not

3. extend codec_amr.c to handle non octed-aligned format too

regards
klaus


regards
klaus



More information about the asterisk-video mailing list