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::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 () override
 
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 ( )
inlineoverride

References juce::getEnv(), and imageReader.

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

◆ getBitmapWithCorrectOrientationFrom()

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

◆ 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

◆ 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
staticconstexprprivate

◆ onImageAvailableListener

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

Referenced by ImageReader().

◆ owner

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

Referenced by onImageAvailable().


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