tag:blogger.com,1999:blog-21523442.post7649349662171307884..comments2023-05-02T23:18:30.658+09:00Comments on maninara: Render camera preview using OpenGL ES 2.0 on Androidmaninarahttp://www.blogger.com/profile/00951073022291937034noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-21523442.post-25294942613208463492016-06-08T17:55:01.794+09:002016-06-08T17:55:01.794+09:00set your activity screenOrientation="landscap...set your activity screenOrientation="landscape"Anonymoushttps://www.blogger.com/profile/13884342718303215460noreply@blogger.comtag:blogger.com,1999:blog-21523442.post-78384645926236449652016-05-31T02:44:12.490+09:002016-05-31T02:44:12.490+09:00I have also the same issue please help me...!!!I have also the same issue please help me...!!!Anonymoushttps://www.blogger.com/profile/10010801583417664005noreply@blogger.comtag:blogger.com,1999:blog-21523442.post-15909637545578576902016-04-18T17:34:07.012+09:002016-04-18T17:34:07.012+09:00Thank you for your suggestionThank you for your suggestionmaninarahttps://www.blogger.com/profile/00951073022291937034noreply@blogger.comtag:blogger.com,1999:blog-21523442.post-91143159950860419952016-04-18T04:27:50.945+09:002016-04-18T04:27:50.945+09:00 Please also add the following to
onSurface... Please also add the following to<br />onSurfaceCreated as a safety check....otherwise most likely the application will crash.<br /><br /> if (mCamera != null) {<br /> mCamera.release();<br /> mCamera = null;<br /> }<br /><br />initTex();<br />...<br />...<br />mCamera = Camera.open();<br />...<br />...enthusiasticgeekhttps://www.blogger.com/profile/14094617394644858834noreply@blogger.comtag:blogger.com,1999:blog-21523442.post-14003755945828772762016-04-17T04:56:20.989+09:002016-04-17T04:56:20.989+09:00I would also change onResume as follows
@Override...I would also change onResume as follows<br /><br />@Override<br /> protected void onResume() {<br /> super.onResume();<br /> mView.onResume();<br /> if(!mWL.isHeld()) {<br /> mWL.acquire();<br /> }<br /> }<br /><br />apart from close() which should look like<br /><br /> public void close()<br /> {<br /> mUpdateST = false;<br /> mSTexture.release();<br /> mCamera.stopPreview();<br /> mCamera.release();<br /> mCamera = null;<br /> deleteTex();<br /> }enthusiasticgeekhttps://www.blogger.com/profile/14094617394644858834noreply@blogger.comtag:blogger.com,1999:blog-21523442.post-85198704812674172252016-04-17T04:44:12.380+09:002016-04-17T04:44:12.380+09:00There is a problem in your code. You are not relea...There is a problem in your code. You are not releasing the camera instance. When the APP resumes, you will have crash http://stackoverflow.com/questions/14191061/android-camera-api-app-crashes-at-onresume<br /><br />I suggest you add 'mCamera.release();' in 'public void close()' function before 'mCamera = null;'enthusiasticgeekhttps://www.blogger.com/profile/14094617394644858834noreply@blogger.comtag:blogger.com,1999:blog-21523442.post-702437091055453372015-07-17T08:16:36.780+09:002015-07-17T08:16:36.780+09:00Thanks for sharing this example, it is the most co...Thanks for sharing this example, it is the most complete on the internet (including Stack Overflow!). How did you know to synchronize onFrameAvailible and OnFrameDraw? This seems to be a crucial piece of the puzzle but I can't find any documentation or other examples that have this. Without that synchronize, this method doesn't seem to work.<br /><br />Thanks again, great example!Anonymoushttps://www.blogger.com/profile/03696920707242937778noreply@blogger.comtag:blogger.com,1999:blog-21523442.post-71978944951932420712015-02-12T02:45:10.773+09:002015-02-12T02:45:10.773+09:00Thanks for sharing this it saved me a lot of time!...Thanks for sharing this it saved me a lot of time!Klenhttps://www.blogger.com/profile/11632236375442212483noreply@blogger.comtag:blogger.com,1999:blog-21523442.post-44901586822957211912014-09-25T17:48:05.609+09:002014-09-25T17:48:05.609+09:00I tried to run your code on portrait mode but came...I tried to run your code on portrait mode but camera preview went wrong orientation. Can you help me?<br /><br />I'm not good at English, sorry.Anonymoushttps://www.blogger.com/profile/15606961258962058001noreply@blogger.comtag:blogger.com,1999:blog-21523442.post-11037087902326069872014-04-13T06:37:30.779+09:002014-04-13T06:37:30.779+09:00This right here is what I wanted.
Thank you. Thank...This right here is what I wanted.<br />Thank you. Thanks a lot!!!!!Anonymoushttps://www.blogger.com/profile/11100694977358718404noreply@blogger.comtag:blogger.com,1999:blog-21523442.post-88662810239691339642013-08-29T16:45:26.566+09:002013-08-29T16:45:26.566+09:00thanks for sharing !!
I noticed some small typo - ...thanks for sharing !!<br />I noticed some small typo - spelling of "uses-feature".<br /><br />Linda: after few minor changes it builds.<br />Notice that you can't just paste it into a single file and expect it to compile...<br />You need to have some minimal experience with building android projects.Yoelhttps://www.blogger.com/profile/01621186481920967576noreply@blogger.comtag:blogger.com,1999:blog-21523442.post-3890433462876576082013-05-20T16:11:57.295+09:002013-05-20T16:11:57.295+09:00Cannot compile.Cannot compile.Anonymoushttps://www.blogger.com/profile/12387585136843367302noreply@blogger.com