Java Code Examples for android.hardware.camera2.CameraMetadata#LENS_FACING_BACK
The following examples show how to use
android.hardware.camera2.CameraMetadata#LENS_FACING_BACK .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Camera2Enumerator.java From webrtc_android with MIT License | 5 votes |
@Override public boolean isBackFacing(String deviceName) { CameraCharacteristics characteristics = getCameraCharacteristics(deviceName); return characteristics != null && characteristics.get(CameraCharacteristics.LENS_FACING) == CameraMetadata.LENS_FACING_BACK; }
Example 2
Source File: CameraDirectionProvider.java From Camera2 with Apache License 2.0 | 5 votes |
public OneCamera.Facing getDirection() { switch (mCharacteristics.get(CameraCharacteristics.LENS_FACING)) { case CameraMetadata.LENS_FACING_BACK: return OneCamera.Facing.BACK; case CameraMetadata.LENS_FACING_FRONT: return OneCamera.Facing.FRONT; } return OneCamera.Facing.BACK; }
Example 3
Source File: Camera2Enumerator.java From VideoCRE with MIT License | 5 votes |
@Override public boolean isBackFacing(String deviceName) { CameraCharacteristics characteristics = getCameraCharacteristics(deviceName); return characteristics != null && characteristics.get(CameraCharacteristics.LENS_FACING) == CameraMetadata.LENS_FACING_BACK; }
Example 4
Source File: Camera2ApiManager.java From rtmp-rtsp-stream-client-java with Apache License 2.0 | 4 votes |
private static int getFacing(CameraHelper.Facing facing) { return facing == CameraHelper.Facing.BACK ? CameraMetadata.LENS_FACING_BACK : CameraMetadata.LENS_FACING_FRONT; }