Torc  0.1
Signals | Public Member Functions | Static Public Member Functions | List of all members
TorcCameraThread Class Referencefinal

#include <torccamerathread.h>

Inheritance diagram for TorcCameraThread:
[legend]

Signals

void StreamVideo (bool Video)
 
void WritingStarted (void)
 
void WritingStopped (void)
 
void InitSegmentReady (void)
 
void SegmentReady (int)
 
void SegmentRemoved (int)
 
void CameraErrored (bool)
 
void ParamsChanged (TorcCameraParams &Params)
 
void StillReady (const QString &File)
 
void TakeStills (uint Count)
 
- Signals inherited from TorcQThread
void Started (void)
 
void Finished (void)
 

Public Member Functions

 ~TorcCameraThread ()
 
void Start (void) override
 
void Finish (void) override
 
QByteArray GetSegment (int Segment)
 
QByteArray GetInitSegment (void)
 
void SetVideoParent (TorcCameraVideoOutput *Parent)
 Connect camera signals for video streaming to the stream output device. More...
 
void SetStillsParent (TorcCameraStillsOutput *Parent)
 Connect camera signals for stills capture. More...
 
- Public Member Functions inherited from TorcQThread
 TorcQThread (const QString &Name)
 
virtual ~TorcQThread ()=default
 
- Public Member Functions inherited from TorcReferenceCounter
 TorcReferenceCounter (void)
 
virtual ~TorcReferenceCounter (void)=default
 
void UpRef (void)
 
bool IsShared (void)
 

Static Public Member Functions

static void CreateOrDestroy (TorcCameraThread *&Thread, const QString &Type, const TorcCameraParams &Params=TorcCameraParams())
 Create and release shared camera threads/devices. More...
 
- Static Public Member Functions inherited from TorcQThread
static void SetMainThread (void)
 
static bool IsMainThread (void)
 
static void InitRand (void)
 
- Static Public Member Functions inherited from TorcReferenceCounter
static void EventLoopEnding (bool Ending)
 

Additional Inherited Members

- Protected Member Functions inherited from TorcQThread
virtual void run (void)
 
void Initialise (void)
 Performs Torc specific thread initialisation. More...
 
void Deinitialise (void)
 Performs Torc specific thread cleanup. More...
 
- Protected Attributes inherited from TorcReferenceCounter
QAtomicInt m_refCount
 
- Static Protected Attributes inherited from TorcReferenceCounter
static bool m_eventLoopEnding = false
 

Detailed Description

Definition at line 12 of file torccamerathread.h.

Constructor & Destructor Documentation

TorcCameraThread::~TorcCameraThread ( )

Definition at line 96 of file torccamerathread.cpp.

Member Function Documentation

void TorcCameraThread::CameraErrored ( bool  )
signal
void TorcCameraThread::CreateOrDestroy ( TorcCameraThread *&  Thread,
const QString &  Type,
const TorcCameraParams Params = TorcCameraParams() 
)
static

Create and release shared camera threads/devices.

A TorcCamera device can be configured to stream video and/or capture still images. Each role requires different for control and to avoid breaking the 'single input to an output' rule, we create different output devices for stills and video. These can then present their own methods externally and have custom controls/logic to handle their state. These output devices then share the camera thread by way of custom referencing counting.

This static method encapsulates all camera thread creation, sharing and destruction without needing any external state.

Definition at line 37 of file torccamerathread.cpp.

void TorcCameraThread::Finish ( void  )
overridevirtual

Implements TorcQThread.

Definition at line 188 of file torccamerathread.cpp.

QByteArray TorcCameraThread::GetInitSegment ( void  )

Definition at line 208 of file torccamerathread.cpp.

QByteArray TorcCameraThread::GetSegment ( int  Segment)

Definition at line 200 of file torccamerathread.cpp.

void TorcCameraThread::InitSegmentReady ( void  )
signal
void TorcCameraThread::ParamsChanged ( TorcCameraParams Params)
signal
void TorcCameraThread::SegmentReady ( int  )
signal
void TorcCameraThread::SegmentRemoved ( int  )
signal
void TorcCameraThread::SetStillsParent ( TorcCameraStillsOutput Parent)

Connect camera signals for stills capture.

Definition at line 121 of file torccamerathread.cpp.

void TorcCameraThread::SetVideoParent ( TorcCameraVideoOutput Parent)

Connect camera signals for video streaming to the stream output device.

Definition at line 103 of file torccamerathread.cpp.

void TorcCameraThread::Start ( void  )
overridevirtual

Implements TorcQThread.

Definition at line 157 of file torccamerathread.cpp.

void TorcCameraThread::StillReady ( const QString &  File)
signal
void TorcCameraThread::StreamVideo ( bool  Video)
signal
void TorcCameraThread::TakeStills ( uint  Count)
signal
void TorcCameraThread::WritingStarted ( void  )
signal
void TorcCameraThread::WritingStopped ( void  )
signal

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