MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / getJsonInfo

Method getJsonInfo

sources/base/GrabberWrapper.cpp:240–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240QJsonObject GrabberWrapper::getJsonInfo()
241{
242 if (_grabber == nullptr)
243 return QJsonObject();
244
245 QJsonArray availableGrabbers;
246 QJsonObject grabbers;
247
248 grabbers = _grabber->getJsonInfo();
249
250 grabbers["active"] = _grabberName;
251
252#ifdef ENABLE_V4L2
253 availableGrabbers.append("Video capturing (V4L2)");
254#endif
255
256#ifdef ENABLE_MF
257 availableGrabbers.append("Video capturing (MF)");
258#endif
259
260#ifdef ENABLE_AVF
261 availableGrabbers.append("Video capturing (AVF)");
262#endif
263
264 grabbers["available"] = availableGrabbers;
265
266 // verify LUT
267
268 QString lutPath = QDir::cleanPath(_grabber->getConfigurationPath() + QDir::separator() + "lut_lin_tables.3d");
269 grabbers["lut_for_hdr_path"] = lutPath;
270 if (QFile(lutPath).exists())
271 {
272 grabbers["lut_for_hdr_exists"] = 1;
273 grabbers["lut_for_hdr_modified_date"] = QFileInfo(lutPath).lastModified().toMSecsSinceEpoch();
274 }
275 else
276 {
277 grabbers["lut_for_hdr_exists"] = 0;
278 }
279
280 return grabbers;
281}
282
283QMap<Grabber::currentVideoModeInfo, QString> GrabberWrapper::getVideoCurrentMode() const
284{

Callers

nothing calls this directly

Calls 2

QFileClass · 0.85
getConfigurationPathMethod · 0.80

Tested by

no test coverage detected