linphone-developers
[Top][All Lists]
Advanced

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

Re: [Linphone-developers] Intercapt microphone path


From: Simon Morlat
Subject: Re: [Linphone-developers] Intercapt microphone path
Date: Tue, 28 Sep 2010 17:11:45 +0200

Hi Andre,

I think you need to implement a new mediastreamer2 filter to work on the
stream.
And then you could insert your filter just after the sound reader
filter.
See in mediastreamer2/src/audiostream.c, near line 359:

        ms_connection_helper_start(&h);
        ms_connection_helper_link(&h,stream->soundread,-1,0);
        if (stream->read_resampler)
        ms_connection_helper_link(&h,stream->read_resampler,0,0);
        if (stream->ec)
                ms_connection_helper_link(&h,stream->ec,1,1);
        if (stream->volsend)
                ms_connection_helper_link(&h,stream->volsend,0,0);
        if (stream->dtmfgen_rtp)
                ms_connection_helper_link(&h,stream->dtmfgen_rtp,0,0);
        ms_connection_helper_link(&h,stream->encoder,0,0);
        ms_connection_helper_link(&h,stream->rtpsend,0,-1);

This code builds the following processing graph (when software echo
canceller and resampler are not needed, which is the case on the
iPhone):
MSAuRead-->MSVolume-->MSDtmfGen-->MSMulawEnc-->MSRtpSend

The 'soundread' filter just output raw 16 bit samples, so you can work
on them before they are transmitted to next filter.

If you need an example on how to build a mediastreamer2 filter, you can
have a look at mediastreamer2/src/chanadapt.c . This is probably the
simplest filter in mediastreamer2. Its purpose is to convert an
interleaved stereo audio stream to a mono audio stream and vice-versa.

Best regards,

Simon


Le dimanche 26 septembre 2010 à 20:22 -0400, Andre Courchesne a écrit :
> Hi,
> 
>    I need to modify the iPhone version of Linphone in such a way that  
> I can do a process on the microphone input data prior to that data  
> going through the rest of the Linphone path.
> 
>    The process I need to do on the data is fairly simple but I need to  
> do it on uncompressed data and dta that had not gone through the coded  
> process.
> 
>    Any hints on where in the code I could insert my code or a hook?
> 
>    Thanks,
> 
> Andre
> 
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]