package com.bytedance.ies.nle.editor_jni;

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

public class NLEMediaSession {
    public transient boolean LIZ;
    public transient long LIZIZ;

    static {
        Covode.recordClassIndex(29820);
    }

    public void finalize() {
        LJIIJ();
    }

    public final NLEPlayer LIZ() {
        MethodCollector.i(18777);
        long NLEMediaSession_getPlayerApi = NLEMediaPublicJniJNI.NLEMediaSession_getPlayerApi(this.LIZIZ, this);
        if (NLEMediaSession_getPlayerApi == 0) {
            MethodCollector.o(18777);
            return null;
        }
        NLEPlayer nLEPlayer = new NLEPlayer(NLEMediaSession_getPlayerApi);
        MethodCollector.o(18777);
        return nLEPlayer;
    }

    public final NLEMediaRuntimeController LIZIZ() {
        MethodCollector.i(18856);
        long NLEMediaSession_getMediaRuntimeApi = NLEMediaPublicJniJNI.NLEMediaSession_getMediaRuntimeApi(this.LIZIZ, this);
        if (NLEMediaSession_getMediaRuntimeApi == 0) {
            MethodCollector.o(18856);
            return null;
        }
        NLEMediaRuntimeController nLEMediaRuntimeController = new NLEMediaRuntimeController(NLEMediaSession_getMediaRuntimeApi);
        MethodCollector.o(18856);
        return nLEMediaRuntimeController;
    }

    public final NLEMediaSettingsController LIZJ() {
        MethodCollector.i(18892);
        long NLEMediaSession_getMediaSettingApi = NLEMediaPublicJniJNI.NLEMediaSession_getMediaSettingApi(this.LIZIZ, this);
        if (NLEMediaSession_getMediaSettingApi == 0) {
            MethodCollector.o(18892);
            return null;
        }
        NLEMediaSettingsController nLEMediaSettingsController = new NLEMediaSettingsController(NLEMediaSession_getMediaSettingApi);
        MethodCollector.o(18892);
        return nLEMediaSettingsController;
    }

    public final NLEFilterRuntimeController LIZLLL() {
        MethodCollector.i(18893);
        long NLEMediaSession_getFilterApi = NLEMediaPublicJniJNI.NLEMediaSession_getFilterApi(this.LIZIZ, this);
        if (NLEMediaSession_getFilterApi == 0) {
            MethodCollector.o(18893);
            return null;
        }
        NLEFilterRuntimeController nLEFilterRuntimeController = new NLEFilterRuntimeController(NLEMediaSession_getFilterApi);
        MethodCollector.o(18893);
        return nLEFilterRuntimeController;
    }

    public final NLEMVInfoController LJ() {
        MethodCollector.i(10915);
        long NLEMediaSession_getMVApi = NLEMediaPublicJniJNI.NLEMediaSession_getMVApi(this.LIZIZ, this);
        if (NLEMediaSession_getMVApi == 0) {
            MethodCollector.o(10915);
            return null;
        }
        NLEMVInfoController nLEMVInfoController = new NLEMVInfoController(NLEMediaSession_getMVApi);
        MethodCollector.o(10915);
        return nLEMVInfoController;
    }

    public final NLEExporterController LJFF() {
        MethodCollector.i(10916);
        long NLEMediaSession_getExporterApi = NLEMediaPublicJniJNI.NLEMediaSession_getExporterApi(this.LIZIZ, this);
        if (NLEMediaSession_getExporterApi == 0) {
            MethodCollector.o(10916);
            return null;
        }
        NLEExporterController nLEExporterController = new NLEExporterController(NLEMediaSession_getExporterApi);
        MethodCollector.o(10916);
        return nLEExporterController;
    }

    public final NLEAlgorithmController LJI() {
        MethodCollector.i(11134);
        long NLEMediaSession_getAlgorithmApi = NLEMediaPublicJniJNI.NLEMediaSession_getAlgorithmApi(this.LIZIZ, this);
        if (NLEMediaSession_getAlgorithmApi == 0) {
            MethodCollector.o(11134);
            return null;
        }
        NLEAlgorithmController nLEAlgorithmController = new NLEAlgorithmController(NLEMediaSession_getAlgorithmApi);
        MethodCollector.o(11134);
        return nLEAlgorithmController;
    }

    public final NLEBrushRuntimeController LJII() {
        MethodCollector.i(11363);
        long NLEMediaSession_getBrushApi = NLEMediaPublicJniJNI.NLEMediaSession_getBrushApi(this.LIZIZ, this);
        if (NLEMediaSession_getBrushApi == 0) {
            MethodCollector.o(11363);
            return null;
        }
        NLEBrushRuntimeController nLEBrushRuntimeController = new NLEBrushRuntimeController(NLEMediaSession_getBrushApi);
        MethodCollector.o(11363);
        return nLEBrushRuntimeController;
    }

    public final NLEStickerController LJIIIIZZ() {
        MethodCollector.i(11601);
        long NLEMediaSession_getStickerApi = NLEMediaPublicJniJNI.NLEMediaSession_getStickerApi(this.LIZIZ, this);
        if (NLEMediaSession_getStickerApi == 0) {
            MethodCollector.o(11601);
            return null;
        }
        NLEStickerController nLEStickerController = new NLEStickerController(NLEMediaSession_getStickerApi);
        MethodCollector.o(11601);
        return nLEStickerController;
    }

    public final NLEEffectRuntimeController LJIIIZ() {
        MethodCollector.i(11829);
        long NLEMediaSession_getEffectApi = NLEMediaPublicJniJNI.NLEMediaSession_getEffectApi(this.LIZIZ, this);
        if (NLEMediaSession_getEffectApi == 0) {
            MethodCollector.o(11829);
            return null;
        }
        NLEEffectRuntimeController nLEEffectRuntimeController = new NLEEffectRuntimeController(NLEMediaSession_getEffectApi);
        MethodCollector.o(11829);
        return nLEEffectRuntimeController;
    }

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

    public NLEMediaSession(long j) {
        this.LIZ = true;
        this.LIZIZ = j;
    }

    /* JADX WARNING: Illegal instructions before constructor call */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public NLEMediaSession(com.bytedance.ies.nle.editor_jni.NLEMediaConfig r3) {
        /*
            r2 = this;
            if (r3 != 0) goto L_0x0014
            r0 = 0
        L_0x0004:
            long r0 = com.bytedance.ies.nle.editor_jni.NLEMediaPublicJniJNI.new_NLEMediaSession(r0, r3)
            r2.<init>((long) r0)
            r0 = 18672(0x48f0, float:2.6165E-41)
            com.bytedance.frameworks.apm.trace.MethodCollector.i(r0)
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r0)
            return
        L_0x0014:
            long r0 = r3.LIZ
            goto L_0x0004
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.ies.nle.editor_jni.NLEMediaSession.<init>(com.bytedance.ies.nle.editor_jni.NLEMediaConfig):void");
    }

    public final void LIZ(NLEModel nLEModel) {
        MethodCollector.i(18776);
        NLEModel nLEModel2 = nLEModel;
        NLEMediaPublicJniJNI.NLEMediaSession_setDataSource(this.LIZIZ, this, NLEModel.getCPtr(nLEModel2), nLEModel2);
        MethodCollector.o(18776);
    }
}
