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

Classes

struct  SessionDelegateClass
 
class  StillPictureTaker
 
class  StillPictureTaker
 
class  VideoRecorder
 
class  VideoRecorder
 

Public Member Functions

 CaptureSession (Pimpl &ownerToUse, bool useHighQuality)
 
 ~CaptureSession ()
 
AVCaptureVideoPreviewLayer * createPreviewLayer ()
 
Time getTimeOfFirstRecordedFrame () const
 
bool openedOk () const noexcept
 
void startRecording (const File &file)
 
void startSessionForDeviceWithId (const String &cameraIdToUse)
 
void stopRecording ()
 
void takeStillPicture ()
 

Private Member Functions

String addInputToDevice (AVCaptureDevice *device)
 
void addOutputIfPossible (AVCaptureOutput *output)
 
void callListeners (const Image &image)
 
void cameraSessionRuntimeError (const String &error)
 
void cameraSessionStarted ()
 
void notifyPictureTaken (const Image &image)
 

Private Attributes

AVCaptureDevice * cameraDevice = nil
 
std::unique_ptr< AVCaptureSession, NSObjectDeleter > captureSession
 
dispatch_queue_t captureSessionQueue
 
std::unique_ptr< NSObject, NSObjectDeleter > delegate
 
Pimplowner
 
AVCaptureVideoPreviewLayer * previewLayer = nil
 
WaitableEvent sessionClosedEvent
 
bool sessionStarted = false
 
StillPictureTaker stillPictureTaker
 
VideoRecorder videoRecorder
 

Static Private Attributes

static int numCaptureSessions = 0
 

Constructor & Destructor Documentation

◆ CaptureSession()

CameraDevice::Pimpl::CaptureSession::CaptureSession ( Pimpl ownerToUse,
bool  useHighQuality 
)
inline

◆ ~CaptureSession()

CameraDevice::Pimpl::CaptureSession::~CaptureSession ( )
inline

Member Function Documentation

◆ addInputToDevice()

String CameraDevice::Pimpl::CaptureSession::addInputToDevice ( AVCaptureDevice *  device)
inlineprivate

◆ addOutputIfPossible()

void CameraDevice::Pimpl::CaptureSession::addOutputIfPossible ( AVCaptureOutput *  output)
inlineprivate

◆ callListeners()

◆ cameraSessionRuntimeError()

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

◆ cameraSessionStarted()

void CameraDevice::Pimpl::CaptureSession::cameraSessionStarted ( )
inlineprivate

◆ createPreviewLayer()

AVCaptureVideoPreviewLayer* CameraDevice::Pimpl::CaptureSession::createPreviewLayer ( )
inline

◆ getTimeOfFirstRecordedFrame()

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

◆ notifyPictureTaken()

◆ openedOk()

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

◆ startRecording()

void CameraDevice::Pimpl::CaptureSession::startRecording ( const File &  file)
inline

◆ startSessionForDeviceWithId()

void CameraDevice::Pimpl::CaptureSession::startSessionForDeviceWithId ( const String &  cameraIdToUse)
inline

◆ stopRecording()

◆ takeStillPicture()

void CameraDevice::Pimpl::CaptureSession::takeStillPicture ( )
inline

Member Data Documentation

◆ cameraDevice

AVCaptureDevice* CameraDevice::Pimpl::CaptureSession::cameraDevice = nil
private

◆ captureSession

◆ captureSessionQueue

dispatch_queue_t CameraDevice::Pimpl::CaptureSession::captureSessionQueue
private

◆ delegate

◆ numCaptureSessions

int CameraDevice::Pimpl::CaptureSession::numCaptureSessions = 0
staticprivate

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

◆ owner

◆ previewLayer

◆ sessionClosedEvent

WaitableEvent CameraDevice::Pimpl::CaptureSession::sessionClosedEvent
private

Referenced by ~CaptureSession().

◆ sessionStarted

bool CameraDevice::Pimpl::CaptureSession::sessionStarted = false
private

Referenced by cameraSessionStarted(), and openedOk().

◆ stillPictureTaker

StillPictureTaker CameraDevice::Pimpl::CaptureSession::stillPictureTaker
private

Referenced by takeStillPicture().

◆ videoRecorder

VideoRecorder CameraDevice::Pimpl::CaptureSession::videoRecorder
private

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