Problems with Audio capture in IOS

aft aftnix at gmail.com
Sun Apr 6 04:32:04 PDT 2014


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".

-- 
-Cheers
-Arif


More information about the gstreamer-devel mailing list