xuxiuxi
2017-06-02 3cceac30dc1c5a7cf5bd4f95e327e855cdcf304d
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/util/RtspFaceNative.java
@@ -55,7 +55,7 @@
    public static native void dbgFaceAdd(NativeImg faceImage);
    public static native String dbgGetLog();
    public static native void dbgSetStfaceLicense(String lic);
    public static int COMPANY_ID = 1001;
@@ -72,7 +72,7 @@
        RefByteArray faceListPb = new RefByteArray();
        try {
            COMPANY_ID = Integer.parseInt(BaseApplication.getInstance().getDevice().getDeviceCompanyId());
            COMPANY_ID = Integer.parseInt(BaseApplication.getInstance().getDevice().getCompanyId());
        } catch (Exception e) {
            COMPANY_ID = 0;
        }
@@ -115,6 +115,7 @@
        }
        try{
            List<SurveillanceQueryItem> bitmapList = new ArrayList();
            for (int i = 0; i < faceImages.size(); i++) {
                NativeImg item = faceImages.get(i);
@@ -124,7 +125,11 @@
                Bitmap bitmap = Bitmap.createBitmap(item.width,item.height, Bitmap.Config.ARGB_8888);
                ByteBuffer byteBuffer = ByteBuffer.wrap(item.image, offset, size);
                bitmap.copyPixelsFromBuffer(byteBuffer);
//                surveillanceQueryItem.setBase64Image(Base64.encodeToString(item.image, offset, size, Base64.DEFAULT));
//                String str = Base64.encodeToString(item.image, offset, size, Base64.DEFAULT);
//                System.out.println(str.length());
//                System.out.println(str);
//                surveillanceQueryItem.setBase64Image(str);
                surveillanceQueryItem.setNativeImg(item);
                surveillanceQueryItem.setBitmap(bitmap);
                surveillanceQueryItem.setWidth(item.width+"");
                surveillanceQueryItem.setHeight(item.height+"");