Create conf port with incoming RTP stream

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

 



Hi everyone,

I just had an enquiry. I have a separate audio device that transmits
an RTP stream (with no RTCP) to my PC running PJSIP on port 4002. I
would like to convert that incoming RTP stream into a conference port
in PJSIP so I can use it for conferencing purposes.

Here is a little bit of what i did so far:

=================================================

pj_str_t port_name = pj_str("Stream from Radio 1");
pj_str_t codec = pj_str("PCMU/8000/1");

pool = pjmedia_endpt_create_pool( pjsua_var.med_endpt, "session",
PJMEDIA_SESSION_SIZE, PJMEDIA_SESSION_INC);

session = PJ_POOL_ZALLOC_T(pool, pjmedia_session);
session->pool = pool;
session->endpt = pjsua_var.med_endpt;
session->stream_cnt = 1;
session->user_data = call;

session->stream_info[0].dir = PJMEDIA_DIR_ENCODING_DECODING;
session->stream_info[0].type = PJMEDIA_TYPE_AUDIO;
session->stream_info[0].fmt.clock_rate = 8000;
session->stream_info[0].fmt.type = PJMEDIA_TYPE_AUDIO;
session->stream_info[0].fmt.channel_cnt = 2;
session->stream_info[0].fmt.encoding_name = codec;
session->stream_info[0].rem_addr = addr_RTP;

pjmedia_stream_create(pjsua_var.med_endpt,
session->pool,&session->stream_info[0],
call->med_tp, session, &session->stream[0]);

pjmedia_stream_start(session->stream[0]);

pjmedia_session_get_port(session, 0, &media_port);

create_conf_port(pjsua_var.pool, pjsua_var.mconf,
media_port, &port_name, &conf_port);

pjsua_var.mconf->ports[1] = conf_port;
pjsua_var.mconf->port_cnt++;

=================================================

I do receive the stream on the right port, but I can't seem to get the
audio out of the conf port.

Any ideas of what i might be doing wrong?

Thank you so much in advance,

Best Regards,

Hubert Langevin.



[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