package com.bytesflow.opencv.media.jni;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 输出头文件步骤
 * cd out/production/jni
 * 执行: javah com.bytesflow.opencv.media.jni.PQCVMediaProcessor
 */
public class PQCVMediaProcessor {

    public PQCVMediaProcessor() {
    }

    /**
     * 初始化  sdk
     *
     * @param soPath sdk so 路径
     * @return
     * @throws FileNotFoundException
     */
    public static boolean initSDK(String soPath) throws FileNotFoundException {
        if (new File(soPath).exists()) System.load(soPath);
        else throw new FileNotFoundException(soPath);
        return true;
    }

    public native static int blurDetectionFromImagePath(String path);

    public native static String getVideoSimilarityLists(String inputjson);

    public native static int blurDetectionFromImageBytes(byte[] data);
}
