android - How i can correctly set up CONTROL_SCENE_MODE_ACTION camera2API? -
i need set control_scene_mode_action
app camera2api.
i tryed set capturestillpicture()
method in lockfocus()
method in statecallback
doesn't work...
in documentation found explanation is, lines how mode have set up...
there 2 question:
- where exacly have set mode
- how can check working
or maybe can suggest me how reduse expose time...
thanks in advance
you can modify camera2basicfragment google camera2basic sample add line
mpreviewrequestbuilder.set(capturerequest.control_scene_mode, capturerequest.control_scene_mode_action);
just after line
mpreviewrequestbuilder.set(capturerequest.control_af_mode, capturerequest.control_af_mode_continuous_picture);
in onconfigured()
method of example
@override public void onconfigured(@nonnull cameracapturesession cameracapturesession) { // camera closed if (null == mcameradevice) { return; } // when session ready, start displaying preview. mcapturesession = cameracapturesession; try { // auto focus should continuous camera preview. mpreviewrequestbuilder.set(capturerequest.control_af_mode, capturerequest.control_af_mode_continuous_picture); mpreviewrequestbuilder.set(capturerequest.control_scene_mode, capturerequest.control_scene_mode_action); // flash automatically enabled when necessary. setautoflash(mpreviewrequestbuilder); // finally, start displaying camera preview. mpreviewrequest = mpreviewrequestbuilder.build(); mcapturesession.setrepeatingrequest(mpreviewrequest, mcapturecallback, mbackgroundhandler); } catch (cameraaccessexception e) { e.printstacktrace(); } }
Comments
Post a Comment