Package com.banuba.sdk.input
Class CameraInput
- java.lang.Object
-
- com.banuba.sdk.input.CameraInput
-
- All Implemented Interfaces:
IAttachable
,IInput
public class CameraInput extends java.lang.Object implements IInput
Delivers video stream from theCameraDevice
to thePlayer
-
-
Constructor Summary
Constructors Constructor Description CameraInput(CameraDevice cameraDevice)
Create a new CameraInput
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attach()
Get started with the cameravoid
detach()
End working with the cameracom.banuba.sdk.effect_player.FrameProcessor
frameProcessor()
Get the current framelong
getFrameTimeNanos()
Get frame timestamp in nanoseconds
-
-
-
Constructor Detail
-
CameraInput
public CameraInput(@NonNull CameraDevice cameraDevice)
Create a new CameraInput- Parameters:
cameraDevice
- the video stream will come from this class
-
-
Method Detail
-
frameProcessor
@NonNull public com.banuba.sdk.effect_player.FrameProcessor frameProcessor()
Get the current frame- Specified by:
frameProcessor
in interfaceIInput
- Returns:
- the last frame received from the CameraDevice
-
getFrameTimeNanos
public long getFrameTimeNanos()
Get frame timestamp in nanoseconds- Specified by:
getFrameTimeNanos
in interfaceIInput
- Returns:
- timestamp
-
attach
public void attach()
Get started with the camera- Specified by:
attach
in interfaceIAttachable
-
detach
public void detach()
End working with the camera- Specified by:
detach
in interfaceIAttachable
-
-