package com.ss.android.ttve.nativePort;

import X.I32;
import X.I5L;
import X.I67;
import com.bytedance.covode.number.Covode;
import com.ss.android.ttve.nativePort.NativeCallbacks;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

public class TECallbackClient {
    public NativeCallbacks.IAudioCaptureCallback mAudioCaptureCallback;
    public NativeCallbacks.ICameraFrameCallback mBufferedFrameCallback;
    public I67 mCommonCallback;
    public I32 mDisplayParamsListener;
    public NativeCallbacks.IFrameEffectCallback mFrameEffectCallback;
    public NativeCallbacks.IGetFrameCallback mGetFrameCallback;
    public NativeCallbacks.ILensCallback mLensCallback;
    public I5L mOpenGLCallback;

    static {
        Covode.recordClassIndex(49414);
    }

    public void nativeCallback_onCameraFacingChangedCallback(boolean z) {
    }

    public void nativeCallback_onDisplaySizeChangedCallback(int i, int i2, int i3, int i4) {
    }

    public I5L getOpenGLListeners() {
        return this.mOpenGLCallback;
    }

    public void setAudioCaptureListener(NativeCallbacks.IAudioCaptureCallback iAudioCaptureCallback) {
        this.mAudioCaptureCallback = iAudioCaptureCallback;
    }

    public void setBufferedFrameListener(NativeCallbacks.ICameraFrameCallback iCameraFrameCallback) {
        this.mBufferedFrameCallback = iCameraFrameCallback;
    }

    public void setCommonCallback(I67 i67) {
        this.mCommonCallback = i67;
    }

    public void setDisplayParamsListener(I32 i32) {
        this.mDisplayParamsListener = i32;
    }

    public void setFrameEffectCallback(NativeCallbacks.IFrameEffectCallback iFrameEffectCallback) {
        this.mFrameEffectCallback = iFrameEffectCallback;
    }

    public void setGetFrameListener(NativeCallbacks.IGetFrameCallback iGetFrameCallback) {
        this.mGetFrameCallback = iGetFrameCallback;
    }

    public void setLensCallback(NativeCallbacks.ILensCallback iLensCallback) {
        this.mLensCallback = iLensCallback;
    }

    public void setOpenGLListeners(I5L i5l) {
        this.mOpenGLCallback = i5l;
    }

    public ByteBuffer nativeCallback_allocateBuffer(int i) {
        return nativeCallback_allocateBuffer(i, true);
    }

    public void nativeCallback_onAudioCaptureCallback(ByteBuffer byteBuffer) {
        NativeCallbacks.IAudioCaptureCallback iAudioCaptureCallback = this.mAudioCaptureCallback;
        if (iAudioCaptureCallback != null) {
            iAudioCaptureCallback.onReceive(byteBuffer);
        }
    }

    public void nativeCallback_onFrameEffectCallback(long j) {
        NativeCallbacks.IFrameEffectCallback iFrameEffectCallback = this.mFrameEffectCallback;
        if (iFrameEffectCallback != null) {
            iFrameEffectCallback.onResult(j);
        }
    }

    public void nativeCallback_onOpenGLCreate(int i) {
        I5L i5l = this.mOpenGLCallback;
        if (i5l != null) {
            i5l.LIZ(i);
        }
    }

    public void nativeCallback_onOpenGLDestroy(int i) {
        I5L i5l = this.mOpenGLCallback;
        if (i5l != null) {
            i5l.LIZIZ(i);
        }
    }

    public void nativeCallback_onPreviewSurface(int i) {
        I5L i5l = this.mOpenGLCallback;
        if (i5l != null) {
            i5l.LIZJ(i);
        }
    }

    public void nativeCallback_onOpenGLDrawAfter(int i, double d) {
        I5L i5l = this.mOpenGLCallback;
        if (i5l != null) {
            i5l.LIZ(i, d);
        }
    }

    public void nativeCallback_onOpenGLDrawBefore(int i, double d) {
        I5L i5l = this.mOpenGLCallback;
        if (i5l != null) {
            i5l.LIZ(d);
        }
    }

    public ByteBuffer nativeCallback_allocateBuffer(int i, boolean z) {
        ByteOrder byteOrder;
        ByteBuffer allocateDirect = ByteBuffer.allocateDirect(i);
        if (z) {
            byteOrder = ByteOrder.LITTLE_ENDIAN;
        } else {
            byteOrder = ByteOrder.BIG_ENDIAN;
        }
        return allocateDirect.order(byteOrder);
    }

    public void nativeCallback_onLensCallbackError(int i, int i2, String str) {
        NativeCallbacks.ILensCallback iLensCallback = this.mLensCallback;
        if (iLensCallback != null) {
            iLensCallback.onError(i, i2, str);
        }
    }

    public void nativeCallback_onLensCallbackSuccess(int i, float f, int i2) {
        NativeCallbacks.ILensCallback iLensCallback = this.mLensCallback;
        if (iLensCallback != null) {
            iLensCallback.onSuccess(i, f, i2);
        }
    }

    public void nativeCallback_onCommonCallback(int i, int i2, float f, String str) {
        I67 i67 = this.mCommonCallback;
        if (i67 != null) {
            i67.LIZ(i, i2, f, str);
        }
    }

    public void nativeCallback_onLensCallbackInfo(int i, int i2, int i3, String str) {
        NativeCallbacks.ILensCallback iLensCallback = this.mLensCallback;
        if (iLensCallback != null) {
            iLensCallback.onInfo(i, i2, i3, str);
        }
    }

    public void nativeCallback_onBufferedFrameCallback(ByteBuffer byteBuffer, int i, int i2, long j) {
        NativeCallbacks.ICameraFrameCallback iCameraFrameCallback = this.mBufferedFrameCallback;
        if (iCameraFrameCallback != null) {
            iCameraFrameCallback.onResult(byteBuffer, i, i2, j);
        }
    }

    public void nativeCallback_onGetFrameCallback(int[] iArr, int i, int i2, long j) {
        NativeCallbacks.IGetFrameCallback iGetFrameCallback = this.mGetFrameCallback;
        if (iGetFrameCallback != null) {
            iGetFrameCallback.onResult(iArr, i, i2, j);
        }
    }
}
