Package com.banuba.sdk.input
Class PhotoInput
java.lang.Object
com.banuba.sdk.input.PhotoInput
- All Implemented Interfaces:
IAttachable,IInput
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidattach()Do nothingvoiddetach()Do nothingcom.banuba.sdk.effect_player.FrameProcessorGet last available framelongGet frame timestamp in nanosecondsvoidtake(android.graphics.Bitmap bitmap) Take photo from theBitmapand push it to thePlayervoidtake(android.graphics.Bitmap bitmap, Orientation orientation, boolean requireMirroring) Take photo from theBitmapwith orientation and push it to thePlayervoidtake(android.media.Image image) Take photo from theImageand push it to thePlayervoidtake(android.media.Image image, Orientation orientation, boolean requireMirroring) Take photo from theImagewith orientation and push it to thePlayervoidtake(FramePixelBuffer framePixelBuffer) Take photo from theFramePixelBufferwith default orientation and push it to thePlayervoidtake(FramePixelBuffer framePixelBuffer, Orientation orientation, boolean requireMirroring) Take photo from theFramePixelBufferwith orientation and push it to thePlayervoidtake(CameraDevice cameraDevice, CameraDevice.IErrorOccurred errorCallback) Take photo from theCameraDeviceand 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 theCameraDeviceand push it to thePlayer- Parameters:
cameraDevice- the device for image capturing
-
take
public void take(android.graphics.Bitmap bitmap) Take photo from theBitmapand push it to thePlayer- Parameters:
bitmap- the image for processing
-
take
Take photo from theBitmapwith 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 theImageand push it to thePlayer- Parameters:
image- an image for processing
-
take
public void take(FramePixelBuffer framePixelBuffer, Orientation orientation, boolean requireMirroring) Take photo from theFramePixelBufferwith orientation and push it to thePlayer- Parameters:
framePixelBuffer- image (array of pixels)orientation- image orientationrequireMirroring- mirroring
-
take
Take photo from theFramePixelBufferwith default orientation and push it to thePlayer- Parameters:
framePixelBuffer- image (array of pixels)
-
take
Take photo from theImagewith 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:
frameProcessorin interfaceIInput- Returns:
- frameProcessor with filled frameData
-
getFrameTimeNanos
public long getFrameTimeNanos()Get frame timestamp in nanoseconds- Specified by:
getFrameTimeNanosin interfaceIInput- Returns:
- timestamp
-
attach
public void attach()Do nothing- Specified by:
attachin interfaceIAttachable
-
detach
public void detach()Do nothing- Specified by:
detachin interfaceIAttachable
-