public abstract class SCameraProcessor extends Object implements AutoCloseable
processor parameter
.Modifier and Type | Field and Description |
---|---|
static SCameraProcessorParameter.Key<Integer> |
CAMERA_ID
ID of camera device which is used to provide image data to processor.
|
static SCameraProcessorParameter.Key<Integer> |
JPEG_QUALITY
Jpeg quality.
|
static SCameraProcessorParameter.Key<Range<Integer>> |
MULTI_INPUT_COUNT_RANGE
Input count range for multi-input image processor.
|
static int |
NATIVE_PROCESSOR_MSG_DECODING_FAIL
Error code that indicates jpeg decoding fail.
|
static int |
NATIVE_PROCESSOR_MSG_ENCODING_FAIL
Error code that indicates jpeg encoding fail.
|
static int |
NATIVE_PROCESSOR_MSG_PROCESSING_FAIL
Error code that indicates processor processing fail.
|
static int |
NATIVE_PROCESSOR_MSG_UNKNOWN_ERROR
Error code that indicates unknown error.
|
static SCameraProcessorParameter.Key<Integer> |
STILL_INPUT_FORMAT
Still input format.
|
static SCameraProcessorParameter.Key<int[]> |
STILL_INPUT_FORMAT_LIST
List of available still input format.
|
static SCameraProcessorParameter.Key<Integer> |
STILL_OUTPUT_FORMAT
Still output format.
|
static SCameraProcessorParameter.Key<int[]> |
STILL_OUTPUT_FORMAT_LIST
List of available still output format.
|
static SCameraProcessorParameter.Key<Size> |
STILL_SIZE
Size of still input.
|
static SCameraProcessorParameter.Key<Size[]> |
STILL_SIZE_LIST
List of available still input size.
|
static SCameraProcessorParameter.Key<Size> |
STREAM_SIZE
Stream input size.
|
static SCameraProcessorParameter.Key<Size[]> |
STREAM_SIZE_LIST
List of available stream input size.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this SCameraProcessor.
|
abstract void |
deinitialize()
Deinitialize SCameraProcessor.
|
abstract SCameraProcessorParameter |
getParameters()
Returns the current settings for this processor.
|
abstract void |
initialize()
Initialize the processor.
|
abstract void |
setParameters(SCameraProcessorParameter params)
Changes the settings for this processor.
|
public static final SCameraProcessorParameter.Key<Integer> STILL_INPUT_FORMAT
Image
data given to requestProcess()
or requestMultiProcess()
Should be one of STILL_INPUT_FORMAT_LIST
.public static final SCameraProcessorParameter.Key<int[]> STILL_INPUT_FORMAT_LIST
This key is read-only key.
public static final SCameraProcessorParameter.Key<Integer> STILL_OUTPUT_FORMAT
Image
processed by requestProcess()
or requestMultiProcess()
will be created with this output format.
Should be one of STILL_OUTPUT_FORMAT_LIST
public static final SCameraProcessorParameter.Key<int[]> STILL_OUTPUT_FORMAT_LIST
This key is read-only key.
public static final SCameraProcessorParameter.Key<Size> STILL_SIZE
Image
data given to requestProcess()
or requestMultiProcess()
.
Size
should be one of STILL_SIZE_LIST
public static final SCameraProcessorParameter.Key<Size[]> STILL_SIZE_LIST
STILL_SIZE
will return.
This key is read-only key.
public static final SCameraProcessorParameter.Key<Size> STREAM_SIZE
Stream input size. Identify the dimension of input stream. (c.f., startStreamProcessing()
, stopStreamProcessing()
)
Note:As of the android API level 22, if the Surface dimension is not set to a supported size, it will be rounded to a supported size less than 1080p by camera device. In other words, if the stream input size is not set to a supported size of a camera device, the actual input stream data to a SCameraProcessor will have different dimension that is configured through this key value. This will result an processing error.
Surface
returned from getInputSurface() will have a dimension of this value.
Size
should be one of STREAM_SIZE_LIST
public static final SCameraProcessorParameter.Key<Size[]> STREAM_SIZE_LIST
STREAM_SIZE
will return.
This key is read-only key.
public static final SCameraProcessorParameter.Key<Integer> JPEG_QUALITY
STILL_OUTPUT_FORMAT
is jpeg then result will be encoded with this quality value. Range of (1~100) is vaild.
If STILL_OUTPUT_FORMAT
is jpeg, then the result jpeg image will be encoded with this jpeg quality value.public static final SCameraProcessorParameter.Key<Integer> CAMERA_ID
public static final SCameraProcessorParameter.Key<Range<Integer>> MULTI_INPUT_COUNT_RANGE
requestMultiProcess()
will only accept the List<Image>
with sizes within range of this key's value.
This key is read-only key.
public static final int NATIVE_PROCESSOR_MSG_UNKNOWN_ERROR
public static final int NATIVE_PROCESSOR_MSG_DECODING_FAIL
public static final int NATIVE_PROCESSOR_MSG_ENCODING_FAIL
public static final int NATIVE_PROCESSOR_MSG_PROCESSING_FAIL
public abstract void initialize()
available key
will be used as 'initialization parameter'.
After initialization, the 'initialization key' cannot be changed via setParameters(SCameraProcessorParameter)
.
To change 'initialization key', you must call deinitialize()
first and then change parameters with setParameters(SCameraProcessorParameter)
.IllegalStateException
- If initialize()
is called.public abstract void deinitialize()
IllegalStateException
- If initialize()
is not called.public abstract SCameraProcessorParameter getParameters()
setParameters(SCameraProcessorParameter)
to take effect.setParameters(SCameraProcessorParameter)
public abstract void setParameters(SCameraProcessorParameter params)
params
- the Parameters to be used for this processorIllegalArgumentException
- If given SCameraProcessorParameter is null or invalid.RuntimeException
- If any key/value parameter is invalid or 'initialization key' is changed after initialize()
.getParameters()
public void close()
Closing a SCameraProcessor frees up the any native resource related. Unlike the deinitialize()
, once a SCameraProcessor is closed,
SCameraProcessor no longer be able to use and all methods on it will throw an IllegalStateException.
Note that creating a new SCameraProcessor via SCameraProcessorManager.createProcessor(com.samsung.android.sdk.camera.processor.SCameraProcessorManager.ProcessorType)
will close
any existing SCameraProcessor instance.
Copyright © Samsung Electronics, Co., Ltd. All rights reserved.