android - How to not stop surface view while taking picture -
i take multi picture , i'm using these codes. makes screen freeze (after stop , start preview) in short time , make users uncomfortable. how can resolve problem. attention.
picturecallback jpegcallback = new picturecallback() { public void onpicturetaken(byte[] data, camera camera) { cpreview.mcamera.startpreview(); fileoutputstream outstream = null; /*try { outstream = new fileoutputstream(string.format( "/sdcard/camtest/%d.jpg", system.currenttimemillis())); outstream.write(data); outstream.close(); } catch (filenotfoundexception e) { e.printstacktrace(); } catch (ioexception e) { e.printstacktrace(); } { }*/ } };
if there no way, i'm thinking of recording video , convert images ( though waste more time).
some of latest phones nexus 4, samsung galaxy s5 etc support camera parameter called "zsl" (zero shutter lag).
in regular image capture sequence, camera hal stops preview , takes picture. when parameter set, preview not stopped while capturing picture. , image captured comparatively faster. since preview not stopped not see above problem , don't have call start preview in picture callback.
Comments
Post a Comment