[android-developers] Re: Recording WAV data from the /dev/msm_pcm_in device
Just for those interested: I was able to circumvent my problem by using the AudioRecord class ... On 4 sep, 15:51, Maarten Wijnants maarten.wijna...@gmail.com wrote: Hi all, When browsing the Android source code, I discovered the system/extras/ sound/playwav.c file which appears to contain code to directly access the Android audio capturing hardware. I converted the WAV recording code to an Android native library (.so file) which I linked to a Java implementation using JNI. When I run the code, I get a permission error. In particular, attempting to open the /dev/msm_pcm_in device returns a negative value. The open statement is as follows: int afd = open(/dev/msm_pcm_int, O_RDWR); Could this be due to a lack of root priviliges? If so, is there a possible solution? Kind regards, MaartenWijnants --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Recording WAV data from the /dev/msm_pcm_in device
Hi all, When browsing the Android source code, I discovered the system/extras/ sound/playwav.c file which appears to contain code to directly access the Android audio capturing hardware. I converted the WAV recording code to an Android native library (.so file) which I linked to a Java implementation using JNI. When I run the code, I get a permission error. In particular, attempting to open the /dev/msm_pcm_in device returns a negative value. The open statement is as follows: int afd = open(/dev/msm_pcm_int, O_RDWR); Could this be due to a lack of root priviliges? If so, is there a possible solution? Kind regards, Maarten Wijnants --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MediaRecorder setVideoFrameRate
Hi Balwinder, On 26 aug, 22:49, Balwinder Kaur (T-Mobile USA) balwinder.k...@t- mobile.com wrote: For what its worth there is a note on the MediaRecordersetVideoFrameRatesource code * NOTE: On some devices that have auto-frame rate, this sets the * maximum frame rate, not a constant frame rate. Actual frame rate * will vary according to lighting conditions. Yes, I also saw this note on the documentation page of the MediaRecorder class. However, the note states that the setVideoFrameRate method on some devices determines the _maximum_ instead of the actual frame rate. So if my HTC Magic device would fall under this category, the frame rate of the captured video should _at most_ be 5 FPS and might possible be less. The captured video however has a frame rate that clearly _exceeds_ 5 FPS. So I do not believe the note applies to my particular situation. That being said, what is the frame rate that you found on your video clip ? [Gallery-Select your Video Long Press-Details] Android Gallery specifies a frame rate of 19 FPS. Balwinder Kaur Thanks for your reply! Greetz, Maarten Wijnants --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] MediaRecorder setVideoFrameRate
Hello Android developers, I am experimenting with video capture/encoding using the MediaRecorder class. One thing I noticed during testing is that it seems like the setVideoFrameRate method of the MediaRecorder class has no effect. In other words, the MediaRecorder does not seem to adhere to the frame rate I set for it. Using a target frame rate of 5 FPS results in a video fragment that is equally fluid/smooth as one created at 15 FPS. I am using a HTC Magic device. My MediaRecorder code is as follows (excluding exception handling): MediaRecorder mMediaRecorder = new MediaRecorder(); mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mMediaRecorder.setVideoSize(176, 144); // QCIF mMediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263); mMediaRecorder.setVideoFrameRate(5); mMediaRecorder.setOutputFile(/sdcard/maarten.3gpp); mMediaRecorder.setPreviewDisplay(previewSurface); mMediaRecorder.prepare(); mMediaRecorder.start(); ... mMediaRecorder.stop(); mMediaRecorder.release(); Pretty straightforward code. Has anyone experienced something similar? Has any of you been able to successfully enforce an actual frame rate on the MediaRecorder? Best regards, Maarten Wijnants --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---