+ public void halfPressShutter(boolean isPressed)
+ {
+ unlockAutoFocus();
+ //lockAutoFocus(new PointF(0.5f, 0.5f));
+ }
+
+ private void lockAutoFocus(PointF point)
+ {
+ try
+ {
+ int x = (0x0000ffff & (Math.round(point.x * maxPointLimitWidth) + 1));
+ int y = (0x0000ffff & (Math.round(point.y * maxPointLimitHeight) + 1));
+ Log.v(TAG, "Lock AF: [" + x + ","+ y + "]");
+ commandPublisher.enqueueCommand(new PtpIpCommandGeneric(this, FOCUS_LOCK_PRE, false, 0, 0x9160));
+ commandPublisher.enqueueCommand(new PtpIpCommandGeneric(this, FOCUS_LOCK, 25, false, 0, 0x915b, 16, 0x03, x, y, 0x01));
+ commandPublisher.enqueueCommand(new PtpIpCommandGeneric(this, FOCUS_MOVE, false, 0, 0x9154));
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ *
+ *
+ */
+ private RectF getPreFocusFrameRect(@NonNull PointF point)
+ {
+ float imageWidth = frameDisplayer.getContentSizeWidth();
+ float imageHeight = frameDisplayer.getContentSizeHeight();