JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker Class Reference
Inheritance diagram for CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker:
Collaboration diagram for CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker:

Public Member Functions

 StillPictureTaker (GlobalRef &captureSessionToUse, GlobalRef &captureRequestBuilderToUse, GlobalRef &previewCaptureRequestToUse, GlobalRef &handlerToUse, int autoFocusModeToUse)
 
void takePicture (const LocalRef< jobject > &stillPictureCaptureRequestToUse)
 

Private Types

enum  State {
  State::idle = 0,
  State::pendingFocusLock,
  State::pendingExposurePrecapture,
  State::pendingExposurePostPrecapture,
  State::pictureTaken
}
 

Private Member Functions

void cameraCaptureSessionCaptureCompleted (bool isPreview, jobject session, jobject request, jobject result)
 
void cameraCaptureSessionCaptureFailed (bool isPreview, jobject session, jobject request, jobject failure)
 
void cameraCaptureSessionCaptureProgressed (bool isPreview, jobject session, jobject request, jobject partialResult)
 
void cameraCaptureSessionCaptureSequenceAborted (bool isPreview, jobject session, int sequenceId)
 
void cameraCaptureSessionCaptureSequenceCompleted (bool isPreview, jobject session, int sequenceId, int64 frameNumber)
 
void cameraCaptureSessionCaptureStarted (bool isPreview, jobject session, jobject request, int64 timestamp, int64 frameNumber)
 
void captureStillPicture ()
 
void captureStillPictureDelayed ()
 
LocalRef< jobject > createCaptureSessionCallback (bool createPreviewSession)
 
void lockFocus ()
 
void run () override
 
void runPrecaptureSequence ()
 
void unlockFocus ()
 
void updateState (jobject captureResult)
 

Static Private Member Functions

static bool autoFocusHasFinished (const LocalRef< jobject > &controlAfStateValue)
 
static void cameraCaptureSessionCaptureCompletedCallback (JNIEnv *, jobject, jlong host, jboolean isPreview, jobject rawSession, jobject rawRequest, jobject rawResult)
 
static void cameraCaptureSessionCaptureFailedCallback (JNIEnv *, jobject, jlong host, jboolean isPreview, jobject rawSession, jobject rawRequest, jobject rawResult)
 
static void cameraCaptureSessionCaptureProgressedCallback (JNIEnv *, jobject, jlong host, jboolean isPreview, jobject rawSession, jobject rawRequest, jobject rawResult)
 
static void cameraCaptureSessionCaptureSequenceAbortedCallback (JNIEnv *, jobject, jlong host, jboolean isPreview, jobject rawSession, jint sequenceId)
 
static void cameraCaptureSessionCaptureSequenceCompletedCallback (JNIEnv *, jobject, jlong host, jboolean isPreview, jobject rawSession, jint sequenceId, jlong frameNumber)
 
static void cameraCaptureSessionCaptureStartedCallback (JNIEnv *, jobject, jlong host, jboolean isPreview, jobject rawSession, jobject rawRequest, jlong timestamp, jlong frameNumber)
 
static LocalRef< jobject > getCaptureResultIntegerKeyValue (jfieldID key, jobject captureResult)
 
static int getControlAEState (jobject captureResult)
 

Private Attributes

int autoFocusMode
 
GlobalRef & captureRequestBuilder
 
GlobalRef & captureSession
 
GlobalRef captureSessionPreviewCaptureCallback
 
GlobalRef captureSessionStillPictureCaptureCallback
 
State currentState = State::idle
 
GlobalRef delayedCaptureRunnable
 
GlobalRef & handler
 
GlobalRef & previewCaptureRequest
 
AndroidRunnable runnable
 
GlobalRef stillPictureCaptureRequest
 

Member Enumeration Documentation

◆ State

Enumerator
idle 
pendingFocusLock 
pendingExposurePrecapture 
pendingExposurePostPrecapture 
pictureTaken 

Constructor & Destructor Documentation

◆ StillPictureTaker()

CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::StillPictureTaker ( GlobalRef &  captureSessionToUse,
GlobalRef &  captureRequestBuilderToUse,
GlobalRef &  previewCaptureRequestToUse,
GlobalRef &  handlerToUse,
int  autoFocusModeToUse 
)
inline

Member Function Documentation

◆ autoFocusHasFinished()

static bool CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::autoFocusHasFinished ( const LocalRef< jobject > &  controlAfStateValue)
inlinestaticprivate

References juce::getEnv().

Referenced by updateState().

◆ cameraCaptureSessionCaptureCompleted()

void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureCompleted ( bool  isPreview,
jobject  session,
jobject  request,
jobject  result 
)
inlineprivate

◆ cameraCaptureSessionCaptureCompletedCallback()

static void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureCompletedCallback ( JNIEnv *  ,
jobject  ,
jlong  host,
jboolean  isPreview,
jobject  rawSession,
jobject  rawRequest,
jobject  rawResult 
)
inlinestaticprivate

◆ cameraCaptureSessionCaptureFailed()

void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureFailed ( bool  isPreview,
jobject  session,
jobject  request,
jobject  failure 
)
inlineprivate

◆ cameraCaptureSessionCaptureFailedCallback()

static void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureFailedCallback ( JNIEnv *  ,
jobject  ,
jlong  host,
jboolean  isPreview,
jobject  rawSession,
jobject  rawRequest,
jobject  rawResult 
)
inlinestaticprivate

◆ cameraCaptureSessionCaptureProgressed()

void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureProgressed ( bool  isPreview,
jobject  session,
jobject  request,
jobject  partialResult 
)
inlineprivate

◆ cameraCaptureSessionCaptureProgressedCallback()

static void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureProgressedCallback ( JNIEnv *  ,
jobject  ,
jlong  host,
jboolean  isPreview,
jobject  rawSession,
jobject  rawRequest,
jobject  rawResult 
)
inlinestaticprivate

◆ cameraCaptureSessionCaptureSequenceAborted()

void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureSequenceAborted ( bool  isPreview,
jobject  session,
int  sequenceId 
)
inlineprivate

◆ cameraCaptureSessionCaptureSequenceAbortedCallback()

static void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureSequenceAbortedCallback ( JNIEnv *  ,
jobject  ,
jlong  host,
jboolean  isPreview,
jobject  rawSession,
jint  sequenceId 
)
inlinestaticprivate

◆ cameraCaptureSessionCaptureSequenceCompleted()

void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureSequenceCompleted ( bool  isPreview,
jobject  session,
int  sequenceId,
int64  frameNumber 
)
inlineprivate

◆ cameraCaptureSessionCaptureSequenceCompletedCallback()

static void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureSequenceCompletedCallback ( JNIEnv *  ,
jobject  ,
jlong  host,
jboolean  isPreview,
jobject  rawSession,
jint  sequenceId,
jlong  frameNumber 
)
inlinestaticprivate

◆ cameraCaptureSessionCaptureStarted()

void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureStarted ( bool  isPreview,
jobject  session,
jobject  request,
int64  timestamp,
int64  frameNumber 
)
inlineprivate

◆ cameraCaptureSessionCaptureStartedCallback()

static void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureStartedCallback ( JNIEnv *  ,
jobject  ,
jlong  host,
jboolean  isPreview,
jobject  rawSession,
jobject  rawRequest,
jlong  timestamp,
jlong  frameNumber 
)
inlinestaticprivate

◆ captureStillPicture()

void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::captureStillPicture ( )
inlineprivate

◆ captureStillPictureDelayed()

void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::captureStillPictureDelayed ( )
inlineprivate

◆ createCaptureSessionCallback()

LocalRef<jobject> CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::createCaptureSessionCallback ( bool  createPreviewSession)
inlineprivate

References juce::getEnv().

◆ getCaptureResultIntegerKeyValue()

static LocalRef<jobject> CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::getCaptureResultIntegerKeyValue ( jfieldID  key,
jobject  captureResult 
)
inlinestaticprivate

References juce::getEnv(), and juce::gl::key.

Referenced by getControlAEState(), and updateState().

◆ getControlAEState()

static int CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::getControlAEState ( jobject  captureResult)
inlinestaticprivate

◆ lockFocus()

◆ run()

void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::run ( )
inlineoverrideprivatevirtual

◆ runPrecaptureSequence()

◆ takePicture()

void CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::takePicture ( const LocalRef< jobject > &  stillPictureCaptureRequestToUse)
inline

◆ unlockFocus()

◆ updateState()

Member Data Documentation

◆ autoFocusMode

int CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::autoFocusMode
private

Referenced by updateState().

◆ captureRequestBuilder

GlobalRef& CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::captureRequestBuilder
private

◆ captureSession

GlobalRef& CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::captureSession
private

◆ captureSessionPreviewCaptureCallback

GlobalRef CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::captureSessionPreviewCaptureCallback
private

Referenced by lockFocus(), and runPrecaptureSequence().

◆ captureSessionStillPictureCaptureCallback

GlobalRef CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::captureSessionStillPictureCaptureCallback
private

Referenced by captureStillPicture().

◆ currentState

State CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::currentState = State::idle
private

◆ delayedCaptureRunnable

GlobalRef CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::delayedCaptureRunnable
private

◆ handler

GlobalRef& CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::handler
private

◆ previewCaptureRequest

GlobalRef& CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::previewCaptureRequest
private

Referenced by unlockFocus().

◆ runnable

AndroidRunnable CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::runnable
private

◆ stillPictureCaptureRequest

GlobalRef CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::stillPictureCaptureRequest
private

Referenced by captureStillPicture(), and takePicture().


The documentation for this class was generated from the following file: