package com.volcengine.velive.rn.pull.autogen;

import static com.volcengine.VolcApiEngine.runtime.MethodSignature.*;

import android.view.Surface;
import android.view.SurfaceHolder;
import com.ss.videoarch.liveplayer.VeLivePlayer;
import com.ss.videoarch.liveplayer.VeLivePlayerConfiguration;
import com.ss.videoarch.liveplayer.VeLivePlayerDef;
import com.ss.videoarch.liveplayer.VeLivePlayerObserver;
import com.ss.videoarch.liveplayer.VeLivePlayerStreamData;
import com.ss.videoarch.liveplayer.log.VeLivePlayerLogConfig;
import java.util.Map;

public class MethodSignature {
  static public void init() {
    try {
      var r = createClassMethodRegister(
          "com.ss.videoarch.liveplayer.VideoLiveManager");

      r.put("setConfig", VeLivePlayer.class.getMethod(
                             "setConfig", VeLivePlayerConfiguration.class));

      r.put("setObserver", VeLivePlayer.class.getMethod(
                               "setObserver", VeLivePlayerObserver.class));

      r.put(
          "setRenderFillMode",
          VeLivePlayer.class.getMethod(
              "setRenderFillMode", VeLivePlayerDef.VeLivePlayerFillMode.class));

      r.put("getVersion", VeLivePlayer.class.getMethod("getVersion"));

      r.put("setSurfaceHolder", VeLivePlayer.class.getMethod(
                                    "setSurfaceHolder", SurfaceHolder.class));

      r.put("setSurface",
            VeLivePlayer.class.getMethod("setSurface", Surface.class));

      r.put("setPlayUrl",
            VeLivePlayer.class.getMethod("setPlayUrl", String.class));

      r.put(
          "setLogLevel",
          VeLivePlayer.class.getMethod(
              "setLogLevel", VeLivePlayerLogConfig.VeLivePlayerLogLevel.class));

      r.put("setLogConfig", VeLivePlayer.class.getMethod(
                                "setLogConfig", VeLivePlayerLogConfig.class));

      r.put("setPlayStreamData",
            VeLivePlayer.class.getMethod("setPlayStreamData",
                                         VeLivePlayerStreamData.class));

      r.put("play", VeLivePlayer.class.getMethod("play"));
      r.put("pause", VeLivePlayer.class.getMethod("pause"));

      r.put("stop", VeLivePlayer.class.getMethod("stop"));

      r.put("destroy", VeLivePlayer.class.getMethod("destroy"));

      r.put("switchResolution",
            VeLivePlayer.class.getMethod(
                "switchResolution",
                VeLivePlayerDef.VeLivePlayerResolution.class));

      r.put("isPlaying", VeLivePlayer.class.getMethod("isPlaying"));

      r.put("setPlayerVolume",
            VeLivePlayer.class.getMethod("setPlayerVolume", float.class));

      r.put("setMute", VeLivePlayer.class.getMethod("setMute", boolean.class));

      r.put("isMute", VeLivePlayer.class.getMethod("isMute"));

      r.put("setUrlHostIP",
            VeLivePlayer.class.getMethod("setUrlHostIP", Map.class));

      r.put("setGlobalUrlHostIP",
            VeLivePlayer.class.getMethod("setGlobalUrlHostIP", Map.class));

      r.put("setProperty", VeLivePlayer.class.getMethod(
                               "setProperty", String.class, Object.class));

      r.put("snapshot", VeLivePlayer.class.getMethod("snapshot"));

      r.put("enableVideoFrameObserver",
            VeLivePlayer.class.getMethod(
                "enableVideoFrameObserver", boolean.class,
                VeLivePlayerDef.VeLivePlayerPixelFormat.class,
                VeLivePlayerDef.VeLivePlayerVideoBufferType.class));

      r.put("enableAudioFrameObserver",
            VeLivePlayer.class.getMethod(
                "enableAudioFrameObserver", boolean.class, boolean.class,
                VeLivePlayerDef.VeLivePlayerAudioBufferType.class));

      r.put(
          "setRenderRotation",
          VeLivePlayer.class.getMethod(
              "setRenderRotation", VeLivePlayerDef.VeLivePlayerRotation.class));

      r.put("setRenderMirror",
            VeLivePlayer.class.getMethod(
                "setRenderMirror", VeLivePlayerDef.VeLivePlayerMirror.class));

      r.put("setEnableSuperResolution",
            VeLivePlayer.class.getMethod("setEnableSuperResolution",
                                         boolean.class));

      r.put("setEnableSharpen",
            VeLivePlayer.class.getMethod("setEnableSharpen", boolean.class));

    } catch (NoSuchMethodException e) {
      throw new RuntimeException(e);
    }
  }
}
