Open GoogleCodeExporter opened 9 years ago
Original comment by ala...@google.com
on 14 Jan 2014 at 12:15
Has this issue been fixed yet? I saw a possible solution from here:
http://stackoverflow.com/questions/20671932/mediarecorder-start-failed-19/211299
91#21129991 which didn't work for me as well. I, like the user who posted the
original issue, have tried everything to try and get this to work to no avail.
Or netcy, have you found a possible work around?
Thanks.
Original comment by lance.ok...@gmail.com
on 21 Jan 2014 at 3:30
it's still an issue for me, so I don't see it fixed myself. (sorry for the
mee-too comment :)
Original comment by maroy.akos@gmail.com
on 21 Jan 2014 at 5:51
Unfortunately, i have found no fix either. I have sent my Glass for replacement
and i hoped that the solution that the user found in stackoverflow was working.
If any user find a fix, please post it asap.
Original comment by netcy...@gmail.com
on 21 Jan 2014 at 5:53
[deleted comment]
I had this problem when triggering a video capturing in my app while the video
preview was live. After much wailing and gnashing of teeth, I figured out that
to start video capture on a previewing camera, I had to first completely stop
the video preview. This was accomplished with the following code, which I put
of the top of my prepareVideoRecorder() implementation, prior to doing anything
with a MediaRecorder:
try {
mCamera.setPreviewDisplay(null);
} catch (java.io.IOException ioe) {
Log.d(TAG, "IOException nullifying preview display: " + ioe.getMessage());
}
mCamera.stopPreview();
mCamera.unlock();
Subsequently, I am able to capture video. I am on XE12.
Original comment by josephba...@gmail.com
on 21 Jan 2014 at 8:45
can you post a more comprehensive / more complete code sample?
Original comment by maroy.akos@gmail.com
on 22 Jan 2014 at 12:31
#6 -- this answer worked perfectly for me. I could not thank you enough for
your help...if I could upvote you I would. Instead, have a Gold Star (*) :) Now
that I see that...I am hitting myself in the head.
#7 -- you can use http://developer.android.com/guide/topics/media/camera.html
to help you.
Original comment by lance.ok...@gmail.com
on 22 Jan 2014 at 12:39
Comment #6 worked for me too! Thank you!
This is still a bug since the same code (without nullifying the previewing
camera) works fine on other Android devices. Also, the official documentation
does not mention this. At least we have a workaround.
Original comment by netcy...@gmail.com
on 22 Jan 2014 at 8:13
trying to merge #6 with the original code sample above: I would but the code
from #6 just above the mCamera.unlock() code in the original code sample (on
top of this bug ticket)?
Original comment by maroy.akos@gmail.com
on 22 Jan 2014 at 8:28
#9: I agree with you completely that it is a Glass Issue. I too was using the
same code for a tablet version, and had to remove that nullifying part. Very
interesting, annoying bug that I'm glad with everyone's help the issue was
solved.
#10: You put the code that #6 gave before you do anything with MediaRecorder,
as stated.
Original comment by lance.ok...@gmail.com
on 25 Jan 2014 at 7:51
#6 - your solution works! Thanks! (Sony Ericsson Xperia Pro, android 2.3.4)
Original comment by kolobcha...@gmail.com
on 9 Feb 2014 at 5:15
#6 worked for me on XE12 but now on XE16, Glass does a total reboot upon
stopPreview...didn't think an app could take down the whole OS...
Original comment by jared.ma...@gmail.com
on 21 Apr 2014 at 4:13
I'm also getting crashes with MediaRecorder since XE16... :(
Original comment by aregnie...@gmail.com
on 21 Apr 2014 at 7:03
And I'm getting them on taking pictures
Original comment by eug...@wearableintelligence.com
on 21 Apr 2014 at 7:04
I was seeing the hard crash on XE16 using this fix as well. I made some tweaks
and everything went back to working:
try {
mCamera.stopPreview();
mCamera.setPreviewDisplay(null);
} catch (java.io.IOException ioe) {
Log.d(TAG, "IOException nullifying preview display: " + ioe.getMessage());
}
mCamera.unlock();
Stopping the preview then nulling things out seemed to do the trick for me.
Original comment by andrew.r...@gmail.com
on 24 Apr 2014 at 10:36
#16 works for XE16 - thank you!!!
Original comment by jared.ma...@gmail.com
on 25 Apr 2014 at 2:02
Hi,
For me MediaRecorder fails with an IllegalStateException - start called in an
invalid state: 1. I'm pretty sure I'm calling MediaRecorder.start() after
MediaRecorder.prepare(). I have tried to call start() after a lag of 5 seconds
in case prepare()'s taking time, but it didn't help. Any ideas where I might be
going wrong/how to fix this?
Thanks a lot!
Original comment by sreyasi...@gmail.com
on 23 Jun 2014 at 3:13
Also wanted to mention: I'm on XE18.11 and the fix stated here doesn't solve
the issue (naturally, because this seems to be a different problem).
Original comment by sreyasi...@gmail.com
on 23 Jun 2014 at 3:20
For info i'm on XE18.11, and the #16 work perfectly for me. THKSSSSS
Original comment by stephane...@gmail.com
on 24 Jun 2014 at 4:15
The issue being discussed here and also the fix #16 is for the error:
"MediaRecorder start failed: -19", but the error I am getting is "start called
in an invalid state: 1". Can someone please explain possible reasons as to why
this is happening?
Original comment by sreyasi...@gmail.com
on 25 Jun 2014 at 11:43
Hey all!
My issue is fixed. Here's a brief summary:
Initially I was calling mMediaRecorder.start() in my onClick() method after a
call to the prepareVideoRecorder() method just as described in the developer
guide
(http://developer.android.com/guide/topics/media/camera.html#capture-video).
This resulted in the IllegalStateException error. But when I called
mMediaRecorder.start()just after mMediaRecorder.prepare() like #1 did, along
with fix #16, it worked!
I wish someone could explain why this happened. Is it possible that media
recorder quickly slid into idle state in between calls? It's strange!
Thanks!
Original comment by sreyasi...@gmail.com
on 27 Jun 2014 at 1:42
Does anyone could share a code that actually do work for video recording? I
didn't find any that is not bugged.
Thanks
Original comment by mathi...@gmail.com
on 13 Jul 2014 at 8:26
I also met this problem , this is all my code :
mCamera = Camera.open();
try {
mCamera.stopPreview();
mCamera.setPreviewDisplay(null);
} catch (java.io.IOException ioe) {
MelonLogger.e(ioe);
}
mCamera.unlock();
mrec = new MediaRecorder(); // Works well
mrec.setCamera(mCamera);
mrec.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
mrec.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
// need a solid file uploading task
mrec.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_480P));
String dir = MelonPathManager.getInstance().getUserSubDirByIdAndType(MelonMyInfoManager.getInstance()._getInt(MelonMyInfoManager.PREFIX_USER_ID, MelonConst.PREF.DEFAULT_INT), MelonConst.FileType.VIDEO);
String path = dir + System.currentTimeMillis() + ".mp4";
MelonFileManager.checkPath(dir);
filePath = path;
mrec.setOutputFile(path);
mrec.setPreviewDisplay(surfaceHolder.getSurface());
mrec.prepare();
mrec.start();
Seems not working, I am following the previous provided solution , now it gives
me a error about : IMediaDeathNotifier﹕ media server died
Original comment by zh...@garena.com
on 22 Jul 2014 at 2:49
FYI: I had some code that was working with XE18.3, but it is not working
anymore with XE19.1 (I have the same error as #24 ):
https://code.google.com/p/google-glass-api/issues/detail?id=578
Original comment by marco.bu...@gmail.com
on 23 Jul 2014 at 3:35
Can't record with 19.1 either.
Original comment by hannings...@gmail.com
on 29 Jul 2014 at 4:36
I'm having the same problem on 19.1. I cannot record a video, even when usint
the trick of setting up the previewDisplay to null.
Original comment by extros...@gmail.com
on 17 Aug 2014 at 10:55
[deleted comment]
Is there a solution for XE22?
Original comment by chenfang...@gmail.com
on 13 Jan 2015 at 2:15
#6 I love you. Worked for me
Original comment by oscarji...@gmail.com
on 10 Mar 2015 at 8:27
Original issue reported on code.google.com by
netcy...@gmail.com
on 12 Jan 2014 at 8:52