[asterisk-dev] how does a channel driver know the result of codec negotiation ?
Luigi Rizzo
rizzo at icir.org
Fri Oct 12 12:59:24 CDT 2007
On Fri, Oct 12, 2007 at 06:48:41PM +0200, Kevin P. Fleming wrote:
> Luigi Rizzo wrote:
>
> > I suppose (but again, have no idea) that for audio codecs, asterisk
> > uses the .capabilities field of the struct ast_channel_tech to do
> > the matching, and because asterisk itself does the transcoding there
> > is no need to propagate the choice to the channel driver. But for
> > video the situation is different.
>
> That is exactly correct; the channel driver tells the core what
> format(s) the channel can supply/accept, and Asterisk does the rest. The
> channel driver is never informed of any changes in format that will
> occur to the media once they leave the channel driver.
>
> Why do you say that the situation is different for video?
because typically you cannot afford to do video transcoding in
the middle box.
So if the caller tells "i can do H261 | H263 | MPEG4" and the callee
can only decode say H263, the caller still has no idea of what
format to use. For incoming streams it is not much of a problem - if
you get one of your supported formats you switch to that on the
first incoming frame. But for outgoing data you have no clue...
cheers
luigi
More information about the asterisk-dev
mailing list