pjmedia_splitcomb how add channels to bridge?

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

 



hello everyone,

I'm working on aplication which should be know enable/disable right,left or 
both audio channels. I'm trying to do this with API
pjmedia_splitcomb_create()
pjmedia_splitcomb_set_channel()

I don't want reimplement own pjsua_set_snd_dev (and othhers) like in 
STEREO_DEMO (pjsua_app.c) because using in demo is follow:

1) Disable existing sound device
2) Create stereo-mono splitter/combiner
3) Connect channel to conference port slot0
4) Create sound device
5) Connect the splitter to the sound device 

+-----------------+ stereo  +------------------------+         +-----------
| AUDIO DEV | <------>  | SPLITCOMB   left|<----->|#0  BRIDGE
+-----------------+             |                  right|<----->|#1 
                                   +-----------------------+         +--------

When i use this way i have to rewrite own pjsua_set_snd_dev method 
because this method ensure: select right clock rate and make resample port.


I want make something like this:

                                                    BRIDGE
+-----------------+                  +---------------------------
| AUDIO DEV |    <-------->  | #0  AUDIO        
+-----------------+                  |                    
                                        |                    
                +------------------> | #1 SPLITER 
                 |                      |
                V                      |
   +-------------------+             | 
    | SPLITCOMB  |   <-----> | #2 LEFT CHANNEL
    |                    |   <-----> | #3 RIGHT CHANNEL
   +-------------------+             |
                                        +------------------------
                                 

Then i want connect conference port 0 to 1 and reverse

pjsua_conf_connect(0,1)
pjsua_conf_connect(1,0)

and then i will be connect each call to:

port 0 if i want both channels
port 2 if i want left channel
port 3 if i want right channel

Here is my order:

1)  Create stereo-mono splitter/combiner with:
       pjmedia_splitcomb_create(
                                      d->pool,
                                      masterPortInfo.clock_rate,
                                      2,
                                      2 * masterPortInfo.samples_per_frame,
                                      masterPortInfo.bits_per_sample,
                                      0,
                                      &d->sc ); //my spliter-combiner

2) Add to conference bridge splitter port (port #1)
      pjsua_conf_add_port( d->pool, d->sc, &splitterConfID );
                                      

and now i want connect spliter channel (right,left) to conference bridge..
but how?...in STEREO_DEMO conferenvce port in bridge exist (port 0)
..but what when conference port doesn't exist?

when i want connect left/right channel to conference bridge with API
 pjmedia_splitcomb_set_channel i need pjmedia_port..
when i want create conference port i need pjmedia_port too..

is possible get left/right channel from "splitcomb" like pjmedia_port? then
i can make port in bridge

or some other idea?


thanks














[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