public class CameraControllerLegacy extends CameraController
refreshROI, sDecodingSubType, sDecodingType| Constructor and Description |
|---|
CameraControllerLegacy(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeCamera()
Closes the camera driver if still in use.
|
android.graphics.Point |
getCameraResolution() |
int |
getPreviewOrientation()
Finds the angle to apply to the preview frames to get an image with natural orientation.
|
boolean |
isFlashAvailable()
Checks if flashlight is available on device.
|
boolean |
isZoomAvailable()
Get the information about the availability of the zoom .
|
void |
manualFocus(float motionX,
float motionY,
android.view.View view,
boolean isFocusRectangleVisible)
On double tap we switch to manual focus.
|
void |
openCamera(android.graphics.SurfaceTexture surfaceTexture,
int width,
int height)
Opens the camera driver and initializes the hardware parameters.
|
void |
requestPreviewFrame(android.os.Handler handler,
int message)
A single preview frame will be returned to the handler supplied.
|
void |
setAutoFocusEnabled(boolean isAutoFocusEnabled)
If not already activated we turn on the auto focus.
|
void |
setCameraId(int cameraId) |
void |
setFlashEnabled(boolean newSetting)
Enables/disables flash light
|
void |
setZoomCamera(int zoom)
Get the information about the availability of the zoom .
|
void |
startPreview()
Asks the camera hardware to begin drawing preview frames to the screen.
|
void |
stopPreview()
Tells the camera to stop drawing preview frames.
|
drawDebugPreview, getContext, getDecodingSubType, getDecodingType, getDeviceOrientation, getRectangleFocusWidth, getRefreshROI, getRegionOfInterest, getRegionOfInterestInPreview, getRequestedROI, getSizeAutoFit, getSurfaceListener, getTextureView, getTickTimer, getVisualDebug, isInitialized, isOpen, setCameraIsOpen, setDebugPreview, setDecodingType, setDeviceOrientation, setInitialized, setOnTextureReadyListener, setRectangleFocusWidth, setRefreshROI, setRegionOfInterest, setRequestedROI, setROI, setROIPreview, setTextureView, setVisualDebug, textureViewReadypublic CameraControllerLegacy(android.content.Context context)
public void setCameraId(int cameraId)
setCameraId in class CameraControllerpublic android.graphics.Point getCameraResolution()
getCameraResolution in class CameraControllerpublic void openCamera(android.graphics.SurfaceTexture surfaceTexture,
int width,
int height)
throws java.io.IOException
openCamera in class CameraControllerjava.io.IOException - Indicates the camera driver failed to open.public void closeCamera()
closeCamera in class CameraControllerpublic void startPreview()
public int getPreviewOrientation()
getPreviewOrientation in class CameraControllerpublic void stopPreview()
public void setFlashEnabled(boolean newSetting)
public boolean isFlashAvailable()
public void requestPreviewFrame(android.os.Handler handler,
int message)
requestPreviewFrame in class CameraControllerhandler - The handler to send the message to.message - The what field of the message to be sent.public boolean isZoomAvailable()
isZoomAvailable in class CameraControllerpublic void setZoomCamera(int zoom)
setZoomCamera in class CameraControllerpublic void manualFocus(float motionX,
float motionY,
android.view.View view,
boolean isFocusRectangleVisible)
manualFocus in class CameraControllerpublic void setAutoFocusEnabled(boolean isAutoFocusEnabled)
setAutoFocusEnabled in class CameraController