linphone-developers
[Top][All Lists]
Advanced

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

Re: [Linphone-developers] alaw codec in mediastreamer2


From: Simon Morlat
Subject: Re: [Linphone-developers] alaw codec in mediastreamer2
Date: Tue, 26 Sep 2006 21:17:26 +0200
User-agent: KMail/1.9.4

Le lundi 25 septembre 2006 09:04, Yao-Chung Chang a écrit :
> Hello, I've traced the source code of ms_ticker_run(), and have a question.
>
> Considering the following graph
>
>
>
> A   D - - E - - F
>    \         /
>      \     /
>       C  - - G
>    /
> B
>
> In the graph,  A, B, and D are the sources. In the first round,
>
> D is being processed, and  E is put to unschedulable list.
>
> Then,  A is being processed,  and C is put  to unscheduable list as well.
>
> Finally, B is being processed, then C, E, F, G are being processed though
>
> the graph traversal. Since C, E are being processed when B is done, why the
>
> unschedulable list containg C and E still needs to be processed? Or there
> is
>
> another special case that I didn't consider?

Your analysis is perfect.
C and E are put in the unschedulable list at a time when we don't know yet if 
they will be scheduled later (this is the case here when we recurse on B) or 
if they cannot be scheduled at all ( this is not the case here, it happens 
only when there is a loop in the MSFilter graph).
In all case we process the unschedulable list, but in the case of C and E the 
condition if (f->last_tick!=s->ticks ) will fail since f->last_tick==s->ticks 
since they have finally been scheduled after B. As a consequence they won't 
be called in .process() despite they are in the unschedulable list.

Now figure out the following graph:

A--->B----C---->D
     |      |
     ---<---
Where C is connected to B but B also connected to C (a loop).
Since B depends en C it can never be scheduled. Thus it is put on 
unschedulable list and called for process() because of force_schedule==TRUE. 
Once B is called for processing, C can now be scheduled and every thing goes 
fine.
This kind of loop happens when doing audio mixing with echo canceler.

Simon
>
>                               Regards,
>                                       ycchang
>
> 2006/9/24, Yao-Chung Chang <address@hidden>:
> > Would you please tell me how msticker schedule all filters?
> >
> >
> > In run_graphs(), there's a snippet of code handling unschedulable
> >
> > filter, and I still can't understand the comment there. Besides, I've
> > sucessfully
> >
> > hook a filter though the DSP, but got many "we are late of xxx
> > miliseconds"
> >
> >  messages. Is that mean the latency of my filter module is over 10ms?
> >
> >
> >                        Regards,
> >                             ycchang
> >
> > 2006/9/22, Simon Morlat <address@hidden>:
> > > > My question is
> > > > 1.how the buffer size, and frame_per_packet size is determined?
> > >
> > > I think it is determined from the ptime parameter.
> > >
> > > > and why the size_of_pcm is 160 * frame_per_packet?
> > >
> > > "frame" stands for a 10ms buffer of alaw.
> > >
> > > > 2. what the purpose of bufferizer?
> > >
> > > The bufferizer object is a kind of fifo where you put mblk_t buffers of
> > > any size (256,512,33), and read buffer of fized size (for example 160).
> > >
> > > Simon
> > >
> > > >                               Regards,
> > > >                                   ycchang
> > > >
> > > >
> > > > _______________________________________________
> > > > Linphone-developers mailing list
> > > > address@hidden
> > > > http://lists.nongnu.org/mailman/listinfo/linphone-developers




reply via email to

[Prev in Thread] Current Thread [Next in Thread]