Problems with Audio capture in IOS

Sebastian Dröge sebastian at centricular.com
Sun Apr 6 05:43:41 PDT 2014


On So, 2014-04-06 at 17:32 +0600, aft wrote:
> Hi,
> 
> I'm trying to capture voice from an IOS device and send it over
> network using rtpbin. Now When i try to do the same between two
> desktops (linux/Windows) it works fine. But in case of iOS device the
> voice is distorted to the point that nothing can be recognized...
> 
> The code i'm using to capture the voice is :
> 
> pipeline = gst_pipeline_new (NULL);
>    g_assert(pipeline);
> 
>    audiosrc = gst_element_factory_make ("osxaudiosrc", NULL); //ios
> audio source and mac audio src same?
>    g_assert (audiosrc);
>    audioconv = gst_element_factory_make ("audioconvert", NULL);
>    g_assert (audioconv);
>    audiores = gst_element_factory_make ("audioresample", NULL);
>    g_assert (audiores);
>    /* the encoding and payloading */
>    audioenc = gst_element_factory_make ("alawenc", NULL);
>    g_assert (audioenc);
>    audiopay = gst_element_factory_make ("rtppcmapay", NULL);
>    g_assert (audiopay);
>    /* add capture and payloading to the pipeline and link */
>    gst_bin_add_many (GST_BIN (pipeline), audiosrc, audioconv, audiores,
>                      audioenc, audiopay, NULL);
> 
>    if (!gst_element_link_many (audiosrc, audioconv, audiores, audioenc,
>                                audiopay, NULL)) {
>        g_error ("Failed to link audiosrc, audioconv, audioresample, "
>                 "audio encoder and audio payloader");
>    }
> 
> I'm feeling i'm doing something wrong when choosing the appropriate
> element used as "src".

Does it work better if you force a different sample rate after the
source with a capsfilter (e.g. try 16000, 32000, 44100 and 48000)?

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140406/fe07b78c/attachment-0001.sig>


More information about the gstreamer-devel mailing list