Filter mic audio from sound device to conf bridge/call

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

 



Hello,

I've been searching the archives and sample code for a clean example of the
following setup:

soundPort/mic --> MyCustomMediaPort --> conf bridge+call.

I would like to process the audio captured from the microphone before it's
sent to the bridge/call. I'm using pjsua, but it looks like I may need to
directly use pjmedia instead in order to more directly control the media
flow. The examples I've seen don't clearly show how to send the data
directly to the downstream port, without having the actual port object
(since pjsua only uses port IDs). Is there something I've missed? I would
like to know whether I need to call put_frame/get_frame (don't think
get_frame is needed in this case) on the downstream port directly, which I
think in this case would be the conference bridge or master port. I've tried
using this (pseudo-code) but I don't have access to the main conference
bridge pjmedia_port * to assign to the dn_port of my_port.

on_media_state...(...) { // connect ports when call is answered
    .... // connect sound port to my port.
    pjsua_conf_connect(0, my_port);
    // connect my port to call conf port.
    pjsua_conf_connect(my_port, ci.conf_slot);
    ....
}

my_port_get_frame(port, frame) {
    return NO_OP;
}

my_port_put_frame(port, frame) {
    ....
    my_process(frame->buff);
    pjmedia_port_put_frame(dn_port, frame);
    ....
}

I may also want to perform processing on the incoming audio out of the
bridge to the speaker, so the same question would apply for that use case
but in the other direction.

ricks99
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20101208/056191f4/attachment-0001.html>


[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