Audio streaming from Android device microphone

JPM jpmelian at gmail.com
Mon Feb 10 22:33:50 PST 2014


Problem solved :

* Server (Android) : *openslessrc* ! audioconvert ! audioresample !
audio/x-raw,format=S16LE,channels=1,rate=48000 ! udpsink host=192.168.1.150
port=5003
* Client (Windows) : udpsrc port=5003 !
audio/x-raw,format=S16LE,channels=1,rate=48000 ! volume volume=0.8 !
autoaudiosink sync=false
* Add in manifest.xml : <uses-permission
android:name="android.permission.RECORD_AUDIO"/>
* Delay is 200 ms or so.

Regards.


2014-02-10 13:42 GMT+01:00 JPM <jpmelian at gmail.com>:

> The log in adb logcat is :
>
> 02-10 13:32:22.495: I/ActivityManager(580): START u0
> {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
> flg=0x10200000 cmp=com.gst_sdk_tutorials.tutorial_2/.Tutorial2
> bnds=[600,1381][792,1573]} from pid 851
> 02-10 13:32:22.515: D/audio_hw_primary(181): select_devices:
> out_snd_device(2: speaker) in_snd_device(0: )
> 02-10 13:32:22.515: D/ACDB-LOADER(181): ACDB -> send_afe_cal
> 02-10 13:32:22.575: D/dalvikvm(580): GC_FOR_ALLOC freed 2250K, 23% free
> 15394K/19928K, paused 55ms, total 56ms
> 02-10 13:32:22.595: D/dalvikvm(4502): Late-enabling CheckJNI
> 02-10 13:32:22.605: I/ActivityManager(580): Start proc
> com.gst_sdk_tutorials.tutorial_2 for activity
> com.gst_sdk_tutorials.tutorial_2/.Tutorial2: pid=4502 uid=10058
> gids={50058, 3003}
> 02-10 13:32:22.625: D/dalvikvm(179): GC_EXPLICIT freed 42K, 1% free
> 9046K/9124K, paused 3ms+4ms, total 29ms
> 02-10 13:32:22.655: D/dalvikvm(179): GC_EXPLICIT freed <1K, 1% free
> 9046K/9124K, paused 2ms+3ms, total 25ms
> 02-10 13:32:22.675: D/dalvikvm(179): GC_EXPLICIT freed <1K, 1% free
> 9046K/9124K, paused 1ms+5ms, total 21ms
> 02-10 13:32:22.695: D/dalvikvm(4502): Trying to load lib
> /data/app-lib/com.gst_sdk_tutorials.tutorial_2-2/libgstreamer_android.so
> 0x41ef0b60
> 02-10 13:32:22.705: D/dalvikvm(4502): Added shared lib
> /data/app-lib/com.gst_sdk_tutorials.tutorial_2-2/libgstreamer_android.so
> 0x41ef0b60
> 02-10 13:32:22.705: D/dalvikvm(4502): Trying to load lib
> /data/app-lib/com.gst_sdk_tutorials.tutorial_2-2/libtutorial-2.so 0x41ef0b60
> 02-10 13:32:22.705: D/dalvikvm(4502): Added shared lib
> /data/app-lib/com.gst_sdk_tutorials.tutorial_2-2/libtutorial-2.so 0x41ef0b60
> 02-10 13:32:22.785: I/GStreamer(4502): GStreamer initialization complete
> 02-10 13:32:22.865: I/GStreamer(4502): Activity created. There is no saved
> state, playing: false
> 02-10 13:32:22.875: I/GStreamer(4502): Gst initialized. Restoring state,
> playing:false
> 02-10 13:32:22.895: I/Adreno-EGL(4502): <qeglDrvAPI_eglInitialize:320>:
> EGL 1.4 QUALCOMM Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate:
> 11/06/13
> 02-10 13:32:22.925: D/OpenGLRenderer(4502): Enabling debug mode 0
> 02-10 13:32:22.985: I/ActivityManager(580): Displayed
> com.gst_sdk_tutorials.tutorial_2/.Tutorial2: +398ms
> 02-10 13:32:31.664: D/audio_hw_primary(181): select_devices:
> out_snd_device(2: speaker) in_snd_device(0: )
> 02-10 13:32:31.664: D/ACDB-LOADER(181): ACDB -> send_afe_cal
>
> It seems that there are not any audio input devices :
> "D/audio_hw_primary(181): select_devices: out_snd_device(2: speaker)
> in_snd_device(0: ) " .
>
> I am totally lost.
>
> Regards.
>
>
> 2014-02-09 17:53 GMT+01:00 JPM <jpmelian at gmail.com>:
>
> Hi,
>>
>> I have upgraded SDK tutorial-2 to 1.2.2 version and it is OK with the
>> pipeline :
>>
>> data->pipeline = gst_parse_launch("*audiotestsrc* !
>> audio/x-raw,format=S16LE,channels=1,rate=48000 ! udpsink host=192.168.1.140
>> port=5003", &error);
>>
>> When I check this one : data->pipeline = gst_parse_launch("*autoaudiosrc*! audio/x-raw,format=S16LE,channels=1,rate=48000 ! udpsink
>> host=192.168.1.140 port=5003", &error);
>>
>> there are not errors indications on the android device screen (log is
>> "State changed to PAUSED/PLAYING") but I can not hear any sound in the
>> client (PC Windows 7).
>>
>> Is it possible android device microphone is deactivated ?
>>
>> Regards.
>>
>>
>> 2014-02-09 15:52 GMT+01:00 Sebastian Dröge <sebastian at centricular.com>:
>>
>>> On So, 2014-02-09 at 14:19 +0100, Sebastian Dröge wrote:
>>> > On So, 2014-02-09 at 14:04 +0100, JPM wrote:
>>> > > Do you know if there are any tutorial about how to upgrade to
>>> GStreamer
>>> > > 1.2.x ?.
>>> >
>>> > Check the differences between the tutorials from gstreamer.com and
>>> these
>>> > here: http://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/
>>> >
>>> > The differences are not really large. You can get the latest version
>>> for
>>> > Android here: http://gstreamer.freedesktop.org/data/pkg/android/1.2.3/
>>> >
>>> > (The 1.2.3 release is not yet announced, will be in a few minutes after
>>> > I finished uploading the other parts)
>>>
>>> And they're not final, I'll upload final 1.2.3 tarballs later this
>>> evening.
>>>
>>> http://gstreamer.freedesktop.org/data/pkg/android/1.2.2/ contains the
>>> previous stable release and should work just fine for you too.
>>>
>>> --
>>> Sebastian Dröge, Centricular Ltd - http://www.centricular.com
>>> Expertise, Straight from the Source
>>>
>>> _______________________________________________
>>> gstreamer-android mailing list
>>> gstreamer-android at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-android
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20140211/9fe83286/attachment.html>


More information about the gstreamer-android mailing list