Torc  0.1
Public Types | Public Slots | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
TorcPiCamera Class Referencefinal

#include <torcpicamera.h>

Inheritance diagram for TorcPiCamera:
[legend]

Public Types

enum  PiCameraType { Unknown = 0, V1 = 1, V2 = 2 }
 

Public Slots

void StreamVideo (bool Video) override
 
void BufferReady (OMX_BUFFERHEADERTYPE *Buffer, quint64 Type)
 An OpenMax buffer is ready (full) More...
 
- Public Slots inherited from TorcCameraDevice
virtual void TakeStills (uint Count)
 Tell the camera to take Count number of still images. More...
 
virtual void StreamVideo (bool Video)=0
 

Public Member Functions

 TorcPiCamera (const TorcCameraParams &Params)
 
virtual ~TorcPiCamera ()=default
 
bool Setup (void) override
 
bool Start (void) override
 Start the camera. More...
 
bool Stop (void) override
 
- Public Member Functions inherited from TorcCameraDevice
 TorcCameraDevice (const TorcCameraParams &Params)
 
virtual ~TorcCameraDevice ()
 
QByteArray GetSegment (int Segment)
 
QByteArray GetInitSegment (void)
 

Static Public Attributes

static bool gPiCameraDetected = false
 

Protected Member Functions

bool EnableStills (uint Count) override
 
void StartStill (void) override
 Start capturing a still image buffer. More...
 
- Protected Member Functions inherited from TorcCameraDevice
void TrackDrift (void)
 
void SaveStill (void)
 
void SaveStillBuffer (quint32 Length, uint8_t *Data)
 
void ClearStillsBuffers (void)
 

Additional Inherited Members

- Signals inherited from TorcCameraDevice
void WritingStarted (void)
 
void WritingStopped (void)
 
void SegmentRemoved (int Segment)
 
void InitSegmentReady (void)
 
void SegmentReady (int Segment)
 
void SetErrored (bool Errored)
 
void StillReady (const QString &File)
 
void ParametersChanged (TorcCameraParams &Params)
 
- Protected Attributes inherited from TorcCameraDevice
TorcCameraParams m_params
 
TorcMuxerm_muxer
 
int m_videoStream
 
quint64 m_frameCount
 
bool m_haveInitSegment
 
AVPacket * m_bufferedPacket
 
TorcSegmentedRingBufferm_ringBuffer
 
QReadWriteLock m_ringBufferLock
 
quint64 m_referenceTime
 
int m_discardDrift
 
TorcAverage< double > m_shortAverage
 
TorcAverage< double > m_longAverage
 
uint m_stillsRequired
 
uint m_stillsExpected
 
QList< QPair< quint32, uint8_t * > > m_stillsBuffers
 

Detailed Description

Definition at line 11 of file torcpicamera.h.

Member Enumeration Documentation

Enumerator
Unknown 
V1 
V2 

Definition at line 16 of file torcpicamera.h.

Constructor & Destructor Documentation

TorcPiCamera::TorcPiCamera ( const TorcCameraParams Params)

Definition at line 85 of file torcpicamera.cpp.

virtual TorcPiCamera::~TorcPiCamera ( )
virtualdefault

Member Function Documentation

void TorcPiCamera::BufferReady ( OMX_BUFFERHEADERTYPE *  Buffer,
quint64  Type 
)
slot

An OpenMax buffer is ready (full)

This method is signalled when a buffer becomes available - for our use case, this is after TorcOMXComponent::FillThisBuffer has completed.

Definition at line 245 of file torcpicamera.cpp.

bool TorcPiCamera::EnableStills ( uint  Count)
overrideprotectedvirtual

Reimplemented from TorcCameraDevice.

Definition at line 916 of file torcpicamera.cpp.

bool TorcPiCamera::Setup ( void  )
overridevirtual

Reimplemented from TorcCameraDevice.

Definition at line 133 of file torcpicamera.cpp.

bool TorcPiCamera::Start ( void  )
overridevirtual

Start the camera.

The camera device is event driven but we must kick off by asking for output buffers to be filled.

Implements TorcCameraDevice.

Definition at line 229 of file torcpicamera.cpp.

void TorcPiCamera::StartStill ( void  )
overrideprotectedvirtual

Start capturing a still image buffer.

Note
This SHOULD be called at the start of stills capture or when the previous still has been completed. In both cases a buffer should be available and this method will then be non-blocking.

Implements TorcCameraDevice.

Definition at line 273 of file torcpicamera.cpp.

bool TorcPiCamera::Stop ( void  )
overridevirtual

Implements TorcCameraDevice.

Definition at line 422 of file torcpicamera.cpp.

void TorcPiCamera::StreamVideo ( bool  Video)
overrideslot

Definition at line 128 of file torcpicamera.cpp.

Member Data Documentation

bool TorcPiCamera::gPiCameraDetected = false
static

Definition at line 23 of file torcpicamera.h.


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