Class AndroidVideoApi5JniWrapper

java.lang.Object
org.linphone.mediastream.video.capture.AndroidVideoApi5JniWrapper

public class AndroidVideoApi5JniWrapper extends Object
Wrapper for Android Camera API. Used by Mediastreamer to record video from webcam. This file depends only on Android SDK superior or egal to 5
  • Field Details

    • isRecording

      public static boolean isRecording
  • Constructor Details

    • AndroidVideoApi5JniWrapper

      public AndroidVideoApi5JniWrapper()
  • Method Details

    • putImage

      public static void putImage(long nativePtr, byte[] buffer)
    • detectCamerasCount

      public static int detectCamerasCount()
    • detectCameras

      public static int detectCameras(int[] indexes, int[] frontFacing, int[] orientation)
    • selectNearestResolutionAvailable

      public static int[] selectNearestResolutionAvailable(int cameraId, int requestedW, int requestedH)
      Return the hw-available available resolution best matching the requested one. Best matching meaning : - try to find the same one - try to find one just a little bigger (ex: CIF when asked QVGA) - as a fallback the nearest smaller one
      Parameters:
      cameraId - Camera id
      requestedW - Requested video size width
      requestedH - Requested video size height
      Returns:
      int[width, height] of the chosen resolution, may be null if no resolution can possibly match the requested one
    • activateAutoFocus

      public static void activateAutoFocus(Object cam)
    • startRecording

      public static Object startRecording(int cameraId, int width, int height, int fps, int rotation, long nativePtr)
    • stopRecording

      public static void stopRecording(Object cam)
    • setPreviewDisplaySurface

      public static void setPreviewDisplaySurface(Object cam, Object surf)
    • selectNearestResolutionAvailableForCamera

      protected static int[] selectNearestResolutionAvailableForCamera(int id, int requestedW, int requestedH)
    • applyCameraParameters

      protected static void applyCameraParameters(android.hardware.Camera camera, int width, int height, int requestedFps)