Example "Simple PJSUA" without soundcard

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

 



Hello Benny,

Last week if been trying to make the "Simple PJSUA" without the soundcard,
but with a "Memory/Buffer-based Capture Port" and a "Memory/Buffer-based
Playback Port", but it don't get it working, and also i don't really know if
about what i do is correct. E.g. do i also have to create a conference
bridge in the "Simple PJSUA" or is it already created in the PJSUA library.
ALso i don's know about clearing and deleting what object at the end of the
program.

Is it possible that you modify the "Simple PJSUA" and send this file to me?
For you it is propably very easy and propably does not take much time.

I would very much appreciate it. When i have such a working example, i'm
pretty sure that i then can create the things we like to make.

So if possible modify the PJSUA in such a way that the audio in received
into a callback function where the audio bytes are e.g. only send to 'cout'.
And for the other audio direction, to have a callback funtion where e.g. you
have an array of nn bytes which are cylic send into the pjsip stack.

I hope you can help me.

Regards,

B. van Klinken

-----Original Message-----
From: pjsip-bounces@xxxxxxxxxxxxxxx
[mailto:pjsip-bounces at lists.pjsip.org]On Behalf Of Benny Prijono
Sent: 07-09-21 16:37
To: pjsip embedded/DSP SIP discussion
Subject: Re: Example "Simple PJSUA" without soundcard


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






_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




[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