Android :: Media Recorder Prepare Causes Segfault
Mar 28, 2010
I have a situation where my MediaRecorder instance causes a segfault. I'm working with a HTC Hero, Android 1.5+APIs. In the log i see (after the segfault announcement) a register dump and then a numbered list #00 libmedia_jni.so to #18 linker, then a stack trace. My Eclipse won't let me copy the log buffer, but I've done three screen captures that sum it up. If you have time to examine, send me a direct e-mail.<pre><code> if (mRecorder == null) mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); mRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);// mRecorder.setVideoSize(640, 480); // mRecorder.setVideoFrameRate(20); mRecorder.setPreviewDisplay(surfaceHolder.getSurface()); mRecorder.prepare();mRecorder.start(); </code></pre> I've tried other variants, including H263 and 3gp. What else can I do to debug this? Everythin g seems fine up to prepare(). I tried adding the onErrorListener, but it seems to interfere with the MediaPlayer's onErrorListener. I'm using a 4-second beep-count to prepare for auto triggering of the camera, and when I enable the error handler for the MR everything in my handler state machines goes awry.
View 4 Replies
Apr 10, 2009
Would be more useful than AMR / MP4. Also would be compatible with the very handy source code for RingDroid.
View 2 Replies
View Related
Aug 5, 2009
I am building a camera app, where photos and videos are continuously being captured and saved to the SD card. The videos are short (few minutes), and their length are preset with setMaxDuration(). When Media Recorder.MEDIA_RECORDER_INFO_MAX_DURATION_REACHED is reached, the video is saved, and a new sequence is initialized with something like: The whole process works fine, while the main activity is in the foreground. But, when I go to another activity (e.g. settings), the video recording works in the background only until max duration is reached. The file is saved, but a new sequence can not be started because prepare() fails. setPreviewDisplay() needs to be there, but it doesn't like not having a proper surface to attach to. I tried to use a dummy Surface, a dummy SurfaceHolder, or reuse the Camera with mMediaRecorder.set Camera(), but nothing works. Is there a way to initialize Media Recorder in the background?
View 2 Replies
View Related
Apr 10, 2009
So with Cupcake looming, does anyone know what kinda Frames per second the video recorder will have?
View 2 Replies
View Related
Jun 4, 2010
I'm new in Android development and I have the next question/problem. I'm playing around with the Media Recorder class to record just audio from the microphone. I'm following the steps indicated in the official ://developer.android.com/reference/android/media/MediaRecorder.html
So I have a method that initializes and configure the Media Recorder object in order to start recording. Here you have the code:
//initializes audio recorder
//configure the input sources
mrecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
//set the output format
mrecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
//set the audio encoding
mrecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT)
View 1 Replies
View Related
Oct 19, 2008
can anyone tell me if there is going to be a way to download a video recorder to the tmobile g1, since there isn't one on the phone as is?
View 7 Replies
View Related
Jun 9, 2010
I'm new in Android development and I have the next question/problem. I'm playing around with the Media Recorder class to record just audio from the microphone. I'm following the steps indicated in the official site:
http://developer.android.com/reference/android/media/MediaRecorder.html
So I have a method that initializes and configure the MediaRecorder object in order to start recording. Here you have the code:
this.mr = new MediaRecorder();
this.mr.setAudioSource(MediaRecorder.AudioSource.MIC);
this.mr.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
this.mr.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
this.mr.setOutputFile(this.path + this.fileName);
try { this.mr.prepare();
} catch (IllegalStateException e) { Log.d("Syso", e.toString());
e.printStackTrace();
} catch (IOException e) { Log.d("Syso", e.toString());
e.printStackTrace();
}
When I execute this code in the simulator, thanks to logcat, I can see that the method setAudioSource(MediaRecorder.AudioSource.MIC) gives the next error (with the tag audio_ipunt) when it is called:
ERROR/audio_input(34): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value
ERROR/audio_input(34): VerifyAndSetParameter failed
And then when the method prepare() is called, I get the another error again:
ERROR/PVOMXEncNode(34): PVMFOMXEncNode-Audio_AMRNB::DoPrepare(): Got Component OMX.PV.amrencnb handle
If I start to record by calling the method start(). I get lots of messages saying:
AudioFlinger(34):RecordThread: buffer overflow
Then after stop and release, I can see that a file has been created, but it doesn't seem that it been well recorded. Anyway, if I try this in a real device I can record with no problems, but I CAN'T play what I just recorded. I guess that the key is in these errors that I've mentioned before.
View 5 Replies
View Related
Aug 3, 2010
What would y'all recommend? I see tons of them on AppBrain, but it doesn't seem that any of them do both things, and the few that do have ridiculous time limits o the records like 2-4 minutes.
View 7 Replies
View Related
Nov 3, 2009
we just launched a new game (Super Game Pack) in the market, and got a segfault on a 1.6 emulator From what I can decipher, looks to be coming from a webview component Is there any way to track it further, or figure out exactly what's causing it? Its relatively rare, so its a bit tough to reproduce, but if I have a way to trace it, at least we'll be prepared when it does happen 11-03 19:40:48.630: INFO/DEBUG(539): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 11-03 19:40:48.640: INFO/DEBUG(539): Build fingerprint: 'generic/sdk/generic/:1.6/ DRC76/13852:eng/test-keys' 11-03 19:40:48.640: INFO/DEBUG(539): pid: 820, tid: 832 >>> com.chickenbrickstudios.sgp <<< 11-03 19:40:48.640: INFO/DEBUG(539):
View 4 Replies
View Related
Nov 6, 2010
We are a new company that is focused on Android development. We have completed and uploaded our Fusion Recorder application into the Android Market. We've worked hard to make sure that it is a reliable product and that it contains a solid set of features for version one (v.1). We are currently working on the designs for our our Website, facebook, and Twitter pages since posting our application. We look forward to adding features as we move forward.
We are interested in feedback from users and want to make sure our product(s) are as defect free as possible. So, if you do run into an issue, big or small, please shoot us an email at our support email.
Here are a some screen shots that show off the Fusion Recorder User Interface.
Also, if you don't see a feature you like please email that to us so we can add it to our Feature Request database. It may not be the next week we add it (we take testing seriously, which takes time). But we definitely will review such requests, which we understand are valuable.
Also, we were able to test this on a few Android Smartphones, but we are looking forward to seeing if there are any issues on phones we have not tested on. So, if you run into an issue please include, at the least, the Android Smartphone manufacturer, product name, Android OS version number (e.g. Android 2.2).
View 4 Replies
View Related
Sep 27, 2010
I'm trying to initialize OpenFeint in my game like this:
CODE:...........
Result: 1. OpenFeint initialization sometimes take so song(network actions?). It blocks the main thread. 2. My application remains in onCreate() for too long. 3. My Dev Phone One display ANR(application not responding) dialog prompting me to choose between 'Force Close' and 'Wait' 4. Soon after that, OpenFeint has done its things and my game shows up behind the dialog. 5. Now pressing 'Wait' will dismiss the ANR dialog and I can continue my game properly.
But obviously we don't want ANR dialog. So now I put it in a Thread like this:
CODE:...............
----------------------------------------------------------------------------- Result: Problem solved. Everything seems to run fine now.
I put Looper.prepare() there because my game will crash if I don't. The log message told me to put it there. I put Looper.loop(); there because OpenFeint will not initialize at all if I don't. I've read the doc about Looper but honestly I don't understand what the doc says.
Question 1. The doc also tell me this: ------------------------------------------------- public static final void loop ()
Since: API Level 1 Run the message queue in this thread. Be sure to call quit() to end the loop. -------------------------------------------------- Can anyone explain when & where should I call quit()?
Question 2 What will happen if I don't call Looper.quit()?
Question 3 Let me ask this straight. Am I taking the correct approach? Is there some kind of loop running alongside my game all the time if I do this?
View 5 Replies
View Related
Aug 30, 2010
Playing around with the UI and SQLLite for a while and it looks pretty good to me . We have a requirement that for the App that all the questions would be coming from the server through REST / Web service which would be displayed on the App..
say for e.g if there are 4 questions
1) Enter your Name -- Text Box
2) Did you sleep well last night -- YES / NO
3) How many hours did you sleep - Text Box
4) How did you hear about us -- Drop down
So the requirement is that the Questions would be displayed on the App after doing a SYNC with the server during the SYNC with the server the Questions would be downloaded from the SERVER through REST / Web service..if the phone is not connected then pull the questions from the Database...
These questions are simple questions and they change quite often and we have a similar app which is there for iphone which does this ....
View 1 Replies
View Related
Sep 10, 2009
I'm trying to build a simple video recorder for an Android device and I've had limited success and mixed results. It worked once, but now, without changing anything, I'm getting a "Camera is not available" error followed by "prepare failed -2147483648" error.
View 1 Replies
View Related
Jul 3, 2009
I am trying to develop an application with Android 1.5(cupcake_r1) for a week but always get an error reported in prepare of MediaRecorder. Can anybody help me to figure out the problem I got in the code below:
PS. In order to figure out the problem, I suppressed the audio recording, and the SDcard is installed in the phone.code...
View 3 Replies
View Related
May 18, 2010
I am preparing a contacts application and would like to support the VCard export. Can anyone tell me if there is any API I can use to create a VCard.
View 4 Replies
View Related
Sep 21, 2009
In the API Demo, there is example on using Simple Cursor Adapter. However, it is using the MediaS tore cursor. Is there any method so that I can use other external cursor prepare by SQL database. I don't know what should I input to the from String.
View 2 Replies
View Related
May 22, 2010
Since no one knows when the update is going to come to the Droid. Could be tomorrow or in three months. Its all up in the air. It could happen anytime. Anyways, What do you need to do?
Have a battery near full all the time?
Backup your Aps?
Backup contacts?
Since I am assuming you can get the update without warning, I just wanted to know what steps to take, so I can have no problems with an OTA update.
View 11 Replies
View Related
Jan 21, 2010
I am trying to test my application with location information.
You know the Emulator Control has an ability to load from KML file. (Eclipse -> DDMS -> Emulator Control -> Location Controls -> KML -> Load KML...)
I've prepared KML file using Google earth application with its "Add path". Then saved it by .kml extension and load it on the Eclipse. Eclipse didn't load this KML file.
How to prepare KML file for Android Emulator Control?
View 1 Replies
View Related
Aug 6, 2009
What is the preferred way of reusing a MediaPlayer when using resources? My try looks a bit ... too complicated... so maybe I should be happy to see that it didn't work. (I run the Android 1.5 SDK and emulator.)
According to this thread my problem may be a permission problem. http://groups.google.se/group/android-developers/browse_thread/thread...
I get the same error. But in my case it only occurs when I use FileDescriptor!?! The use case differs however, because I use a resource stored in the bundle. I have s0.mp3 safely stored in the project /res/raw and it successfully plays when I use SoundPool or MediaPlayer.create. And the log print tells me I referenced the correct file and stay safely in my package.
I'm sure my way of getting the fd out from a package resource is the problem, I didn't find any other way... But why didn't setDataSource throw the exception instead of a printout? And why on earth is the same resource happily played one way but not the other? Seems like a design flaw rather than a security raise. Should I look in the MediaPlayer.create code to see how they get around the problem or can you help me understand how it works?
This is a test code snippet: (from onCreate of a simple Activity)
CODE:...........
And the error:
CODE;..............
View 2 Replies
View Related
Sep 8, 2009
I am trying to write a sample program to record the video (say camcorder application). When i run my program using the emulator (I have android-sdk- windows-1.5_r3) I see java.io.IOException: prepare failed. error in logcat output.
Further I can see that I have came across this error when i call MediaRecorder.prepare() from CamcorderActivity.surfaceCreated() But I am surprised to see that activity got launched and I am seeing the camera preview! Again the preview is seen only in half of the screen! Its weird!!!
Further when i do recorder.start() to record the video I get java.lang.IllegalStateException. Yes this is obvious since the prepare () has failed. But the question is why prepare() has failed ?
Here is my code ... package com.example;
CODE:................
View 2 Replies
View Related
Oct 6, 2010
What does the following exception mean? And how can I fix it?
This is the code:Toast toast = Toast.makeText(mContext, 'Somthing', Toast.LENGTH_SHORT);
This is the exception:
D/VVM ( 684): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
D/VVM ( 684): at android.os.Handler.(Handler.java:121)
D/VVM ( 684): at android.widget.Toast.(Toast.java:68)
D/VVM ( 684): at android.widget.Toast.makeText(Toast.java:231)
View 1 Replies
View Related
Sep 16, 2010
Looker, lookie, new Aria ROM to allow OTA firmware updates, plus two other bug fixes. I think they are gearing up for Android 2.2, HTC Mobile Phone Support - HTC Aria? (AT&T) - Downloads
View 1 Replies
View Related
May 8, 2010
i have no idea why it is turning off i got the phone yesterday. would it be because it is trying to prepare my sd card?it started when i put the card in.
View 4 Replies
View Related
Sep 21, 2010
I've been having an issue with my headphone jack and finally called into Tmobile tech support.
They are going to be sending a replacement phone, so I would like some help on how I can get my current phone ready to be sent back to them.
Currently it is rooted stock 2.1 and has ryanza lag fix applied.
Most of my files are on the SD.
I know I need to unroot, how would I proceed to do that and would unrooting get rid of the lag fix?
View 16 Replies
View Related
Sep 30, 2010
I am getting reports of 'Can't create handler inside thread that has not called Looper.prepare()' once I added ScoreNinja to my Android app, and released it to the market. It seems that it isn't happening all the time as the ScoreNinja highscore has lots of entries from users. I have looked on the web for help but there are no clear directions on what to do. I have used the ScoreNinja code exactly as shown on the scoreninja website. BTW If anyone is having problems with ScoreNinja only displaying one score, check to see if the launchmode is not set to 'singleinstance' in your manifest. This fixed it for me!
View 6 Replies
View Related
Nov 1, 2010
Attempted to update to 2.1 , everything appeared to go ok , but after restarting i saw that firmware was still in 1.6 .
The only effect was that my intended apps etc. were gone.
According to SE PC Companion the phone is up to date.
According to the phone's software update a new version of Android is available ..
Using the SE PC Companion to repair ( ca'nt install since aIready have the latest sw according to SE-PCC )
results in installation error when reaching close to the end of the prepare phase.
View 4 Replies
View Related
May 18, 2010
I'm considering the possibility of selling my Behold 2 phone and getting something a little better supported (anything HTC, for example). I know how to flash the ROM back to the Stock, but, how do I re-format/prepare my MicroSD card in the phone back to it's factory settings?
And is there anything else that anyone thinks I will need to do in preparation for selling it?
View 1 Replies
View Related
Aug 22, 2010
I recorded some stuff with me on the drums on the native Voice Recorder App. 1 I can't find the file on my SD card, and 2 If I email it to myself it is in the format .amr which i don't recognize.3. Is there a better voice recorder? Better quality, different format files, editing, or easier to export?
View 3 Replies
View Related
Apr 10, 2010
I'm having a hard time finding an app that functions as a Voice Recorder, but it also attempts to convert your recording into text. This would be very help imfho.
View 1 Replies
View Related
Sep 19, 2010
I am looking for an automatic conversation recorder application. What I need the application to do is to constantly 'listen' on the microphone, and as soon somebody around starts speaking (the noise level increases to high) it automatically starts to record the conversation. Once there are no more sounds coming in for e.g. a few minutes, it stops recording.
View 13 Replies
View Related