package com.bytedance.ies.nle.editor_jni;

import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;

public class NLEFilterRuntimeController {
    public transient boolean LIZ = true;
    public transient long LIZIZ;

    static {
        Covode.recordClassIndex(29795);
    }

    public void finalize() {
        LIZIZ();
    }

    public final int LIZ() {
        MethodCollector.i(18542);
        int NLEFilterRuntimeController_doLensOneKeyDetect = NLEMediaPublicJniJNI.NLEFilterRuntimeController_doLensOneKeyDetect(this.LIZIZ, this);
        MethodCollector.o(18542);
        return NLEFilterRuntimeController_doLensOneKeyDetect;
    }

    private synchronized void LIZIZ() {
        MethodCollector.i(18538);
        long j = this.LIZIZ;
        if (j != 0) {
            if (this.LIZ) {
                this.LIZ = false;
                NLEMediaPublicJniJNI.delete_NLEFilterRuntimeController(j);
            }
            this.LIZIZ = 0;
        }
        MethodCollector.o(18538);
    }

    public NLEFilterRuntimeController(long j) {
        this.LIZIZ = j;
    }

    public final float LIZ(String str) {
        MethodCollector.i(18541);
        float NLEFilterRuntimeController_getColorFilterIntensity = NLEMediaPublicJniJNI.NLEFilterRuntimeController_getColorFilterIntensity(this.LIZIZ, this, str);
        MethodCollector.o(18541);
        return NLEFilterRuntimeController_getColorFilterIntensity;
    }

    public final int LIZ(VecString vecString, VecString vecString2, VecFloat vecFloat, String str) {
        long j;
        MethodCollector.i(18540);
        long j2 = this.LIZIZ;
        VecString vecString3 = vecString;
        long LIZ2 = VecString.LIZ(vecString3);
        VecString vecString4 = vecString2;
        long LIZ3 = VecString.LIZ(vecString4);
        VecFloat vecFloat2 = vecFloat;
        if (vecFloat2 == null) {
            j = 0;
        } else {
            j = vecFloat2.LIZ;
        }
        int NLEFilterRuntimeController_updateMultiComposerNodes = NLEMediaPublicJniJNI.NLEFilterRuntimeController_updateMultiComposerNodes(j2, this, LIZ2, vecString3, LIZ3, vecString4, j, vecFloat2, str);
        MethodCollector.o(18540);
        return NLEFilterRuntimeController_updateMultiComposerNodes;
    }
}
