Java Code Examples for android.hardware.camera2.CaptureResult#Key
The following examples show how to use
android.hardware.camera2.CaptureResult#Key .
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: LegacyMetadataMapper.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
private static int[] getTagsForKeys(CaptureResult.Key<?>[] keys) { int[] tags = new int[keys.length]; for (int i = 0; i < keys.length; ++i) { tags[i] = keys[i].getNativeKey().getTag(); } return tags; }
Example 2
Source File: CameraMetadataNative.java From android_9.0.0_r45 with Apache License 2.0 | 5 votes |
/** * Compare this key against other native keys, request keys, result keys, and * characteristics keys. * * <p>Two keys are considered equal if their name and type reference are equal.</p> * * <p>Note that the equality against non-native keys is one-way. A native key may be equal * to a result key; but that same result key will not be equal to a native key.</p> */ @SuppressWarnings("rawtypes") @Override public final boolean equals(Object o) { if (this == o) { return true; } if (o == null || this.hashCode() != o.hashCode()) { return false; } Key<?> lhs; if (o instanceof CaptureResult.Key) { lhs = ((CaptureResult.Key)o).getNativeKey(); } else if (o instanceof CaptureRequest.Key) { lhs = ((CaptureRequest.Key)o).getNativeKey(); } else if (o instanceof CameraCharacteristics.Key) { lhs = ((CameraCharacteristics.Key)o).getNativeKey(); } else if ((o instanceof Key)) { lhs = (Key<?>)o; } else { return false; } return mName.equals(lhs.mName) && mTypeReference.equals(lhs.mTypeReference); }
Example 3
Source File: AutoFlashZslImageFilter.java From Camera2 with Apache License 2.0 | 5 votes |
@Nullable @Override public <T> T get(CaptureResult.Key<T> key) { if (key == TotalCaptureResult.CONTROL_AE_STATE) { Integer aeState = (Integer) mDelegate.get(key); if (Objects.equal(aeState, CaptureResult.CONTROL_AE_STATE_SEARCHING)) { return (T) ((Integer) CaptureResult.CONTROL_AE_STATE_CONVERGED); } } return mDelegate.get(key); }
Example 4
Source File: CameraMetadataNative.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
/** * @hide */ public <T> T get(CaptureResult.Key<T> key) { return get(key.getNativeKey()); }
Example 5
Source File: CameraMetadataNative.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
public <T> void set(CaptureResult.Key<T> key, T value) { set(key.getNativeKey(), value); }
Example 6
Source File: CameraMetadataNative.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
private <T> T getBase(CaptureResult.Key<T> key) { return getBase(key.getNativeKey()); }
Example 7
Source File: CameraMetadataNative.java From android_9.0.0_r45 with Apache License 2.0 | 4 votes |
private <T> void setBase(CaptureResult.Key<T> key, T value) { setBase(key.getNativeKey(), value); }
Example 8
Source File: AutoFlashZslImageFilter.java From Camera2 with Apache License 2.0 | 4 votes |
@Nonnull @Override public List<CaptureResult.Key<?>> getKeys() { return mDelegate.getKeys(); }
Example 9
Source File: MetadataResponseListener.java From Camera2 with Apache License 2.0 | 4 votes |
/** * @param key The key associated with the value for which to listen to * changes. */ public MetadataResponseListener(CaptureResult.Key<V> key, Updatable<V> updatable) { mKey = key; mUpdatable = updatable; }
Example 10
Source File: CaptureResultProxy.java From Camera2 with Apache License 2.0 | 4 votes |
@Nullable public <T> T get(CaptureResult.Key<T> key);
Example 11
Source File: CaptureResultProxy.java From Camera2 with Apache License 2.0 | 4 votes |
@Nonnull public List<CaptureResult.Key<?>> getKeys();
Example 12
Source File: AndroidCaptureResultProxy.java From Camera2 with Apache License 2.0 | 4 votes |
@Nullable public <T> T get(CaptureResult.Key<T> key) { return mCaptureResult.get(key); }
Example 13
Source File: AndroidCaptureResultProxy.java From Camera2 with Apache License 2.0 | 4 votes |
@Nonnull public List<CaptureResult.Key<?>> getKeys() { return mCaptureResult.getKeys(); }