Search in sources :

Example 1 with CaptureResultExtras

use of android.hardware.camera2.impl.CaptureResultExtras in project android_frameworks_base by DirtyUnicorns.

the class LegacyCameraDevice method getExtrasFromRequest.

private CaptureResultExtras getExtrasFromRequest(RequestHolder holder, int errorCode, Object errorArg) {
    int errorStreamId = -1;
    if (errorCode == CameraDeviceImpl.CameraDeviceCallbacks.ERROR_CAMERA_BUFFER) {
        Surface errorTarget = (Surface) errorArg;
        int indexOfTarget = mConfiguredSurfaces.indexOfValue(errorTarget);
        if (indexOfTarget < 0) {
            Log.e(TAG, "Buffer drop error reported for unknown Surface");
        } else {
            errorStreamId = mConfiguredSurfaces.keyAt(indexOfTarget);
        }
    }
    if (holder == null) {
        return new CaptureResultExtras(ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE);
    }
    return new CaptureResultExtras(holder.getRequestId(), holder.getSubsequeceId(), /*afTriggerId*/
    0, /*precaptureTriggerId*/
    0, holder.getFrameNumber(), /*partialResultCount*/
    1, errorStreamId);
}
Also used : CaptureResultExtras(android.hardware.camera2.impl.CaptureResultExtras) Surface(android.view.Surface)

Example 2 with CaptureResultExtras

use of android.hardware.camera2.impl.CaptureResultExtras in project android_frameworks_base by ResurrectionRemix.

the class LegacyCameraDevice method getExtrasFromRequest.

private CaptureResultExtras getExtrasFromRequest(RequestHolder holder, int errorCode, Object errorArg) {
    int errorStreamId = -1;
    if (errorCode == CameraDeviceImpl.CameraDeviceCallbacks.ERROR_CAMERA_BUFFER) {
        Surface errorTarget = (Surface) errorArg;
        int indexOfTarget = mConfiguredSurfaces.indexOfValue(errorTarget);
        if (indexOfTarget < 0) {
            Log.e(TAG, "Buffer drop error reported for unknown Surface");
        } else {
            errorStreamId = mConfiguredSurfaces.keyAt(indexOfTarget);
        }
    }
    if (holder == null) {
        return new CaptureResultExtras(ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE);
    }
    return new CaptureResultExtras(holder.getRequestId(), holder.getSubsequeceId(), /*afTriggerId*/
    0, /*precaptureTriggerId*/
    0, holder.getFrameNumber(), /*partialResultCount*/
    1, errorStreamId);
}
Also used : CaptureResultExtras(android.hardware.camera2.impl.CaptureResultExtras) Surface(android.view.Surface)

Example 3 with CaptureResultExtras

use of android.hardware.camera2.impl.CaptureResultExtras in project android_frameworks_base by crdroidandroid.

the class LegacyCameraDevice method getExtrasFromRequest.

private CaptureResultExtras getExtrasFromRequest(RequestHolder holder, int errorCode, Object errorArg) {
    int errorStreamId = -1;
    if (errorCode == CameraDeviceImpl.CameraDeviceCallbacks.ERROR_CAMERA_BUFFER) {
        Surface errorTarget = (Surface) errorArg;
        int indexOfTarget = mConfiguredSurfaces.indexOfValue(errorTarget);
        if (indexOfTarget < 0) {
            Log.e(TAG, "Buffer drop error reported for unknown Surface");
        } else {
            errorStreamId = mConfiguredSurfaces.keyAt(indexOfTarget);
        }
    }
    if (holder == null) {
        return new CaptureResultExtras(ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE);
    }
    return new CaptureResultExtras(holder.getRequestId(), holder.getSubsequeceId(), /*afTriggerId*/
    0, /*precaptureTriggerId*/
    0, holder.getFrameNumber(), /*partialResultCount*/
    1, errorStreamId);
}
Also used : CaptureResultExtras(android.hardware.camera2.impl.CaptureResultExtras) Surface(android.view.Surface)

Example 4 with CaptureResultExtras

use of android.hardware.camera2.impl.CaptureResultExtras in project platform_frameworks_base by android.

the class LegacyCameraDevice method getExtrasFromRequest.

private CaptureResultExtras getExtrasFromRequest(RequestHolder holder, int errorCode, Object errorArg) {
    int errorStreamId = -1;
    if (errorCode == CameraDeviceImpl.CameraDeviceCallbacks.ERROR_CAMERA_BUFFER) {
        Surface errorTarget = (Surface) errorArg;
        int indexOfTarget = mConfiguredSurfaces.indexOfValue(errorTarget);
        if (indexOfTarget < 0) {
            Log.e(TAG, "Buffer drop error reported for unknown Surface");
        } else {
            errorStreamId = mConfiguredSurfaces.keyAt(indexOfTarget);
        }
    }
    if (holder == null) {
        return new CaptureResultExtras(ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE);
    }
    return new CaptureResultExtras(holder.getRequestId(), holder.getSubsequeceId(), /*afTriggerId*/
    0, /*precaptureTriggerId*/
    0, holder.getFrameNumber(), /*partialResultCount*/
    1, errorStreamId);
}
Also used : CaptureResultExtras(android.hardware.camera2.impl.CaptureResultExtras) Surface(android.view.Surface)

Example 5 with CaptureResultExtras

use of android.hardware.camera2.impl.CaptureResultExtras in project android_frameworks_base by AOSPA.

the class LegacyCameraDevice method getExtrasFromRequest.

private CaptureResultExtras getExtrasFromRequest(RequestHolder holder, int errorCode, Object errorArg) {
    int errorStreamId = -1;
    if (errorCode == CameraDeviceImpl.CameraDeviceCallbacks.ERROR_CAMERA_BUFFER) {
        Surface errorTarget = (Surface) errorArg;
        int indexOfTarget = mConfiguredSurfaces.indexOfValue(errorTarget);
        if (indexOfTarget < 0) {
            Log.e(TAG, "Buffer drop error reported for unknown Surface");
        } else {
            errorStreamId = mConfiguredSurfaces.keyAt(indexOfTarget);
        }
    }
    if (holder == null) {
        return new CaptureResultExtras(ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE);
    }
    return new CaptureResultExtras(holder.getRequestId(), holder.getSubsequeceId(), /*afTriggerId*/
    0, /*precaptureTriggerId*/
    0, holder.getFrameNumber(), /*partialResultCount*/
    1, errorStreamId);
}
Also used : CaptureResultExtras(android.hardware.camera2.impl.CaptureResultExtras) Surface(android.view.Surface)

Aggregations

CaptureResultExtras (android.hardware.camera2.impl.CaptureResultExtras)5 Surface (android.view.Surface)5