use of android.hardware.Camera.CameraInfo in project android-gpuimage by CyberAgent.
the class CameraHelperGB method getCameraInfo.
@Override
public void getCameraInfo(final int cameraId, final CameraInfo2 cameraInfo) {
CameraInfo info = new CameraInfo();
Camera.getCameraInfo(cameraId, info);
cameraInfo.facing = info.facing;
cameraInfo.orientation = info.orientation;
}
use of android.hardware.Camera.CameraInfo in project android-gpuimage by CyberAgent.
the class CameraHelperGB method getCameraId.
private int getCameraId(final int facing) {
int numberOfCameras = Camera.getNumberOfCameras();
CameraInfo info = new CameraInfo();
for (int id = 0; id < numberOfCameras; id++) {
Camera.getCameraInfo(id, info);
if (info.facing == facing) {
return id;
}
}
return -1;
}
use of android.hardware.Camera.CameraInfo in project StickerCamera by Skykai521.
the class CameraHelperGB method getCameraInfo.
@Override
public void getCameraInfo(final int cameraId, final CameraInfo2 cameraInfo) {
CameraInfo info = new CameraInfo();
Camera.getCameraInfo(cameraId, info);
cameraInfo.facing = info.facing;
cameraInfo.orientation = info.orientation;
}
use of android.hardware.Camera.CameraInfo in project StickerCamera by Skykai521.
the class CameraHelperGB method getCameraId.
private int getCameraId(final int facing) {
int numberOfCameras = Camera.getNumberOfCameras();
CameraInfo info = new CameraInfo();
for (int id = 0; id < numberOfCameras; id++) {
Camera.getCameraInfo(id, info);
if (info.facing == facing) {
return id;
}
}
return -1;
}
use of android.hardware.Camera.CameraInfo in project platform_frameworks_base by android.
the class CameraStreamer method getDefaultFacing.
/**
* Returns the camera facing that is chosen when DONT_CARE is specified.
* Returns 0 if neither a front nor back camera could be found.
*/
public static int getDefaultFacing() {
int camCount = Camera.getNumberOfCameras();
if (camCount == 0) {
return 0;
} else {
CameraInfo cameraInfo = new CameraInfo();
Camera.getCameraInfo(0, cameraInfo);
return (cameraInfo.facing == CameraInfo.CAMERA_FACING_FRONT) ? FACING_FRONT : FACING_BACK;
}
}
Aggregations