Class PhotoInput

java.lang.Object
com.banuba.sdk.input.PhotoInput
All Implemented Interfaces:
IAttachable, IInput

public class PhotoInput extends Object implements IInput
Delivers photos from the CameraDevice or Image to the Player
  • Constructor Details

    • PhotoInput

      public PhotoInput()
      Create a new PhotoInput instance
  • Method Details

    • take

      public void take(@NonNull CameraDevice cameraDevice, @Nullable CameraDevice.IErrorOccurred errorCallback)
      Take photo from the CameraDevice and push it to the Player
      Parameters:
      cameraDevice - the device for image capturing
    • take

      public void take(android.graphics.Bitmap bitmap)
      Take photo from the Bitmap and push it to the Player
      Parameters:
      bitmap - the image for processing
    • take

      public void take(android.graphics.Bitmap bitmap, Orientation orientation, boolean requireMirroring)
      Take photo from the Bitmap with orientation and push it to the Player
      Parameters:
      bitmap - the image for processing
      orientation - image orientation
      requireMirroring - mirroring
    • take

      public void take(android.media.Image image)
      Take photo from the Image and push it to the Player
      Parameters:
      image - an image for processing
    • take

      public void take(FramePixelBuffer framePixelBuffer, Orientation orientation, boolean requireMirroring)
      Take photo from the FramePixelBuffer with orientation and push it to the Player
      Parameters:
      framePixelBuffer - image (array of pixels)
      orientation - image orientation
      requireMirroring - mirroring
    • take

      public void take(FramePixelBuffer framePixelBuffer)
      Take photo from the FramePixelBuffer with default orientation and push it to the Player
      Parameters:
      framePixelBuffer - image (array of pixels)
    • take

      public void take(android.media.Image image, Orientation orientation, boolean requireMirroring)
      Take photo from the Image with orientation and push it to the Player
      Parameters:
      image - an image for processing
      orientation - image orientation
      requireMirroring - mirroring
    • frameProcessor

      @NonNull public com.banuba.sdk.effect_player.FrameProcessor frameProcessor()
      Get last available frame
      Specified by:
      frameProcessor in interface IInput
      Returns:
      frameProcessor with filled frameData
    • getFrameTimeNanos

      public long getFrameTimeNanos()
      Get frame timestamp in nanoseconds
      Specified by:
      getFrameTimeNanos in interface IInput
      Returns:
      timestamp
    • attach

      public void attach()
      Do nothing
      Specified by:
      attach in interface IAttachable
    • detach

      public void detach()
      Do nothing
      Specified by:
      detach in interface IAttachable