G.711 with stereo hardware

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

 



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.

 

 

 

 

From: pjsip-bounces@xxxxxxxxxxxxxxx
[mailto:pjsip-bounces at lists.pjsip.org] On Behalf Of David Andrey
Sent: Mittwoch, 17. Juni 2009 17:21
To: pjsip list
Subject: Re: G.711 with stereo hardware

 

I'm trying to use pjmedia_stereo_port_create() resolve my problem. But I
ends at runtime with at this point: 

g711_decode: Assertion `output_buf_len >= (input->size << 1)' failed.

 

The get_frame() function call the decoder with the following values:

 outSize:0, frame->size:160, samples_count:80, BYTES_PER_SAMPLE:2

 

Is the stereo port a practicable way to solve my problem ? 

 

From: pjsip-bounces@xxxxxxxxxxxxxxx
[mailto:pjsip-bounces at lists.pjsip.org] On Behalf Of David Andrey
Sent: Mittwoch, 17. Juni 2009 12:06
To: pjsip list
Subject: G.711 with stereo hardware

 

Hi all,

 

I'm running PJSIP and PJMEDIA on a hardware that  have some problems
with mono sound. Stereo works fine. 

 

I have to use G.711 as audio codec. Is there an "easy" way to add a
second channel (ideally a copy) to the existing one ?

 

Best regards

 

David

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090702/654d4318/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