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 Struct Reference

#include <juce_win32_CameraDevice.h>

Inheritance diagram for CameraDevice::Pimpl:
Collaboration diagram for CameraDevice::Pimpl:

Classes

class  CaptureSession
 
struct  CaptureSessionMode
 
struct  CaptureSessionModeBase
 
struct  CaptureSessionPreviewMode
 
struct  CaptureSessionVideoRecordingMode
 
struct  DelegateClass
 
class  DeviceOrientationChangeListener
 
struct  GrabberCallback
 
struct  ImageOutputBase
 
class  ImageReader
 
class  ImageReader
 
class  MediaRecorder
 
class  PreCatalinaStillImageOutput
 
class  PreviewDisplay
 
class  PreviewDisplay
 
class  ScopedCameraDevice
 
class  ScopedCameraDevice
 
class  ScopedCameraDevice
 
class  ScopedCameraDevice
 
class  StreamConfigurationMap
 

Public Types

using InternalOpenCameraResultCallback = std::function< void(const String &, const String &)>
 
using InternalOpenCameraResultCallback = std::function< void(const String &, const String &)>
 

Public Member Functions

 Pimpl (CameraDevice &ownerToUse, const String &, int index, int minWidth, int minHeight, int maxWidth, int maxHeight, bool)
 
 Pimpl (CameraDevice &ownerToUse, const String &cameraIdToUse, int, int minWidthToUse, int minHeightToUse, int maxWidthToUse, int maxHeightToUse, bool)
 
 Pimpl (CameraDevice &ownerToUse, const String &cameraIdToUse, int, int, int, int, int, bool useHighQuality)
 
 Pimpl (CameraDevice &ownerToUse, const String &deviceNameToUse, int, int, int, int, int, bool useHighQuality)
 
 ~Pimpl ()
 
 ~Pimpl ()
 
 ~Pimpl () override
 
void addListener (CameraDevice::Listener *listenerToAdd)
 
void addListener (CameraDevice::Listener *listenerToAdd)
 
void addListener (CameraDevice::Listener *listenerToAdd)
 
void addListener (CameraDevice::Listener *listenerToAdd)
 
void addUser ()
 
void callListeners (const Image &image)
 
void continueOpenRequest (bool granted)
 
bool createFileCaptureFilter (const File &file, int quality)
 
NSView * createVideoCapturePreview ()
 
void drawCurrentImage (Graphics &g, Rectangle< int > area)
 
String getCameraId () const noexcept
 
String getCameraId () const noexcept
 
AVCaptureSession * getCaptureSession ()
 
Time getTimeOfFirstRecordedFrame () const
 
Time getTimeOfFirstRecordedFrame () const
 
Time getTimeOfFirstRecordedFrame () const
 
Time getTimeOfFirstRecordedFrame () const
 
void handleFrame (double, BYTE *buffer, long)
 
void notifyPictureTakenIfNeeded (const Image &image)
 
void open (InternalOpenCameraResultCallback cameraOpenCallbackToUse)
 
void open (InternalOpenCameraResultCallback cameraOpenCallbackToUse)
 
bool openedOk () const noexcept
 
bool openedOk () const noexcept
 
bool openedOk () const noexcept
 
bool openedOk () const noexcept
 
void removeFileCaptureFilter ()
 
void removeListener (CameraDevice::Listener *listenerToRemove)
 
void removeListener (CameraDevice::Listener *listenerToRemove)
 
void removeListener (CameraDevice::Listener *listenerToRemove)
 
void removeListener (CameraDevice::Listener *listenerToRemove)
 
void removeUser ()
 
void startRecordingToFile (const File &file, int quality)
 
void startRecordingToFile (const File &file, int)
 
void startRecordingToFile (const File &file, int)
 
void startRecordingToFile (const File &file, int)
 
void startSession ()
 
void stopRecording ()
 
void stopRecording ()
 
void stopRecording ()
 
void stopRecording ()
 
void takeStillPicture (std::function< void(const Image &)> pictureTakenCallbackToUse)
 
void takeStillPicture (std::function< void(const Image &)> pictureTakenCallbackToUse)
 
void takeStillPicture (std::function< void(const Image &)> pictureTakenCallbackToUse)
 
void takeStillPicture (std::function< void(const Image &)> pictureTakenCallbackToUse)
 

Static Public Member Functions

static ComSmartPtr< ComTypes::IBaseFilter > enumerateCameras (StringArray *names, const int deviceIndexToOpen)
 
static StringArray getAvailableDevices ()
 
static StringArray getAvailableDevices ()
 
static StringArray getAvailableDevices ()
 
static StringArray getAvailableDevices ()
 
static NSArray * getCaptureDevices ()
 

Public Attributes

Image activeImage
 
int activeUsers = 0
 
ComSmartPtr< ComTypes::IBaseFilter > asfWriter
 
ComSmartPtr< GrabberCallbackcallback
 
ComSmartPtr< ComTypes::ICaptureGraphBuilder2 > captureGraphBuilder
 
ComSmartPtr< ComTypes::IBaseFilter > filter
 
Time firstRecordedTime
 
ComSmartPtr< ComTypes::IGraphBuilder > graphBuilder
 
DWORD graphRegistrationID
 
int height = 0
 
Array< intheights
 
bool imageNeedsFlipping = false
 
CriticalSection imageSwapLock
 
Image loadingImage
 
ComSmartPtr< ComTypes::IMediaControl > mediaControl
 
bool openedSuccessfully = false
 
CriticalSection pictureTakenCallbackLock
 
int previewMaxFPS = 60
 
bool recordNextFrameTime = false
 
ComSmartPtr< ComTypes::ISampleGrabber > sampleGrabber
 
ComSmartPtr< ComTypes::IBaseFilter > smartTee
 
ComSmartPtr< ComTypes::IPin > smartTeeCaptureOutputPin
 
ComSmartPtr< ComTypes::IPin > smartTeePreviewOutputPin
 
Array< ViewerComponent * > viewerComps
 
int width = 0
 
Array< intwidths
 
DynamicLibrary wmvcoreLibrary { "wmvcore" }
 

Private Types

enum  {
  ERROR_CAMERA_IN_USE = 1,
  ERROR_MAX_CAMERAS_IN_USE = 2,
  ERROR_CAMERA_DISABLED = 3,
  ERROR_CAMERA_DEVICE = 4,
  ERROR_CAMERA_SERVICE = 5
}
 

Private Member Functions

bool addGraphToRot ()
 
JUCE_END_IGNORE_WARNINGS_GCC_LIKE void addImageCapture ()
 
void addInput ()
 
void addMovieCapture ()
 
void callListeners (const Image &image)
 
void callListeners (const Image &image)
 
void cameraDeviceError (const String &error)
 
void cameraOpenFinished (const String &error)
 
void cameraSessionRuntimeError (const String &error)
 
void cameraSessionRuntimeError (const String &error)
 
void cameraSessionStarted ()
 
bool connectFilters (ComTypes::IBaseFilter *const first, ComTypes::IBaseFilter *const second) const
 
void disconnectAnyViewers ()
 
int getAutoFocusModeToUse () const
 
int getCameraCharacteristicsIntegerKeyValue (jfieldID key) const
 
int getCameraLensFacing () const
 
int getCameraSensorOrientation () const
 
Array< intgetSupportedAutoFocusModes () const
 
AVCaptureConnection * getVideoConnection () const
 
void getVideoSizes (ComTypes::IAMStreamConfig *const streamConfig)
 
void handleImageCapture (const Image &image)
 
void imageCaptureFinished (const Image &image)
 
void invokeCameraOpenCallback (const String &error)
 
void notifyPictureTaken (const Image &image)
 
void notifyPictureTaken (const Image &image)
 
void onActivityPaused (jobject) override
 
void onActivityResumed (jobject) override
 
void refreshConnections ()
 
void refreshIfNeeded ()
 
void removeCurrentSessionVideoInputs ()
 
void removeGraphFromRot ()
 
void removeImageCapture ()
 
void removeInput ()
 
void removeMovieCapture ()
 
bool selectVideoSize (ComTypes::IAMStreamConfig *const streamConfig, const int minWidth, const int minHeight, const int maxWidth, const int maxHeight)
 
void setupStillImageSize ()
 
void startBackgroundThread ()
 
void startPreviewMode (ImageReader &ir)
 
void startVideoRecordingMode (MediaRecorder &mr)
 
void stopBackgroundThread ()
 
void triggerImageCapture ()
 
void triggerStillPictureCapture ()
 
void triggerStillPictureCapture ()
 

Static Private Member Functions

static String cameraErrorCodeToString (int errorCode)
 
static Rectangle< intchooseBestSize (int minWidth, int minHeight, int maxWidth, int maxHeight, Array< Rectangle< int >> supportedSizes)
 
static String cmTimeToString (CMTime time)
 
static void deleteMediaType (ComTypes::AM_MEDIA_TYPE *const pmt)
 
static String frameRateRangeToString (AVFrameRateRange *range)
 
static NSArray< AVCaptureDevice * > * getDevices ()
 
static String getHighResStillImgDimensionsString (CMVideoDimensions d)
 
static bool getPin (ComTypes::IBaseFilter *filter, const ComTypes::PIN_DIRECTION wantedDirection, ComSmartPtr< ComTypes::IPin > &result, const char *pinName=nullptr)
 
static LocalRef< jobject > initialiseCameraCharacteristics (const GlobalRef &cameraManager, const String &cameraId)
 
static LocalRef< jobject > initialiseCameraManager ()
 
static Array< intjintArrayToJuceArray (const LocalRef< jintArray > &jArray)
 
static void printDebugCameraFormatInfo (AVCaptureDeviceFormat *format)
 
static void printDebugCameraInfo (AVCaptureDevice *device)
 
static void printDebugCameraInfo (const LocalRef< jobject > &cameraManagerToUse, const String &cameraId)
 
static void printPrimitiveArrayElements (const LocalRef< jobject > &keyValue, const String &keyName, const String &keyValueString)
 
static void printRangeArrayElements (const LocalRef< jobject > &rangeArray, const String &keyName)
 

Private Attributes

GlobalRef activityLifeListener
 
bool appWasPaused = false
 
id< AVCaptureFileOutputRecordingDelegate > callbackDelegate = nil
 
GlobalRef cameraCharacteristics
 
String cameraId
 
GlobalRef cameraManager
 
InternalOpenCameraResultCallback cameraOpenCallback
 
CaptureSession captureSession
 
std::unique_ptr< CaptureSessionModeBasecurrentCaptureSessionMode
 
AVCaptureDeviceInput * currentInput = nil
 
String deviceName
 
DeviceOrientationChangeListener deviceOrientationChangeListener
 
AVCaptureMovieFileOutput * fileOutput = nil
 
Time firstPresentationTime
 
Time firstRecordedFrameTimeMs
 
GlobalRef handler
 
GlobalRef handlerThread
 
std::unique_ptr< ImageOutputBaseimageOutput
 
std::unique_ptr< ImageReaderimageReader
 
bool isRecording = false
 
CriticalSection listenerLock
 
ListenerList< Listener > listeners
 
int maxHeight
 
int maxWidth
 
std::unique_ptr< MediaRecordermediaRecorder
 
int minHeight
 
int minWidth
 
bool notifiedOfCameraOpening = false
 
String openingError
 
CameraDevice & owner
 
std::function< void(const Image &)> pictureTakenCallback = nullptr
 
PreviewDisplay previewDisplay
 
std::unique_ptr< ScopedCameraDevicescopedCameraDevice
 
AVCaptureSession * session = nil
 
StreamConfigurationMap streamConfigurationMap
 

Friends

struct CameraDevice::ViewerComponent
 

Member Typedef Documentation

◆ InternalOpenCameraResultCallback [1/2]

using CameraDevice::Pimpl::InternalOpenCameraResultCallback = std::function<void (const String& , const String& )>

◆ InternalOpenCameraResultCallback [2/2]

using CameraDevice::Pimpl::InternalOpenCameraResultCallback = std::function<void (const String& , const String& )>

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ERROR_CAMERA_IN_USE 
ERROR_MAX_CAMERAS_IN_USE 
ERROR_CAMERA_DISABLED 
ERROR_CAMERA_DEVICE 
ERROR_CAMERA_SERVICE 

Constructor & Destructor Documentation

◆ Pimpl() [1/4]

CameraDevice::Pimpl::Pimpl ( CameraDevice &  ownerToUse,
const String &  cameraIdToUse,
int  ,
int  minWidthToUse,
int  minHeightToUse,
int  maxWidthToUse,
int  maxHeightToUse,
bool   
)
inline

◆ ~Pimpl() [1/3]

CameraDevice::Pimpl::~Pimpl ( )
inlineoverride

◆ Pimpl() [2/4]

CameraDevice::Pimpl::Pimpl ( CameraDevice &  ownerToUse,
const String &  cameraIdToUse,
int  ,
int  ,
int  ,
int  ,
int  ,
bool  useHighQuality 
)
inline

◆ Pimpl() [3/4]

CameraDevice::Pimpl::Pimpl ( CameraDevice &  ownerToUse,
const String &  deviceNameToUse,
int  ,
int  ,
int  ,
int  ,
int  ,
bool  useHighQuality 
)
inline

◆ ~Pimpl() [2/3]

CameraDevice::Pimpl::~Pimpl ( )
inline

◆ Pimpl() [4/4]

◆ ~Pimpl() [3/3]

Member Function Documentation

◆ addGraphToRot()

bool CameraDevice::Pimpl::addGraphToRot ( )
inlineprivate

References juce::gl::buffer, graphBuilder, and graphRegistrationID.

Referenced by Pimpl().

◆ addImageCapture()

JUCE_END_IGNORE_WARNINGS_GCC_LIKE void CameraDevice::Pimpl::addImageCapture ( )
inlineprivate

References imageOutput, and session.

Referenced by refreshConnections().

◆ addInput()

void CameraDevice::Pimpl::addInput ( )
inlineprivate

◆ addListener() [1/4]

void CameraDevice::Pimpl::addListener ( CameraDevice::Listener *  listenerToAdd)
inline

◆ addListener() [2/4]

void CameraDevice::Pimpl::addListener ( CameraDevice::Listener *  listenerToAdd)
inline

◆ addListener() [3/4]

void CameraDevice::Pimpl::addListener ( CameraDevice::Listener *  listenerToAdd)
inline

References addUser(), listenerLock, and listeners.

◆ addListener() [4/4]

void CameraDevice::Pimpl::addListener ( CameraDevice::Listener *  listenerToAdd)
inline

◆ addMovieCapture()

void CameraDevice::Pimpl::addMovieCapture ( )
inlineprivate

References fileOutput, and session.

Referenced by refreshConnections().

◆ addUser()

◆ callListeners() [1/3]

void CameraDevice::Pimpl::callListeners ( const Image &  image)
inline

References listenerLock, and listeners.

◆ callListeners() [2/3]

void CameraDevice::Pimpl::callListeners ( const Image &  image)
inlineprivate

◆ callListeners() [3/3]

void CameraDevice::Pimpl::callListeners ( const Image &  image)
inlineprivate

◆ cameraDeviceError()

void CameraDevice::Pimpl::cameraDeviceError ( const String &  error)
inlineprivate

◆ cameraErrorCodeToString()

static String CameraDevice::Pimpl::cameraErrorCodeToString ( int  errorCode)
inlinestaticprivate

◆ cameraOpenFinished()

void CameraDevice::Pimpl::cameraOpenFinished ( const String &  error)
inlineprivate

◆ cameraSessionRuntimeError() [1/2]

void CameraDevice::Pimpl::cameraSessionRuntimeError ( const String &  error)
inlineprivate

References JUCE_CAMERA_LOG, and owner.

◆ cameraSessionRuntimeError() [2/2]

void CameraDevice::Pimpl::cameraSessionRuntimeError ( const String &  error)
inlineprivate

◆ cameraSessionStarted()

void CameraDevice::Pimpl::cameraSessionStarted ( )
inlineprivate

◆ chooseBestSize()

static Rectangle<int> CameraDevice::Pimpl::chooseBestSize ( int  minWidth,
int  minHeight,
int  maxWidth,
int  maxHeight,
Array< Rectangle< int >>  supportedSizes 
)
inlinestaticprivate

◆ cmTimeToString()

static String CameraDevice::Pimpl::cmTimeToString ( CMTime  time)
inlinestaticprivate

◆ connectFilters()

bool CameraDevice::Pimpl::connectFilters ( ComTypes::IBaseFilter *const  first,
ComTypes::IBaseFilter *const  second 
) const
inlineprivate

◆ continueOpenRequest()

◆ createFileCaptureFilter()

◆ createVideoCapturePreview()

NSView* CameraDevice::Pimpl::createVideoCapturePreview ( )
inline

◆ deleteMediaType()

static void CameraDevice::Pimpl::deleteMediaType ( ComTypes::AM_MEDIA_TYPE *const  pmt)
inlinestaticprivate

Referenced by getVideoSizes(), and selectVideoSize().

◆ disconnectAnyViewers()

void CameraDevice::Pimpl::disconnectAnyViewers ( )
private

References viewerComps.

Referenced by ~Pimpl().

◆ drawCurrentImage()

void CameraDevice::Pimpl::drawCurrentImage ( Graphics &  g,
Rectangle< int area 
)
inline

◆ enumerateCameras()

static ComSmartPtr<ComTypes::IBaseFilter> CameraDevice::Pimpl::enumerateCameras ( StringArray *  names,
const int  deviceIndexToOpen 
)
inlinestatic

◆ frameRateRangeToString()

static String CameraDevice::Pimpl::frameRateRangeToString ( AVFrameRateRange *  range)
inlinestaticprivate

◆ getAutoFocusModeToUse()

int CameraDevice::Pimpl::getAutoFocusModeToUse ( ) const
inlineprivate

◆ getAvailableDevices() [1/4]

static StringArray CameraDevice::Pimpl::getAvailableDevices ( )
inlinestatic

◆ getAvailableDevices() [2/4]

static StringArray CameraDevice::Pimpl::getAvailableDevices ( )
inlinestatic

◆ getAvailableDevices() [3/4]

static StringArray CameraDevice::Pimpl::getAvailableDevices ( )
inlinestatic

References enumerateCameras().

◆ getAvailableDevices() [4/4]

◆ getCameraCharacteristicsIntegerKeyValue()

int CameraDevice::Pimpl::getCameraCharacteristicsIntegerKeyValue ( jfieldID  key) const
inlineprivate

◆ getCameraId() [1/2]

String CameraDevice::Pimpl::getCameraId ( ) const
inlinenoexcept

References cameraId.

◆ getCameraId() [2/2]

String CameraDevice::Pimpl::getCameraId ( ) const
inlinenoexcept

References cameraId.

◆ getCameraLensFacing()

◆ getCameraSensorOrientation()

int CameraDevice::Pimpl::getCameraSensorOrientation ( ) const
inlineprivate

◆ getCaptureDevices()

static NSArray* CameraDevice::Pimpl::getCaptureDevices ( )
inlinestatic

◆ getCaptureSession()

AVCaptureSession* CameraDevice::Pimpl::getCaptureSession ( )
inline

References session.

Referenced by createVideoCapturePreview().

◆ getDevices()

static NSArray<AVCaptureDevice*>* CameraDevice::Pimpl::getDevices ( )
inlinestaticprivate

Referenced by getAvailableDevices().

◆ getHighResStillImgDimensionsString()

static String CameraDevice::Pimpl::getHighResStillImgDimensionsString ( CMVideoDimensions  d)
inlinestaticprivate

◆ getPin()

static bool CameraDevice::Pimpl::getPin ( ComTypes::IBaseFilter *  filter,
const ComTypes::PIN_DIRECTION  wantedDirection,
ComSmartPtr< ComTypes::IPin > &  result,
const char *  pinName = nullptr 
)
inlinestaticprivate

◆ getSupportedAutoFocusModes()

Array<int> CameraDevice::Pimpl::getSupportedAutoFocusModes ( ) const
inlineprivate

◆ getTimeOfFirstRecordedFrame() [1/4]

Time CameraDevice::Pimpl::getTimeOfFirstRecordedFrame ( ) const
inline

References captureSession.

◆ getTimeOfFirstRecordedFrame() [2/4]

Time CameraDevice::Pimpl::getTimeOfFirstRecordedFrame ( ) const
inline

References firstPresentationTime.

◆ getTimeOfFirstRecordedFrame() [3/4]

Time CameraDevice::Pimpl::getTimeOfFirstRecordedFrame ( ) const
inline

References firstRecordedTime.

◆ getTimeOfFirstRecordedFrame() [4/4]

Time CameraDevice::Pimpl::getTimeOfFirstRecordedFrame ( ) const
inline

◆ getVideoConnection()

AVCaptureConnection* CameraDevice::Pimpl::getVideoConnection ( ) const
inlineprivate

References imageOutput, and juce::gl::in.

Referenced by refreshIfNeeded(), and triggerImageCapture().

◆ getVideoSizes()

◆ handleFrame()

◆ handleImageCapture()

void CameraDevice::Pimpl::handleImageCapture ( const Image &  image)
inlineprivate

◆ imageCaptureFinished()

void CameraDevice::Pimpl::imageCaptureFinished ( const Image &  image)
inlineprivate

References handleImageCapture().

◆ initialiseCameraCharacteristics()

static LocalRef<jobject> CameraDevice::Pimpl::initialiseCameraCharacteristics ( const GlobalRef &  cameraManager,
const String &  cameraId 
)
inlinestaticprivate

◆ initialiseCameraManager()

static LocalRef<jobject> CameraDevice::Pimpl::initialiseCameraManager ( )
inlinestaticprivate

◆ invokeCameraOpenCallback()

void CameraDevice::Pimpl::invokeCameraOpenCallback ( const String &  error)
inlineprivate

◆ jintArrayToJuceArray()

static Array<int> CameraDevice::Pimpl::jintArrayToJuceArray ( const LocalRef< jintArray > &  jArray)
inlinestaticprivate

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

Referenced by getSupportedAutoFocusModes().

◆ notifyPictureTaken() [1/2]

void CameraDevice::Pimpl::notifyPictureTaken ( const Image &  image)
inlineprivate

◆ notifyPictureTaken() [2/2]

void CameraDevice::Pimpl::notifyPictureTaken ( const Image &  image)
inlineprivate

◆ notifyPictureTakenIfNeeded()

void CameraDevice::Pimpl::notifyPictureTakenIfNeeded ( const Image &  image)
inline

◆ onActivityPaused()

◆ onActivityResumed()

◆ open() [1/2]

void CameraDevice::Pimpl::open ( InternalOpenCameraResultCallback  cameraOpenCallbackToUse)
inline

◆ open() [2/2]

void CameraDevice::Pimpl::open ( InternalOpenCameraResultCallback  cameraOpenCallbackToUse)
inline

◆ openedOk() [1/4]

bool CameraDevice::Pimpl::openedOk ( ) const
inlinenoexcept

References captureSession.

◆ openedOk() [2/4]

bool CameraDevice::Pimpl::openedOk ( ) const
inlinenoexcept

References openingError.

◆ openedOk() [3/4]

bool CameraDevice::Pimpl::openedOk ( ) const
inlinenoexcept

References openedSuccessfully.

◆ openedOk() [4/4]

bool CameraDevice::Pimpl::openedOk ( ) const
inlinenoexcept

References scopedCameraDevice.

Referenced by startRecordingToFile().

◆ printDebugCameraFormatInfo()

static void CameraDevice::Pimpl::printDebugCameraFormatInfo ( AVCaptureDeviceFormat *  format)
inlinestaticprivate

◆ printDebugCameraInfo() [1/2]

static void CameraDevice::Pimpl::printDebugCameraInfo ( AVCaptureDevice *  device)
inlinestaticprivate

◆ printDebugCameraInfo() [2/2]

static void CameraDevice::Pimpl::printDebugCameraInfo ( const LocalRef< jobject > &  cameraManagerToUse,
const String &  cameraId 
)
inlinestaticprivate

◆ printPrimitiveArrayElements()

static void CameraDevice::Pimpl::printPrimitiveArrayElements ( const LocalRef< jobject > &  keyValue,
const String &  keyName,
const String &  keyValueString 
)
inlinestaticprivate

◆ printRangeArrayElements()

static void CameraDevice::Pimpl::printRangeArrayElements ( const LocalRef< jobject > &  rangeArray,
const String &  keyName 
)
inlinestaticprivate

◆ refreshConnections()

void CameraDevice::Pimpl::refreshConnections ( )
inlineprivate

◆ refreshIfNeeded()

void CameraDevice::Pimpl::refreshIfNeeded ( )
inlineprivate

◆ removeCurrentSessionVideoInputs()

void CameraDevice::Pimpl::removeCurrentSessionVideoInputs ( )
inlineprivate

References juce::gl::input, removeInput(), and session.

Referenced by addInput().

◆ removeFileCaptureFilter()

void CameraDevice::Pimpl::removeFileCaptureFilter ( )
inline

◆ removeGraphFromRot()

void CameraDevice::Pimpl::removeGraphFromRot ( )
inlineprivate

References graphRegistrationID.

Referenced by ~Pimpl().

◆ removeImageCapture()

void CameraDevice::Pimpl::removeImageCapture ( )
inlineprivate

References imageOutput, and session.

Referenced by refreshConnections(), and ~Pimpl().

◆ removeInput()

void CameraDevice::Pimpl::removeInput ( )
inlineprivate

◆ removeListener() [1/4]

void CameraDevice::Pimpl::removeListener ( CameraDevice::Listener *  listenerToRemove)
inline

References listenerLock, and listeners.

◆ removeListener() [2/4]

void CameraDevice::Pimpl::removeListener ( CameraDevice::Listener *  listenerToRemove)
inline

References listenerLock, and listeners.

◆ removeListener() [3/4]

void CameraDevice::Pimpl::removeListener ( CameraDevice::Listener *  listenerToRemove)
inline

References listenerLock, listeners, and removeUser().

◆ removeListener() [4/4]

void CameraDevice::Pimpl::removeListener ( CameraDevice::Listener *  listenerToRemove)
inline

References listenerLock, and listeners.

◆ removeMovieCapture()

void CameraDevice::Pimpl::removeMovieCapture ( )
inlineprivate

References fileOutput, and session.

Referenced by refreshConnections(), and ~Pimpl().

◆ removeUser()

void CameraDevice::Pimpl::removeUser ( )
inline

◆ selectVideoSize()

bool CameraDevice::Pimpl::selectVideoSize ( ComTypes::IAMStreamConfig *const  streamConfig,
const int  minWidth,
const int  minHeight,
const int  maxWidth,
const int  maxHeight 
)
inlineprivate

◆ setupStillImageSize()

◆ startBackgroundThread()

void CameraDevice::Pimpl::startBackgroundThread ( )
inlineprivate

◆ startPreviewMode()

◆ startRecordingToFile() [1/4]

void CameraDevice::Pimpl::startRecordingToFile ( const File &  file,
int  quality 
)
inline

◆ startRecordingToFile() [2/4]

void CameraDevice::Pimpl::startRecordingToFile ( const File &  file,
int   
)
inline

References captureSession.

◆ startRecordingToFile() [3/4]

void CameraDevice::Pimpl::startRecordingToFile ( const File &  file,
int   
)
inline

◆ startRecordingToFile() [4/4]

◆ startSession()

void CameraDevice::Pimpl::startSession ( )
inline

◆ startVideoRecordingMode()

void CameraDevice::Pimpl::startVideoRecordingMode ( MediaRecorder mr)
inlineprivate

◆ stopBackgroundThread()

void CameraDevice::Pimpl::stopBackgroundThread ( )
inlineprivate

◆ stopRecording() [1/4]

void CameraDevice::Pimpl::stopRecording ( )
inline

References captureSession.

◆ stopRecording() [2/4]

void CameraDevice::Pimpl::stopRecording ( )
inline

◆ stopRecording() [3/4]

void CameraDevice::Pimpl::stopRecording ( )
inline

◆ stopRecording() [4/4]

void CameraDevice::Pimpl::stopRecording ( )
inline

◆ takeStillPicture() [1/4]

void CameraDevice::Pimpl::takeStillPicture ( std::function< void(const Image &)>  pictureTakenCallbackToUse)
inline

◆ takeStillPicture() [2/4]

void CameraDevice::Pimpl::takeStillPicture ( std::function< void(const Image &)>  pictureTakenCallbackToUse)
inline

◆ takeStillPicture() [3/4]

void CameraDevice::Pimpl::takeStillPicture ( std::function< void(const Image &)>  pictureTakenCallbackToUse)
inline

◆ takeStillPicture() [4/4]

void CameraDevice::Pimpl::takeStillPicture ( std::function< void(const Image &)>  pictureTakenCallbackToUse)
inline

◆ triggerImageCapture()

void CameraDevice::Pimpl::triggerImageCapture ( )
inlineprivate

◆ triggerStillPictureCapture() [1/2]

void CameraDevice::Pimpl::triggerStillPictureCapture ( )
inlineprivate

References captureSession.

◆ triggerStillPictureCapture() [2/2]

void CameraDevice::Pimpl::triggerStillPictureCapture ( )
inlineprivate

Friends And Related Function Documentation

◆ CameraDevice::ViewerComponent

Member Data Documentation

◆ activeImage

Image CameraDevice::Pimpl::activeImage

Referenced by drawCurrentImage(), and Pimpl().

◆ activeUsers

int CameraDevice::Pimpl::activeUsers = 0

◆ activityLifeListener

GlobalRef CameraDevice::Pimpl::activityLifeListener
private

Referenced by continueOpenRequest(), and ~Pimpl().

◆ appWasPaused

bool CameraDevice::Pimpl::appWasPaused = false
private

◆ asfWriter

ComSmartPtr<ComTypes::IBaseFilter> CameraDevice::Pimpl::asfWriter

◆ callback

ComSmartPtr<GrabberCallback> CameraDevice::Pimpl::callback

Referenced by Pimpl(), and ~Pimpl().

◆ callbackDelegate

id<AVCaptureFileOutputRecordingDelegate> CameraDevice::Pimpl::callbackDelegate = nil
private

Referenced by Pimpl(), startRecordingToFile(), and ~Pimpl().

◆ cameraCharacteristics

GlobalRef CameraDevice::Pimpl::cameraCharacteristics
private

◆ cameraId

◆ cameraManager

GlobalRef CameraDevice::Pimpl::cameraManager
private

◆ cameraOpenCallback

InternalOpenCameraResultCallback CameraDevice::Pimpl::cameraOpenCallback
private

◆ captureGraphBuilder

ComSmartPtr<ComTypes::ICaptureGraphBuilder2> CameraDevice::Pimpl::captureGraphBuilder

Referenced by Pimpl(), and ~Pimpl().

◆ captureSession

◆ currentCaptureSessionMode

◆ currentInput

AVCaptureDeviceInput* CameraDevice::Pimpl::currentInput = nil
private

Referenced by addInput(), and removeInput().

◆ deviceName

String CameraDevice::Pimpl::deviceName
private

Referenced by addInput().

◆ deviceOrientationChangeListener

DeviceOrientationChangeListener CameraDevice::Pimpl::deviceOrientationChangeListener
private

◆ fileOutput

AVCaptureMovieFileOutput* CameraDevice::Pimpl::fileOutput = nil
private

◆ filter

ComSmartPtr<ComTypes::IBaseFilter> CameraDevice::Pimpl::filter

Referenced by getPin(), handleFrame(), Pimpl(), and ~Pimpl().

◆ firstPresentationTime

Time CameraDevice::Pimpl::firstPresentationTime
private

◆ firstRecordedFrameTimeMs

Time CameraDevice::Pimpl::firstRecordedFrameTimeMs
private

◆ firstRecordedTime

Time CameraDevice::Pimpl::firstRecordedTime

◆ graphBuilder

ComSmartPtr<ComTypes::IGraphBuilder> CameraDevice::Pimpl::graphBuilder

◆ graphRegistrationID

DWORD CameraDevice::Pimpl::graphRegistrationID

◆ handler

◆ handlerThread

GlobalRef CameraDevice::Pimpl::handlerThread
private

◆ height

◆ heights

Array<int> CameraDevice::Pimpl::heights

Referenced by getVideoSizes().

◆ imageNeedsFlipping

bool CameraDevice::Pimpl::imageNeedsFlipping = false

Referenced by drawCurrentImage(), and handleFrame().

◆ imageOutput

◆ imageReader

std::unique_ptr<ImageReader> CameraDevice::Pimpl::imageReader
private

◆ imageSwapLock

CriticalSection CameraDevice::Pimpl::imageSwapLock

Referenced by drawCurrentImage(), and handleFrame().

◆ isRecording

bool CameraDevice::Pimpl::isRecording = false
private

◆ listenerLock

CriticalSection CameraDevice::Pimpl::listenerLock
private

◆ listeners

ListenerList< Listener > CameraDevice::Pimpl::listeners
private

◆ loadingImage

Image CameraDevice::Pimpl::loadingImage

◆ maxHeight

int CameraDevice::Pimpl::maxHeight
private

◆ maxWidth

int CameraDevice::Pimpl::maxWidth
private

◆ mediaControl

ComSmartPtr<ComTypes::IMediaControl> CameraDevice::Pimpl::mediaControl

◆ mediaRecorder

std::unique_ptr<MediaRecorder> CameraDevice::Pimpl::mediaRecorder
private

◆ minHeight

int CameraDevice::Pimpl::minHeight
private

◆ minWidth

int CameraDevice::Pimpl::minWidth
private

◆ notifiedOfCameraOpening

bool CameraDevice::Pimpl::notifiedOfCameraOpening = false
private

◆ openedSuccessfully

bool CameraDevice::Pimpl::openedSuccessfully = false

◆ openingError

String CameraDevice::Pimpl::openingError
private

Referenced by openedOk().

◆ owner

CameraDevice & CameraDevice::Pimpl::owner
private

◆ pictureTakenCallback

std::function< void(const Image &)> CameraDevice::Pimpl::pictureTakenCallback = nullptr
private

◆ pictureTakenCallbackLock

CriticalSection CameraDevice::Pimpl::pictureTakenCallbackLock

◆ previewDisplay

PreviewDisplay CameraDevice::Pimpl::previewDisplay
private

◆ previewMaxFPS

◆ recordNextFrameTime

bool CameraDevice::Pimpl::recordNextFrameTime = false

◆ sampleGrabber

ComSmartPtr<ComTypes::ISampleGrabber> CameraDevice::Pimpl::sampleGrabber

Referenced by Pimpl(), and ~Pimpl().

◆ scopedCameraDevice

std::unique_ptr<ScopedCameraDevice> CameraDevice::Pimpl::scopedCameraDevice
private

◆ session

AVCaptureSession* CameraDevice::Pimpl::session = nil
private

Referenced by addImageCapture(), addInput(), addMovieCapture(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::cameraCaptureSessionActive(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::cameraCaptureSessionActiveCallback(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureCompleted(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureCompletedCallback(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureFailed(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureFailedCallback(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureProgressed(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureProgressedCallback(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureSequenceAborted(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureSequenceAbortedCallback(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureSequenceCompleted(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureSequenceCompletedCallback(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureStarted(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::StillPictureTaker::cameraCaptureSessionCaptureStartedCallback(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::cameraCaptureSessionClosed(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::cameraCaptureSessionClosedCallback(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::cameraCaptureSessionConfigured(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::cameraCaptureSessionConfiguredCallback(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::cameraCaptureSessionConfigureFailed(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::cameraCaptureSessionConfigureFailedCallback(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::cameraCaptureSessionReady(), CameraDevice::Pimpl::ScopedCameraDevice::CaptureSession::cameraCaptureSessionReadyCallback(), CameraDevice::Pimpl::CaptureSessionMode< CaptureSessionPreviewMode >::captureSessionConfigured(), createVideoCapturePreview(), getCaptureSession(), Pimpl(), refreshConnections(), removeCurrentSessionVideoInputs(), removeImageCapture(), removeInput(), removeMovieCapture(), startSession(), CameraDevice::Pimpl::CaptureSessionMode< CaptureSessionPreviewMode >::stopPreview(), and ~Pimpl().

◆ smartTee

ComSmartPtr<ComTypes::IBaseFilter> CameraDevice::Pimpl::smartTee

Referenced by Pimpl(), and ~Pimpl().

◆ smartTeeCaptureOutputPin

ComSmartPtr<ComTypes::IPin> CameraDevice::Pimpl::smartTeeCaptureOutputPin

◆ smartTeePreviewOutputPin

ComSmartPtr<ComTypes::IPin> CameraDevice::Pimpl::smartTeePreviewOutputPin

Referenced by Pimpl(), and ~Pimpl().

◆ streamConfigurationMap

StreamConfigurationMap CameraDevice::Pimpl::streamConfigurationMap
private

◆ viewerComps

◆ width

◆ widths

Array<int> CameraDevice::Pimpl::widths

Referenced by getVideoSizes().

◆ wmvcoreLibrary

DynamicLibrary CameraDevice::Pimpl::wmvcoreLibrary { "wmvcore" }

Referenced by createFileCaptureFilter().


The documentation for this struct was generated from the following files: