I'm trying to
- record voice from an Android device,
- have the data encoded as some audio encoding (M4A, FLAC, Ogg)
- stream upload it to my server (chunked http post) - while the recording is ongoing.
Any ideas how to achieve these ?
I tried to do use Android's MediaRecorder
(which records audio, encodes it and saves to File) and to use Android's HttpClient
with InputStreamEntity which allows uploading data from an input stream. I used "StreamingLoop" from https://github.com/Teaonly/android-eye/blob/master/src/teaonly/droideye/StreamingLoop.java to connect the output file descriptor to the inputStream so I could use the MediaRecorder's output for the HttpClient's input.
However this failed - When I stop the recording I get:
06-27 17:58:47.259: A/libc(6759): Fatal signal 11 (SIGSEGV) at 0x00000010 (code=1), thread 6759
which crashes the application, and the file that arrives to the server is unplayable by VLC, so this is twice a failure.
Any ideas for a different method to do requirements 1..3 above or how to debug it?