Package com.banuba.sdk.input
Class PhotoInput
- java.lang.Object
-
- com.banuba.sdk.input.PhotoInput
-
- All Implemented Interfaces:
IAttachable
,IInput
public class PhotoInput extends java.lang.Object implements IInput
-
-
Constructor Summary
Constructors Constructor Description PhotoInput()
Create a new PhotoInput instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attach()
Do nothingvoid
detach()
Do nothingcom.banuba.sdk.effect_player.FrameProcessor
frameProcessor()
Get last available framelong
getFrameTimeNanos()
Get frame timestamp in nanosecondsvoid
take(android.graphics.Bitmap bitmap)
Take photo from theBitmap
and push it to thePlayer
void
take(android.graphics.Bitmap bitmap, Orientation orientation, boolean requireMirroring)
Take photo from theBitmap
with orientation and push it to thePlayer
void
take(android.media.Image image)
Take photo from theImage
and push it to thePlayer
void
take(android.media.Image image, Orientation orientation, boolean requireMirroring)
Take photo from theImage
with orientation and push it to thePlayer
void
take(FramePixelBuffer framePixelBuffer)
Take photo from theFramePixelBuffer
with default orientation and push it to thePlayer
void
take(FramePixelBuffer framePixelBuffer, Orientation orientation, boolean requireMirroring)
Take photo from theFramePixelBuffer
with orientation and push it to thePlayer
void
take(CameraDevice cameraDevice, CameraDevice.IErrorOccurred errorCallback)
Take photo from theCameraDevice
and push it to thePlayer
-
-
-
Method Detail
-
take
public void take(@NonNull CameraDevice cameraDevice, @Nullable CameraDevice.IErrorOccurred errorCallback)
Take photo from theCameraDevice
and push it to thePlayer
- Parameters:
cameraDevice
- the device for image capturing
-
take
public void take(android.graphics.Bitmap bitmap)
Take photo from theBitmap
and push it to thePlayer
- Parameters:
bitmap
- the image for processing
-
take
public void take(android.graphics.Bitmap bitmap, Orientation orientation, boolean requireMirroring)
Take photo from theBitmap
with orientation and push it to thePlayer
- Parameters:
bitmap
- the image for processingorientation
- image orientationrequireMirroring
- mirroring
-
take
public void take(android.media.Image image)
Take photo from theImage
and push it to thePlayer
- Parameters:
image
- an image for processing
-
take
public void take(FramePixelBuffer framePixelBuffer, Orientation orientation, boolean requireMirroring)
Take photo from theFramePixelBuffer
with orientation and push it to thePlayer
- Parameters:
framePixelBuffer
- image (array of pixels)orientation
- image orientationrequireMirroring
- mirroring
-
take
public void take(FramePixelBuffer framePixelBuffer)
Take photo from theFramePixelBuffer
with default orientation and push it to thePlayer
- Parameters:
framePixelBuffer
- image (array of pixels)
-
take
public void take(android.media.Image image, Orientation orientation, boolean requireMirroring)
Take photo from theImage
with orientation and push it to thePlayer
- Parameters:
image
- an image for processingorientation
- image orientationrequireMirroring
- mirroring
-
frameProcessor
@NonNull public com.banuba.sdk.effect_player.FrameProcessor frameProcessor()
Get last available frame- Specified by:
frameProcessor
in interfaceIInput
- Returns:
- frameProcessor with filled frameData
-
getFrameTimeNanos
public long getFrameTimeNanos()
Get frame timestamp in nanoseconds- Specified by:
getFrameTimeNanos
in interfaceIInput
- Returns:
- timestamp
-
attach
public void attach()
Do nothing- Specified by:
attach
in interfaceIAttachable
-
detach
public void detach()
Do nothing- Specified by:
detach
in interfaceIAttachable
-
-