JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
CameraDevice::Pimpl::ImageReader Class Reference
Inheritance diagram for CameraDevice::Pimpl::ImageReader:
Collaboration diagram for CameraDevice::Pimpl::ImageReader:

Classes

struct  ImageBuffer
 

Public Member Functions

 ImageReader (Pimpl &ownerToUse, GlobalRef &handlerToUse, int imageWidth, int imageHeight, int cameraSensorOrientationToUse)
 
 ~ImageReader ()
 
LocalRef< jobject > getSurface () const
 
void resetNotificationFlag ()
 

Private Member Functions

void onImageAvailable (LocalRef< jobject > &) override
 

Static Private Member Functions

static Image androidImageToJuceWithFixedOrientation (const LocalRef< jobject > &androidImage, Desktop::DisplayOrientation deviceOrientationFromAccelerometerSensor, Desktop::DisplayOrientation targetOrientation, bool cameraLensFrontFacing, int cameraSensorOrientation)
 
static LocalRef< jobject > getBitmapWithCorrectOrientationFrom (LocalRef< jobject > &origBitmap, int rotationAngle)
 
static ImageBuffer getImageBufferWithCorrectedOrientationFrom (const LocalRef< jobject > &imagePlaneBuffer, Desktop::DisplayOrientation deviceOrientationFromAccelerometerSensor, Desktop::DisplayOrientation targetOrientation, bool cameraLensFrontFacing, int cameraSensorOrientation)
 
static int getRotationAngle (Desktop::DisplayOrientation deviceOrientationFromAccelerometerSensor, Desktop::DisplayOrientation targetOrientation, bool cameraLensFrontFacing, int cameraSensorOrientation)
 

Private Attributes

int cameraSensorOrientation
 
Atomic< inthasNotifiedListeners { 0 }
 
GlobalRef imageReader
 
ImageReaderOnImageAvailableListener onImageAvailableListener
 
Pimplowner
 

Static Private Attributes

static constexpr int numImagesToKeep = 2
 

Constructor & Destructor Documentation

◆ ImageReader()

CameraDevice::Pimpl::ImageReader::ImageReader ( Pimpl ownerToUse,
GlobalRef &  handlerToUse,
int  imageWidth,
int  imageHeight,
int  cameraSensorOrientationToUse 
)
inline

◆ ~ImageReader()

CameraDevice::Pimpl::ImageReader::~ImageReader ( )
inline

References juce::getEnv().

Member Function Documentation

◆ androidImageToJuceWithFixedOrientation()

static Image CameraDevice::Pimpl::ImageReader::androidImageToJuceWithFixedOrientation ( const LocalRef< jobject > &  androidImage,
Desktop::DisplayOrientation  deviceOrientationFromAccelerometerSensor,
Desktop::DisplayOrientation  targetOrientation,
bool  cameraLensFrontFacing,
int  cameraSensorOrientation 
)
inlinestaticprivate

References juce::getEnv(), and jassert.

◆ getBitmapWithCorrectOrientationFrom()

static LocalRef<jobject> CameraDevice::Pimpl::ImageReader::getBitmapWithCorrectOrientationFrom ( LocalRef< jobject > &  origBitmap,
int  rotationAngle 
)
inlinestaticprivate

References juce::getEnv().

◆ getImageBufferWithCorrectedOrientationFrom()

static ImageBuffer CameraDevice::Pimpl::ImageReader::getImageBufferWithCorrectedOrientationFrom ( const LocalRef< jobject > &  imagePlaneBuffer,
Desktop::DisplayOrientation  deviceOrientationFromAccelerometerSensor,
Desktop::DisplayOrientation  targetOrientation,
bool  cameraLensFrontFacing,
int  cameraSensorOrientation 
)
inlinestaticprivate

◆ getRotationAngle()

static int CameraDevice::Pimpl::ImageReader::getRotationAngle ( Desktop::DisplayOrientation  deviceOrientationFromAccelerometerSensor,
Desktop::DisplayOrientation  targetOrientation,
bool  cameraLensFrontFacing,
int  cameraSensorOrientation 
)
inlinestaticprivate

◆ getSurface()

LocalRef<jobject> CameraDevice::Pimpl::ImageReader::getSurface ( ) const
inline

References juce::getEnv().

◆ onImageAvailable()

◆ resetNotificationFlag()

void CameraDevice::Pimpl::ImageReader::resetNotificationFlag ( )
inline

Member Data Documentation

◆ cameraSensorOrientation

int CameraDevice::Pimpl::ImageReader::cameraSensorOrientation
private

◆ hasNotifiedListeners

Atomic<int> CameraDevice::Pimpl::ImageReader::hasNotifiedListeners { 0 }
private

◆ imageReader

GlobalRef CameraDevice::Pimpl::ImageReader::imageReader
private

◆ numImagesToKeep

constexpr int CameraDevice::Pimpl::ImageReader::numImagesToKeep = 2
staticprivate

◆ onImageAvailableListener

ImageReaderOnImageAvailableListener CameraDevice::Pimpl::ImageReader::onImageAvailableListener
private

◆ owner

Pimpl& CameraDevice::Pimpl::ImageReader::owner
private

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