Use gstreamer to record audio on android

Nicolas Dufresne nicolas at ndufresne.ca
Thu Aug 8 11:34:57 UTC 2019


Le jeudi 08 août 2019 à 01:00 -0500, tham a écrit :
> Trying to record audio on android with gstreamer(enable permission of audio
> record already), I prefer gstreamer but not the java api because there are
> more functions need to be added in the future, like convert the audio to
> specific format(S16LE, channels=1, rate=16000 etc), encode as wav, separate
> video/audio and so on
> 
> The pipeline I am using are
> 
>     openslessrc ! audioconvert ! wavenc ! fakesink
> 
> and
> 
>     openslessrc ! audioconvert ! wavenc ! openslessink location=\"%1\"
> 
> But both of them give me error message
> 
> *E IAudioFlinger: createRecord returned error -22
> E AudioRecord: AudioFlinger could not create record track, status: -22
> E libOpenSLES: android_audioRecorder_realize(0xcea58a00) error creating
> AudioRecord object; status -22
> W libOpenSLES: Leaving Object::Realize (SL_RESULT_CONTENT_UNSUPPORTED)*
> 
> Part of my  .pro <https://pastebin.com/k7ZC5f1D>   file

Out of curiosity, did you request the rights to record in your app
manifest ?

> 
> 
> Initialization codes of gstreamer, in main.cpp
> <https://pastebin.com/DcRQ5sSh>  
> Thanks
> 
> 
> 
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list