public MyCameraCallback(Surface surface, CameraPreviewView cameraPreviewView) { _surface = surface; _cameraPreviewView = cameraPreviewView; _reader = ImageReader.NewInstance(800, 450, ImageFormatType.Jpeg, 1); var stillImageListener = new StillImageListener(cameraPreviewView); HandlerThread handlerThread = new HandlerThread("CameraWorker"); handlerThread.Start(); _reader.SetOnImageAvailableListener(stillImageListener, new Handler(handlerThread.Looper)); }
public PreviewCallback(CameraPreviewView cameraPreviewView, ImageReader reader) { _reader = reader; //_stillImageListener = new StillImageListener(cameraPreviewView); //HandlerThread handlerThread = new HandlerThread("CameraWorker"); //handlerThread.Start(); //_reader.SetOnImageAvailableListener(_stillImageListener, new Handler(handlerThread.Looper)); _emptyCaptureCallback = new EmptyCaptureCallback(); Handler handler = new Handler(Looper.MainLooper); //_timer.Elapsed += (_, __) => handler.Post(TakePicture); }
public StillImageListener(CameraPreviewView cameraPreviewView) { _cameraPreviewView = cameraPreviewView; }
public MySessionCallback(CaptureRequest captureRequest, CameraPreviewView cameraPreviewView, ImageReader reader) { _captureRequest = captureRequest; _cameraPreviewView = cameraPreviewView; _reader = reader; }