Torc  0.1
torccamerathread.h
Go to the documentation of this file.
1 #ifndef TORCCAMERATHREAD_H
2 #define TORCCAMERATHREAD_H
3 
4 // Torc
5 #include "torcreferencecounted.h"
6 #include "torcqthread.h"
7 #include "torccamera.h"
8 
11 
13 {
14  Q_OBJECT
15 
16  public:
18 
19  static void CreateOrDestroy(TorcCameraThread*& Thread, const QString &Type, const TorcCameraParams &Params = TorcCameraParams());
20  void Start (void) override;
21  void Finish (void) override;
22  QByteArray GetSegment (int Segment);
23  QByteArray GetInitSegment (void);
26 
27  signals:
28  void StreamVideo (bool Video);
29  void WritingStarted (void);
30  void WritingStopped (void);
31  void InitSegmentReady(void);
32  void SegmentReady (int);
33  void SegmentRemoved (int);
34  void CameraErrored (bool);
35  void ParamsChanged (TorcCameraParams &Params);
36  void StillReady (const QString &File);
37  void TakeStills (uint Count);
38 
39  private:
40  TorcCameraThread(const QString &Type, const TorcCameraParams &Params);
41  Q_DISABLE_COPY(TorcCameraThread)
42  bool DownRef (void) override;
43 
44  QString m_type;
45  TorcCameraParams m_params;
46  TorcCameraDevice *m_camera;
47  QReadWriteLock m_cameraLock;
48 };
49 
50 
51 #endif // TORCCAMERATHREAD_H
void Finish(void) override
void TakeStills(uint Count)
void Start(void) override
QByteArray GetSegment(int Segment)
A reference counting implementation.
void StreamVideo(bool Video)
void SetVideoParent(TorcCameraVideoOutput *Parent)
Connect camera signals for video streaming to the stream output device.
QByteArray GetInitSegment(void)
void ParamsChanged(TorcCameraParams &Params)
void StillReady(const QString &File)
void CameraErrored(bool)
void InitSegmentReady(void)
void WritingStarted(void)
void SegmentReady(int)
void WritingStopped(void)
A Torc specific wrapper around QThread.
Definition: torcqthread.h:7
void SegmentRemoved(int)
static void CreateOrDestroy(TorcCameraThread *&Thread, const QString &Type, const TorcCameraParams &Params=TorcCameraParams())
Create and release shared camera threads/devices.
void SetStillsParent(TorcCameraStillsOutput *Parent)
Connect camera signals for stills capture.