public abstract class CameraController
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
refreshROI |
static long |
sDecodingSubType |
static long |
sDecodingType |
Constructor and Description |
---|
CameraController(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
abstract void |
closeCamera() |
void |
drawDebugPreview(byte[] pic)
Draw the the debug preview on the surface view
|
abstract android.graphics.Point |
getCameraResolution() |
android.content.Context |
getContext()
Returns the context
|
long |
getDecodingSubType() |
long |
getDecodingType()
Getter & Setter decoding types
|
int |
getDeviceOrientation()
Getter & Setter device orientation
|
abstract int |
getPreviewOrientation()
Abstracts methods that the children's must implement
|
int |
getRectangleFocusWidth()
Getter & Setter rectangleFocusWidth
|
boolean |
getRefreshROI()
Getter & Setter refreshROI
|
android.graphics.Rect |
getRegionOfInterest()
Gets the actual region of interest.
|
android.graphics.Rect |
getRegionOfInterestInPreview()
Like
getRegionOfInterest() but coordinates are in terms of the preview frame, not UI / screen. |
android.graphics.Rect |
getRequestedROI()
Getter & Setter mRequestedROI
|
android.util.Size |
getSizeAutoFit()
Return the actual size of the auto fit texture view
|
android.view.TextureView.SurfaceTextureListener |
getSurfaceListener()
Get the surface listener
|
AutoFitTextureView |
getTextureView() |
int |
getTickTimer()
Getter timer for focus rectangle
|
boolean |
getVisualDebug()
Getter & Setter Visual Debug
|
boolean |
isInitialized()
Getter & Setter isInitialized
|
boolean |
isOpen()
Detect if camera wa already opened
|
abstract boolean |
isZoomAvailable() |
abstract void |
manualFocus(float motionX,
float motionY,
android.view.View view,
boolean isFocusRectangleVisible) |
abstract void |
openCamera(android.graphics.SurfaceTexture surfaceTexture,
int width,
int height) |
abstract void |
requestPreviewFrame(android.os.Handler handler,
int message) |
abstract void |
setAutoFocusEnabled(boolean isAutoFocusEnabled) |
abstract void |
setCameraId(int cameraId) |
void |
setCameraIsOpen(boolean cameraIsOpen)
Setter cameraIsOpen
|
void |
setDebugPreview(android.view.SurfaceView view)
Setter Debug Preview
|
void |
setDecodingType(long type,
long subtype)
Sets the decoding type int as defined in
IcareDecoders CODE_* constants |
void |
setDeviceOrientation(int mDeviceOrientation) |
void |
setInitialized(boolean initialized) |
void |
setOnTextureReadyListener(OnTextureViewReadyListener listener)
Set the listener to informa when the TextureView is ready
|
void |
setRectangleFocusWidth(int rectangleFocusWidth) |
void |
setRefreshROI(boolean refreshROI) |
void |
setRegionOfInterest(android.graphics.Rect rectangle)
Allows to specify the ROI rectangle dimension.
|
void |
setRequestedROI(android.graphics.Rect mRequestedROI) |
void |
setROI(android.graphics.Rect mROI)
Setter mRoi
|
void |
setROIPreview(android.graphics.Rect mROIPreview)
Setter mROIPreview
|
void |
setTextureView(AutoFitTextureView textureView)
Getter & Setter TextureView
|
void |
setVisualDebug(boolean visualDebug) |
abstract void |
setZoomCamera(int zoom) |
void |
textureViewReady()
Inform that the TextureView is ready
|
public static long sDecodingType
public static long sDecodingSubType
public volatile boolean refreshROI
public android.content.Context getContext()
public boolean getRefreshROI()
public void setRefreshROI(boolean refreshROI)
public void setROIPreview(android.graphics.Rect mROIPreview)
public void setROI(android.graphics.Rect mROI)
public long getDecodingType()
public long getDecodingSubType()
public int getTickTimer()
public void setTextureView(AutoFitTextureView textureView)
public AutoFitTextureView getTextureView()
public int getRectangleFocusWidth()
public void setRectangleFocusWidth(int rectangleFocusWidth)
public int getDeviceOrientation()
public void setDeviceOrientation(int mDeviceOrientation)
public boolean isInitialized()
public void setInitialized(boolean initialized)
public android.graphics.Rect getRequestedROI()
public void setRequestedROI(android.graphics.Rect mRequestedROI)
public boolean getVisualDebug()
public void setVisualDebug(boolean visualDebug)
public void setDebugPreview(android.view.SurfaceView view)
public void setCameraIsOpen(boolean cameraIsOpen)
public void setOnTextureReadyListener(OnTextureViewReadyListener listener)
public void textureViewReady()
public android.view.TextureView.SurfaceTextureListener getSurfaceListener()
public android.graphics.Rect getRegionOfInterest()
public android.util.Size getSizeAutoFit()
public void setDecodingType(long type, long subtype)
IcareDecoders
CODE_* constantstype
- subtype
- public boolean isOpen()
public void setRegionOfInterest(android.graphics.Rect rectangle)
rectangle
- Rect objectpublic android.graphics.Rect getRegionOfInterestInPreview()
getRegionOfInterest()
but coordinates are in terms of the preview frame, not UI / screen.public void drawDebugPreview(byte[] pic)
pic
- byte[]. Draw the debug preview on the surface mDebugPreview
public abstract int getPreviewOrientation()
public abstract void openCamera(android.graphics.SurfaceTexture surfaceTexture, int width, int height) throws java.io.IOException
java.io.IOException
public abstract void closeCamera()
public abstract void setCameraId(int cameraId)
public abstract void requestPreviewFrame(android.os.Handler handler, int message)
public abstract android.graphics.Point getCameraResolution()
public abstract boolean isZoomAvailable()
public abstract void setZoomCamera(int zoom)
public abstract void manualFocus(float motionX, float motionY, android.view.View view, boolean isFocusRectangleVisible)
public abstract void setAutoFocusEnabled(boolean isAutoFocusEnabled)