android - Continuous Image capture using Camera2 api -


how capture continuous images using camera 2 api's. wrote simple application , thread in capture continuous images not working

it nice if provided code see what's wrong.

in general terms, you'll want create cameradevice object , call cameradevice.createcapturesession(list <surface>, cameracapturesession.statecallback, handler) method specifying surfaces might output (maybe 1). once cameracapturesession.statecallback (that specified in createcapturesession method) calls onconfigured(cameracapturesession) method, call cameradevice.createcapturerequest(int) method, returns capturerequest.builder object. this, can use capturerequest.builder.addtarget(surface) method specify of pre-specified surface(s) want output (probably of them). once you're done adding targets, call capturerequest.builder.build() method, returns capturerequest object. can use cameracapturesession object provided onconfigured(cameracapturesession) method pass capturerequest object cameracapturesession.setrepeatingrequest(capturerequest, cameracapturesession.capturecallback, handler) method. start continuous output surfaces specified.

seriously, api complicated, you'd think didn't want use it. if need more detailed information these classes , methods do, android documentation good.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -