package com.bytedance.realx;

import android.view.Surface;
import com.bytedance.covode.number.Covode;

public class RXVideoSurfaceController {
    public static RXVideoSurfaceController instance = new RXVideoSurfaceController();
    public RXSurfaceListener mSurfaceLisener;
    public boolean usePassSurfaceMode;

    public interface RXSurfaceListener {
        static {
            Covode.recordClassIndex(36946);
        }

        void onSurfaceAvailable(Surface surface);
    }

    public static RXVideoSurfaceController getInstance() {
        return instance;
    }

    public boolean usePassSurfaceMode() {
        return this.usePassSurfaceMode;
    }

    static {
        Covode.recordClassIndex(36945);
    }

    public void setPassSurfaceMode(boolean z) {
        this.usePassSurfaceMode = z;
    }

    public void setSurfaceListener(RXSurfaceListener rXSurfaceListener) {
        this.mSurfaceLisener = rXSurfaceListener;
    }

    public void setSurface(Surface surface) {
        RXSurfaceListener rXSurfaceListener = this.mSurfaceLisener;
        if (rXSurfaceListener != null) {
            rXSurfaceListener.onSurfaceAvailable(surface);
        }
    }
}
