Class CameraSessionOptions
java.lang.Object
com.codename1.camera.CameraSessionOptions
Configuration for a CameraSession. Fluent builder.
All sizes are advisory; the platform may snap to its nearest supported resolution.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncaptureAudio(boolean b) Whether to capture audio for video recording.enableStabilization(boolean b) Whether to request optical/electronic stabilization when supported.frameFormat(FrameFormat format) Format for frames delivered toFrameListener.frameMaxFps(int fps) Cap on frame delivery rate toFrameListeners.Pixel format requested forFrameListenerdelivery.intCap on frames-per-second delivered to listeners;0means uncapped.intRequested still-photo height, or0to use the camera default.intRequested still-photo width, or0to use the camera default.intRequested preview height, or0to let the platform pick.intRequested preview width, or0to let the platform pick.booleanTrue if the session should request the microphone for video recording.booleanTrue if optical/electronic stabilization was requested.photoSize(int width, int height) Requested still-photo resolution.previewSize(int width, int height) Requested preview / frame-stream resolution.
-
Constructor Details
-
CameraSessionOptions
public CameraSessionOptions()
-
-
Method Details
-
previewSize
Requested preview / frame-stream resolution. The platform may snap to its nearest supported size. Pass0for either dimension to let the platform pick. -
photoSize
Requested still-photo resolution. The platform may snap to its nearest supported size. Pass0for either dimension to use the camera's default photo size. -
frameFormat
Format for frames delivered toFrameListener. DefaultFrameFormat#JPEG. -
frameMaxFps
Cap on frame delivery rate toFrameListeners. Default 15. Set to 0 to deliver every frame the camera produces. -
captureAudio
Whether to capture audio for video recording. Default true. When false, no microphone permission is requested at session open. -
enableStabilization
Whether to request optical/electronic stabilization when supported. Default false. -
getPreviewWidth
public int getPreviewWidth()Requested preview width, or0to let the platform pick. -
getPreviewHeight
public int getPreviewHeight()Requested preview height, or0to let the platform pick. -
getPhotoWidth
public int getPhotoWidth()Requested still-photo width, or0to use the camera default. -
getPhotoHeight
public int getPhotoHeight()Requested still-photo height, or0to use the camera default. -
getFrameFormat
Pixel format requested forFrameListenerdelivery. -
getFrameMaxFps
public int getFrameMaxFps()Cap on frames-per-second delivered to listeners;0means uncapped. -
isCaptureAudio
public boolean isCaptureAudio()True if the session should request the microphone for video recording. -
isStabilizationEnabled
public boolean isStabilizationEnabled()True if optical/electronic stabilization was requested.
-