[pjsip] Question regarding passive ports.

Benny Prijono bennylp at pjsip.org
Tue Sep 11 12:14:25 EDT 2007


Frankly I've forgotten about pjmedia_conf_add_passive_port(). :D And I don't have source codes handy with me now so I can't check it out.

But it's true that this function is not used by anything. So it may be true that the implementation is broken.

More over, we now have splitcomb, which achieves the same thing in more general manner. So if you want passive ports (actually active probably is more correct, but anyway the term has been confusing), you can instantiate a splitcomb, and create a reverse channel on the splitcomb, which then you can add to the bridge using the usual pjmedia_conf_add_port(). Your thread then can feed frames to the splitcomb.

--
Benny Prijono
http://www.pjsip.org


- original message -
Subject:	[pjsip] Question regarding passive ports.
From:	"Lafras Henning" <lafras at xietel.com>
Date:		11/09/2007 14:15

 Question regarding passive ports.



I basically want to create a number of ports(10 to 20) in the conference bridge who's audio will be fed and extracted from an external thread.




I can't to find an example of the correct use of pjmedia_conf_add_passive_port(), so the following I have gathered from the code.




In conference .c get_frame() comment as follows.

/* Get frame from this port. 

* For port zero (sound port) and passive ports, get the frame from 

* the rx_buffer instead. */

if (conf_port->port == NULL) {.....




So it is clear that passive functions don't have a media port, as in




create_sound_port() calls create_pasv_port with port ==NULL, this Creates snd_buf buffers and keeps conf_port->port == NULL to work as above.




However 




pjmedia_conf_add_passive_port() creates a port, then calls create_pasv_port which does not create snd_buf buffers and keeps the port as the one created.




Function pjmedia_conf_add_passive_port() is not used anywhere and is inconsistent with the behaviour of sound port, thus seems as though it is not implemented correctly? Or can anyone give an example of how to use pjmedia_conf_add_passive_port() correctly?




Many thanks and regards

Lafras


_______________________________________________
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





More information about the pjsip mailing list