[Top][All Lists]

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

Re: [Linphone-developers] Intercapt microphone path

From: Andre Courchesne
Subject: Re: [Linphone-developers] Intercapt microphone path
Date: Wed, 29 Sep 2010 12:02:16 -0400

Hi Simon,

  Thanks for the pointer.

  So If I want to create my own filter (let's name it filter_andre), I guess I 
just have to add my C file and add filter_andre.c in (in 
libmediastreamer_la_SOURCES) and it will be compiled-in?

  Also looking at chanadapt.c. In the function adapter_process. I guess that in 
the for loop used for the conversion *(int16_t*)im->b_rptr represent a single 
byte of raw data ?


Andre Courchesne - Consultant

MSN: address@hidden

Skype: VoipForces

L'information contenue dans le présent document est la propriété de Andre 
Courchesne. Et est divulguée en toute confidentialité. Cette information ne 
doit pas être utilisée, divulguée à d'autres personnes ou reproduite sans le 
consentement écrit explicite de Andre Courchesne.

The information contained in this document is confidential and property of 
Andre Courchesne. It shall not be used, disclosed to others or reproduced 
without the express written consent of Andre Courchesne.

On 2010-09-28, at 11:11 AM, Simon Morlat wrote:

> 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
> _______________________________________________
> Linphone-developers mailing list
> address@hidden

reply via email to

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