G.711 with stereo hardware

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

 



On Thu, Jul 2, 2009 at 2:46 PM, David Andrey <David.Andrey at netmodule.com>wrote:

>  Maybe useful for someone J
>
>
>
> I made the following changes in stereo_port.c:
>
>
>
> *static* pj_status_t *stereo_get_frame*(pjmedia_port *this_port,
>
>                             pjmedia_frame *frame)
>
>
>
>     //tmp_frame.*buf* = sport->get_buf? sport->get_buf : frame->*buf*;
> // allocate get buffer for stereo port ???
>
>     //tmp_frame.size = sport->dn_port->info.bytes_per_frame;
>
>     *if* (sport->get_buf)
>
>     {
>
>       tmp_frame.buf = sport->get_buf;
>
>       tmp_frame.size = sport->dn_port->info.bytes_per_frame;
>
>     }
>
>     *else*
>
>     {
>
>       tmp_frame.buf = frame->buf;
>
>       tmp_frame.size = frame->size;                               // *da*,
> 2009-06-30
>
>     }
>
>
>
>
>
> *static* pj_status_t *stereo_put_frame*(pjmedia_port *this_port,
>
>                             *const* pjmedia_frame *frame)
>
>
>
>       //tmp_frame.size = sport->dn_port->info.bytes_per_frame;
>
>       tmp_frame.size = sport->dn_port->info.samples_per_frame       // *da
> *, 2009-06-30
>
>                         * sport->base.info.bits_per_sample / 8;
>
>
>
> Still have memory problems (heap) in relation with the stereo usage. But
> stereo <-> G.711 seems ok now.
>

Sorry I don't understand your patch above. When calling get_frame() or
put_frame(), caller must supply frame size exactly as specified by
port_info.bytes_per_frame of the specified port. I have a felling that
somewhere your code does not do this hence the memory problem.

Also the stereo port was not supposed to support G.711 channel conversion
(i.e. only PCM), if this is what you're trying to do too.

cheers
 Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090703/f5cd13df/attachment-0001.html>


[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