1 #ifndef TORCCAMERAOUTPUT_H 2 #define TORCCAMERAOUTPUT_H 8 #define DASH_PLAYLIST QStringLiteral("dash.mpd") 9 #define HLS_PLAYLIST_MAST QStringLiteral("master.m3u8") 10 #define HLS_PLAYLIST QStringLiteral("playlist.m3u8") 11 #define VIDEO_PAGE QStringLiteral("video.html") 20 Q_CLASSINFO(
"Version",
"1.0.0")
26 QObject *Output, const QMetaObject &MetaObject, const QString &Blacklist = QStringLiteral(""));
36 void Graph (QByteArray *Data) override;
53 Q_CLASSINFO(
"Version",
"1.0.0")
54 Q_PROPERTY(QStringList stillsList READ GetStillsList NOTIFY StillsListChanged(QStringList))
61 void Start (
void) override;
62 void Stop (
void) override;
66 void StillReady (const QString &File);
67 QStringList GetStillsList (
void);
70 void TakeStills (uint Count);
71 void StillsListChanged (QStringList &List);
74 Q_DISABLE_COPY(TorcCameraStillsOutput)
75 QStringList stillsList;
76 QStringList m_stillsList;
77 QString m_stillsDirectory;
84 Q_CLASSINFO(
"Version",
"1.0.0")
91 void Start (
void)
override;
92 void Stop (
void)
override;
94 void ProcessHTTPRequest (
const QString &PeerAddress,
int PeerPort,
const QString &LocalAddress,
97 void WritingStarted (
void);
98 void WritingStopped (
void);
100 void SegmentRemoved (
int Segment);
101 void InitSegmentReady (
void);
102 void SegmentReady (
int Segment);
103 void TimeCheck (
void);
107 void StreamVideo (
bool Video);
108 void CheckTime (
void);
111 QByteArray GetMasterPlaylist (
void);
112 QByteArray GetHLSPlaylist (
void);
113 QByteArray GetPlayerPage (
void);
114 QByteArray GetDashPlaylist (
void);
118 QQueue<int> m_segments;
119 QReadWriteLock m_segmentLock;
120 QDateTime m_cameraStartTime;
121 int m_networkTimeAbort;
132 void Create (
const QVariantMap &Details)
override;
133 void Destroy (
void)
override;
136 QHash<QString, TorcCameraOutput*> m_cameras;
140 #endif // TORCCAMERAOUTPUT_H static TorcCameraOutputs * gCameraOutputs
A class to encapsulate an incoming HTTP request.
TorcCameraParams & GetParams(void)
virtual TorcOutput::Type GetType(void)=0
void ParamsChanged(TorcCameraParams &Params)
Notify the output that the camera parameters have changed.
virtual void CameraErrored(bool Errored)=0
A wrapper around QNetworkRequest.
void Graph(QByteArray *Data) override
void ProcessHTTPRequest(const QString &PeerAddress, int PeerPort, const QString &LocalAddress, int LocalPort, TorcHTTPRequest &Request) override
QReadWriteLock m_threadLock
QReadWriteLock m_paramsLock
void SetCameraName(const QString &Name)
void SetParams(TorcCameraParams &Params)
virtual QString GetPresentationURL(void)
TorcCameraThread * m_thread
TorcCameraParams m_params
friend class TorcCameraOutputs