23 Q_MOC_INCLUDE(
"Vehicle.h")
25 Q_PROPERTY(
bool gstreamerEnabled READ gstreamerEnabled CONSTANT)
26 Q_PROPERTY(
bool qtmultimediaEnabled READ qtmultimediaEnabled CONSTANT)
27 Q_PROPERTY(
bool uvcEnabled READ uvcEnabled CONSTANT)
30 Q_PROPERTY(
bool fullScreen READ fullScreen WRITE setfullScreen NOTIFY
fullScreenChanged)
39 Q_PROPERTY(
double thermalAspectRatio READ thermalAspectRatio NOTIFY
aspectRatioChanged)
53 Q_INVOKABLE
void grabImage(
const QString &imageFile = QString());
54 Q_INVOKABLE
void startRecording(
const QString &videoFile = QString());
55 Q_INVOKABLE
void startVideo();
56 Q_INVOKABLE
void stopRecording();
57 Q_INVOKABLE
void stopVideo();
59 void init(QQuickWindow *mainWindow);
61 bool autoStreamConfigured()
const;
62 bool decoding()
const {
return _decoding; }
63 bool fullScreen()
const {
return _fullScreen; }
64 bool hasThermal()
const;
65 bool hasVideo()
const;
66 bool isStreamSource()
const;
68 bool recording()
const {
return _recording; }
69 bool streaming()
const {
return _streaming; }
70 double aspectRatio()
const;
72 double thermalAspectRatio()
const;
73 double thermalHfov()
const;
74 QSize videoSize()
const {
return _videoSize; }
75 QString imageFile()
const {
return _imageFile; }
76 QString uvcVideoSourceID()
const {
return _uvcVideoSourceID; }
77 void setfullScreen(
bool on);
78 static bool gstreamerEnabled();
79 static bool qtmultimediaEnabled();
80 static bool uvcEnabled();
99 void _communicationLostChanged(
bool communicationLost);
100 void _setActiveVehicle(
Vehicle *vehicle);
101 void _videoSourceChanged();
104 void _initAfterQmlIsReady();
105 void _initVideoReceiver(
VideoReceiver *receiver, QQuickWindow *window);
109 bool _updateVideoUri(
VideoReceiver *receiver,
const QString &uri);
110 void _restartAllVideos();
114 static void _cleanupOldVideos();
116 QList<VideoReceiver*> _videoReceivers;
121 bool _initialized =
false;
122 bool _initAfterQmlIsReadyDone =
false;
123 bool _fullScreen =
false;
124 QAtomicInteger<bool> _decoding =
false;
125 QAtomicInteger<bool> _recording =
false;
126 QAtomicInteger<bool> _streaming =
false;
129 QString _uvcVideoSourceID;
130 Vehicle *_activeVehicle =
nullptr;
131 QQuickWindow *_mainWindow =
nullptr;