[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: |
Thu, 30 Sep 2010 21:45:01 -0400 |
Ok, Now I have my debug log tags I inserted. I'll continue and add back my
filter to see how it goes.
---
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-30, at 9:13 PM, Andre Courchesne wrote:
> Hmmm just found the part of the log that matches that part of the code:
>
> 2010-09-30 21:03:33.953 linphone[5928:307] Payload's bitrate is 80000
> 2010-09-30 21:03:33.961 linphone[5928:307] Setting audio encoder network
> bitrate to 80000
> 2010-09-30 21:03:33.975 linphone[5928:307] MSUlawEnc: got ptime=20
> 2010-09-30 21:03:33.983 linphone[5928:307] ms_filter_link:
> MSAURead:0x28e250,0-->MSVolume:0x2873c0,0
> 2010-09-30 21:03:33.992 linphone[5928:307] ms_filter_link:
> MSVolume:0x2873c0,0-->MSUlawEnc:0x286ca0,0
> 2010-09-30 21:03:34.024 linphone[5928:307] ms_filter_link:
> MSUlawEnc:0x286ca0,0-->MSRtpSend:0x287740,0
> 2010-09-30 21:03:34.039 linphone[5928:307] ms_filter_link:
> MSRtpRecv:0x251980,0-->MSUlawDec:0x2863a0,0
> 2010-09-30 21:03:34.055 linphone[5928:307] ms_filter_link:
> MSUlawDec:0x2863a0,0-->MSDtmfGen:0x28def0,0
> 2010-09-30 21:03:34.070 linphone[5928:307] ms_filter_link:
> MSDtmfGen:0x28def0,0-->MSEqualizer:0x28bbd0,0
> 2010-09-30 21:03:34.084 linphone[5928:307] ms_filter_link:
> MSEqualizer:0x28bbd0,0-->MSVolume:0x216930,0
> 2010-09-30 21:03:34.100 linphone[5928:307] ms_filter_link:
> MSVolume:0x216930,0-->MSAUWrite:0x287d80,0
>
>
> Looks like my filter was not even compiled-in?
>
> ---
>
> 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-30, at 9:09 PM, Andre Courchesne wrote:
>
>> Hi Simon,
>>
>> Ok now I have log in xcode console.
>>
>> I have modified audiostream.c section so that I have 2 simple log "Here 1
>> AC" and "Here 2 AC":
>>
>> /*sending graph*/
>> ms_connection_helper_start(&h);
>> ms_connection_helper_link(&h,stream->soundread,-1,0);
>> ms_message("Here 1 AC");
>> ms_connection_helper_link(&h,stream->new_hula,0,0);
>> ms_message("Here 2 AC");
>> 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);
>>
>> I make a clear make of liblinphone and linphone and ran the app on my iphone
>> and made a test call. However I do not see my "Here 1 AC" and "Here 2 AC"
>> logs anywhere in the logs dumped by linphone. I have pastebin the logs if
>> you want to see:
>>
>> http://pastebin.com/H9mAEmk3
>>
>> Any hints on why this section of code does not seem to be executed?
>>
>> ---
>>
>> 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-30, at 10:05 AM, Simon Morlat wrote:
>>
>>> ms_debug() works if both ortp and mediastreamer2 are compiled with
>>> --enable-debug. Maybe you should just use ms_message() as a workaround,
>>> they display when the debug mode is toggled in the linphone-iphone
>>> settings.
>>>
>>> Simon
>>>
>>> Le mercredi 29 septembre 2010 à 22:00 -0400, Andre Courchesne a écrit :
>>>> Hi Simon,
>>>>
>>>> Just for test I have created my own filter with my own Id based on
>>>> chanadapt.c. It compiles file and I see the associated .o file.
>>>>
>>>> I see that you use a macro called ms_debug to output some debug
>>>> information. However I can not get debug information logged to xcode
>>>> console in the mediastream2 library... How can I perform this?
>>>>
>>>> I want to output debug information on the console since I am not 100% sure
>>>> that my code gets executed right now.
>>>>
>>>> Thanks again for the help.
>>>>
>>>> ---
>>>>
>>>> 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-29, at 4:45 PM, Simon Morlat wrote:
>>>>
>>>>> 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 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 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, 2010/09/29
- 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 <=
- Re: [Linphone-developers] Intercapt microphone path, Andre Courchesne, 2010/09/30