mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-12-01 10:13:24 +01:00
136 lines
6 KiB
Java
136 lines
6 KiB
Java
package androidx.camera.camera2.internal;
|
|
|
|
import android.hardware.camera2.CameraAccessException;
|
|
import android.hardware.camera2.CameraCaptureSession;
|
|
import android.hardware.camera2.CameraDevice;
|
|
import android.hardware.camera2.CaptureRequest;
|
|
import android.os.Handler;
|
|
import android.view.Surface;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.annotation.RequiresApi;
|
|
import androidx.camera.camera2.internal.compat.CameraCaptureSessionCompat;
|
|
import androidx.camera.camera2.internal.compat.params.OutputConfigurationCompat;
|
|
import androidx.camera.camera2.internal.compat.params.SessionConfigurationCompat;
|
|
import androidx.camera.core.impl.DeferrableSurface;
|
|
import androidx.camera.core.impl.Quirks;
|
|
import com.google.common.util.concurrent.ListenableFuture;
|
|
import java.util.List;
|
|
import java.util.concurrent.Executor;
|
|
import java.util.concurrent.ScheduledExecutorService;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes.dex */
|
|
public interface SynchronizedCaptureSession {
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public interface Opener {
|
|
@NonNull
|
|
SessionConfigurationCompat createSessionConfigurationCompat(int i, @NonNull List<OutputConfigurationCompat> list, @NonNull StateCallback stateCallback);
|
|
|
|
@NonNull
|
|
Executor getExecutor();
|
|
|
|
@NonNull
|
|
ListenableFuture<Void> openCaptureSession(@NonNull CameraDevice cameraDevice, @NonNull SessionConfigurationCompat sessionConfigurationCompat, @NonNull List<DeferrableSurface> list);
|
|
|
|
@NonNull
|
|
ListenableFuture<List<Surface>> startWithDeferrableSurface(@NonNull List<DeferrableSurface> list, long j);
|
|
|
|
boolean stop();
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public static class OpenerBuilder {
|
|
private final Quirks mCameraQuirks;
|
|
private final CaptureSessionRepository mCaptureSessionRepository;
|
|
private final Handler mCompatHandler;
|
|
private final Quirks mDeviceQuirks;
|
|
private final Executor mExecutor;
|
|
private final ScheduledExecutorService mScheduledExecutorService;
|
|
|
|
public OpenerBuilder(@NonNull Executor executor, @NonNull ScheduledExecutorService scheduledExecutorService, @NonNull Handler handler, @NonNull CaptureSessionRepository captureSessionRepository, @NonNull Quirks quirks, @NonNull Quirks quirks2) {
|
|
this.mExecutor = executor;
|
|
this.mScheduledExecutorService = scheduledExecutorService;
|
|
this.mCompatHandler = handler;
|
|
this.mCaptureSessionRepository = captureSessionRepository;
|
|
this.mCameraQuirks = quirks;
|
|
this.mDeviceQuirks = quirks2;
|
|
}
|
|
|
|
@NonNull
|
|
public Opener build() {
|
|
return new SynchronizedCaptureSessionImpl(this.mCameraQuirks, this.mDeviceQuirks, this.mCaptureSessionRepository, this.mExecutor, this.mScheduledExecutorService, this.mCompatHandler);
|
|
}
|
|
}
|
|
|
|
void abortCaptures() throws CameraAccessException;
|
|
|
|
int captureBurstRequests(@NonNull List<CaptureRequest> list, @NonNull CameraCaptureSession.CaptureCallback captureCallback) throws CameraAccessException;
|
|
|
|
int captureBurstRequests(@NonNull List<CaptureRequest> list, @NonNull Executor executor, @NonNull CameraCaptureSession.CaptureCallback captureCallback) throws CameraAccessException;
|
|
|
|
int captureSingleRequest(@NonNull CaptureRequest captureRequest, @NonNull CameraCaptureSession.CaptureCallback captureCallback) throws CameraAccessException;
|
|
|
|
int captureSingleRequest(@NonNull CaptureRequest captureRequest, @NonNull Executor executor, @NonNull CameraCaptureSession.CaptureCallback captureCallback) throws CameraAccessException;
|
|
|
|
void close();
|
|
|
|
void finishClose();
|
|
|
|
@NonNull
|
|
CameraDevice getDevice();
|
|
|
|
@Nullable
|
|
Surface getInputSurface();
|
|
|
|
@NonNull
|
|
ListenableFuture<Void> getOpeningBlocker();
|
|
|
|
@NonNull
|
|
StateCallback getStateCallback();
|
|
|
|
void onCameraDeviceError(int i);
|
|
|
|
int setRepeatingBurstRequests(@NonNull List<CaptureRequest> list, @NonNull CameraCaptureSession.CaptureCallback captureCallback) throws CameraAccessException;
|
|
|
|
int setRepeatingBurstRequests(@NonNull List<CaptureRequest> list, @NonNull Executor executor, @NonNull CameraCaptureSession.CaptureCallback captureCallback) throws CameraAccessException;
|
|
|
|
int setSingleRepeatingRequest(@NonNull CaptureRequest captureRequest, @NonNull CameraCaptureSession.CaptureCallback captureCallback) throws CameraAccessException;
|
|
|
|
int setSingleRepeatingRequest(@NonNull CaptureRequest captureRequest, @NonNull Executor executor, @NonNull CameraCaptureSession.CaptureCallback captureCallback) throws CameraAccessException;
|
|
|
|
void stopRepeating() throws CameraAccessException;
|
|
|
|
@NonNull
|
|
CameraCaptureSessionCompat toCameraCaptureSessionCompat();
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public static abstract class StateCallback {
|
|
public void onActive(@NonNull SynchronizedCaptureSession synchronizedCaptureSession) {
|
|
}
|
|
|
|
@RequiresApi(api = 26)
|
|
public void onCaptureQueueEmpty(@NonNull SynchronizedCaptureSession synchronizedCaptureSession) {
|
|
}
|
|
|
|
public void onClosed(@NonNull SynchronizedCaptureSession synchronizedCaptureSession) {
|
|
}
|
|
|
|
public void onConfigureFailed(@NonNull SynchronizedCaptureSession synchronizedCaptureSession) {
|
|
}
|
|
|
|
public void onConfigured(@NonNull SynchronizedCaptureSession synchronizedCaptureSession) {
|
|
}
|
|
|
|
public void onReady(@NonNull SynchronizedCaptureSession synchronizedCaptureSession) {
|
|
}
|
|
|
|
public void onSessionFinished(@NonNull SynchronizedCaptureSession synchronizedCaptureSession) {
|
|
}
|
|
|
|
@RequiresApi(api = 23)
|
|
public void onSurfacePrepared(@NonNull SynchronizedCaptureSession synchronizedCaptureSession, @NonNull Surface surface) {
|
|
}
|
|
}
|
|
}
|