[Top][All Lists]
[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: |
Wed, 29 Sep 2010 22:45:31 +0200 |
Le mercredi 29 septembre 2010 à 12:02 -0400, Andre Courchesne a écrit :
> 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 Makefile.am
> (in libmediastreamer_la_SOURCES) and it will be compiled-in?
And need to add your filter id in the big enum in
include/mediastreamer2/allfilters.h
OR use MS_FILTER_PLUGIN_ID which is a kind of wildcard id.
In this case you will need first to register your MSFilterDesc manually
using ms_filter_register() , then you will need to use MSFilter
*ms_filter_new_from_name(const char *name); to instanciate your filter
instead of ms_filter_new().
>
> 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 ?
Yes, bytes of data are comprised between im->b_rptr and im->b_wptr. When
cast as int16_t* it represents 16 bit sound samples.
mblk_t are the structures that hold the media data in mediastreamer2.
Simon
>
> ---
>
> Andre Courchesne - Consultant
>
> http://www.net-forces.com
>
> 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
> >> http://lists.nongnu.org/mailman/listinfo/linphone-developers
> >
> >
> >
> > _______________________________________________
> > Linphone-developers mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/linphone-developers
>
>
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers
- [Linphone-developers] Intercapt microphone path, Andre Courchesne, 2010/09/26
- Re: [Linphone-developers] Intercapt microphone path, Simon Morlat, 2010/09/28
- Re: [Linphone-developers] Intercapt microphone path, Andre Courchesne, 2010/09/29
- Re: [Linphone-developers] Intercapt microphone path,
Simon Morlat <=
- Re: [Linphone-developers] Intercapt microphone path, Andre Courchesne, 2010/09/29
- Re: [Linphone-developers] Intercapt microphone path, Simon Morlat, 2010/09/30
- Re: [Linphone-developers] Intercapt microphone path, Andre Courchesne, 2010/09/30
- Re: [Linphone-developers] Intercapt microphone path, Andre Courchesne, 2010/09/30
- Re: [Linphone-developers] Intercapt microphone path, Andre Courchesne, 2010/09/30
- Re: [Linphone-developers] Intercapt microphone path, Andre Courchesne, 2010/09/30