Example "Simple PJSUA" without soundcard

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

 



B. van Klinken wrote:
> Hello Benny,
> 
> Thanks, i had seen the pages already, but somehow it's not clear for me how
> to realize the requested functionality (my problem).
> 
> I understood that i had to use a splitcomb.

You don't have to, actually. You only need to use splitcomb when
your application wants to *actively* get and put frames from/to pjmedia.

Alternatively, you can let pjmedia get and put frames from/to your
application instead. To do this, you'll just need to implement a
pjmedia_port, and provide two callbacks (get_frame and put_frame) to
be called by pjmedia. Then register your media port to the
conference bridge by using pjsua_conf_add_port(). This in fact is
the easiest way to manipulate audio frames.

See playsine.c in samples directory for a simple pjmedia_port
implementation.

> I think that it must be for you only a couple of minutes and copy/paste to
> modify the "Simple PJSUA", where it works with external data (e.g. store
> info a memory bufer and read from another memory buffer.

For a splitcomb sample, see stereo_demo() in pjsua_app.c.

For pjmedia_port's that operate on buffer, see mem_capture.c and
mem_player.c in pjmedia. There are a whole bunch of other
pjmedia_port implementations to look at in pjmedia, of course.

cheers,
  -benny








[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