Package com.banuba.sdk.input
Class PhotoInput
java.lang.Object
com.banuba.sdk.input.PhotoInput
- All Implemented Interfaces:
IAttachable
,IInput
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
attach()
Do nothingvoid
detach()
Do nothingcom.banuba.sdk.effect_player.FrameProcessor
Get last available framelong
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
-
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 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
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
Take photo from theFramePixelBuffer
with default orientation and push it to thePlayer
- Parameters:
framePixelBuffer
- image (array of pixels)
-
take
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
-