12 #include <QStringList>
54 #pragma clang diagnostic push
55 #pragma clang diagnostic ignored "-Wshadow"
58 #pragma clang diagnostic pop
84 if (
"ERROR_OPEN" == name)
86 if (
"ERROR_UNKNOWN" == name)
88 if (
"ERROR_PROBE" == name)
108 if (
"FIREWIRE" == name)
110 if (
"HDHOMERUN" == name)
112 if (
"FREEBOX" == name)
116 if (
"DVB_S2" == name)
118 if (
"IMPORT" == name)
126 if (
"EXTERNAL" == name)
130 if (
"DVB_T2" == name)
132 if (
"V4L2ENC" == name)
136 return ERROR_UNKNOWN;
142 (rawtype !=
"DVB") && (rawtype !=
"FIREWIRE") &&
143 (rawtype !=
"HDHOMERUN") && (rawtype !=
"FREEBOX") &&
144 (rawtype !=
"IMPORT") && (rawtype !=
"DEMO") &&
145 (rawtype !=
"ASI") && (rawtype !=
"CETON") &&
146 (rawtype !=
"VBOX") && (rawtype !=
"SATIP");
149 static bool IsV4L(
const QString &rawtype)
151 return (rawtype ==
"V4L" || rawtype ==
"MPEG" ||
152 rawtype ==
"HDPVR" || rawtype ==
"GO7007" ||
153 rawtype ==
"MJPEG" || rawtype ==
"V4L2ENC");
158 return (!IsEncoder(rawtype) || rawtype ==
"HDPVR" ||
159 rawtype ==
"EXTERNAL");
165 (rawtype ==
"FIREWIRE") || (rawtype ==
"HDPVR") ||
166 (rawtype ==
"IMPORT") || (rawtype ==
"DEMO") ||
167 (rawtype ==
"GO7007") || (rawtype ==
"MJPEG");
169 static QString GetScanableInputTypes(
void);
171 static bool IsCableCardPresent(
uint inputid,
172 const QString &inputType);
177 (rawtype ==
"DVB") || (rawtype ==
"HDHOMERUN") ||
178 (rawtype ==
"SATIP");
184 (rawtype ==
"DVB") || (rawtype ==
"HDHOMERUN") ||
185 (rawtype ==
"ASI") || (rawtype ==
"FREEBOX") ||
186 (rawtype ==
"CETON") || (rawtype ==
"EXTERNAL") ||
187 (rawtype ==
"VBOX") || (rawtype ==
"V4L2ENC") ||
188 (rawtype ==
"SATIP");
191 static bool HasTuner(
const QString &rawtype,
const QString & device);
192 static bool IsTunerShared(
uint inputidA,
uint inputidB);
197 (rawtype ==
"DVB") || (rawtype ==
"HDHOMERUN") ||
198 (rawtype ==
"ASI") || (rawtype ==
"CETON") ||
199 (rawtype ==
"EXTERNAL") || (rawtype ==
"SATIP");
205 (rawtype ==
"V4L") || (rawtype ==
"V4L2ENC" ||
212 (rawtype ==
"FIREWIRE") || (rawtype ==
"HDPVR") ||
213 (rawtype ==
"EXTERNAL") || (rawtype ==
"V4L2ENC");
219 (rawtype ==
"FIREWIRE") || (rawtype ==
"HDHOMERUN") ||
220 (rawtype ==
"FREEBOX") || (rawtype ==
"ASI") ||
221 (rawtype ==
"IMPORT") || (rawtype ==
"DEMO") ||
222 (rawtype ==
"CETON") || (rawtype ==
"EXTERNAL") ||
223 (rawtype ==
"VBOX") || (rawtype ==
"SATIP");
228 return !(rawtype ==
"FREEBOX" || rawtype ==
"VBOX");
232 static bool IsVBoxPresent(
uint inputid);
235 static bool IsSatIPPresent(
uint inputid);
240 static int CreateCaptureCard(
const QString &videodevice,
241 const QString &audiodevice,
242 const QString &vbidevice,
243 const QString &inputtype,
248 bool dvb_wait_for_seqstart,
251 uint dvb_diseqc_type,
253 const QString &firewire_model,
254 uint firewire_connection,
255 std::chrono::milliseconds signal_timeout,
256 std::chrono::milliseconds channel_timeout,
257 uint dvb_tuning_delay,
265 static bool DeleteInput(
uint inputid);
266 static bool DeleteAllInputs(
void);
267 static std::vector<uint> GetInputList(
void);
268 static std::vector<uint> GetSchedInputList(
void);
269 static std::vector<uint> GetLiveTVInputList(
void);
274 std::vector<uint> list = GetInputIDs(videodevice);
280 static std::vector<uint> GetInputIDs(
const QString& videodevice = QString(),
281 const QString& rawtype = QString(),
282 const QString& inputname = QString(),
285 static uint GetChildInputCount(
uint inputid);
286 static std::vector<uint> GetChildInputIDs(
uint inputid);
288 static bool IsInputTypePresent(
const QString &rawtype,
290 static InputTypes GetInputTypes(
void);
291 static QStringList GetInputTypeNames(
uint sourceid);
293 static QStringList GetVideoDevices(
const QString &rawtype,
316 {
return set_on_input(col, inputid, QString::number(val)); }
321 static bool SetStartChannel(
uint inputid,
322 const QString &channum);
325 static int CreateCardInput(
uint inputid,
327 const QString &inputname,
328 const QString &externalcommand,
329 const QString &changer_device,
330 const QString &changer_model,
332 const QString &tunechan,
333 const QString &startchan,
334 const QString &displayname,
343 static std::vector<uint> GetInputIDs(
uint sourceid);
344 static bool GetInputInfo(
InputInfo &input,
345 std::vector<uint> *groupids =
nullptr);
346 static QList<InputInfo> GetAllInputInfo(
bool virtTuners);
347 static QString GetInputName(
uint inputid);
348 static QString GetStartChannel(
uint inputid);
349 static QString GetDisplayName(
uint inputid);
350 static bool IsUniqueDisplayName(
const QString &name,
351 uint exclude_inputid);
352 static uint GetSourceID(
uint inputid);
355 static uint CreateInputGroup(
const QString &name);
356 static uint CreateDeviceInputGroup(
uint inputid,
359 const QString &device);
360 static uint GetDeviceInputGroup(
uint inputid);
361 static bool LinkInputGroup(
uint inputid,
uint inputgroupid);
362 static bool UnlinkInputGroup(
uint inputid,
uint inputgroupid);
363 static std::vector<uint> GetInputGroups(
uint inputid);
364 static std::vector<uint> GetGroupInputIDs(
uint inputgroupid);
365 static std::vector<uint> GetConflictingInputs(
uint inputid);
367 static QString GetDeviceLabel(
const QString &inputtype,
368 const QString &videodevice);
369 static QString GetDeviceLabel(
uint inputid);
371 static QString ProbeSubTypeName(
uint inputid);
373 static QStringList ProbeVideoInputs(
const QString& device,
374 const QString& inputtype = QString());
375 static QStringList ProbeAudioInputs(
const QString& device,
376 const QString& inputtype = QString());
377 static void GetDeviceInputNames(
const QString &device,
378 const QString &inputtype,
379 QStringList &inputs);
382 static QStringList ProbeVideoDevices(
const QString &rawtype);
383 static void ClearVideoDeviceCache();
386 static uint CloneCard(
uint src_inputid,
uint dst_inputid);
387 static bool InputSetMaxRecordings(
uint parentid,
388 uint max_recordings);
389 static uint AddChildInput(
uint parentid);
390 static QString GetFirewireChangerNode(
uint inputid);
391 static QString GetFirewireChangerModel(
uint inputid);
394 static bool GetTimeouts(
uint inputid,
395 std::chrono::milliseconds &signal_timeout,
396 std::chrono::milliseconds &channel_timeout);
397 static bool IgnoreEncrypted(
uint inputid,
398 const QString &inputname);
399 static bool TVOnly(
uint inputid,
const QString &inputname);
400 static bool IsInNeedOfExternalInputConf(
uint inputid);
401 static uint GetQuickTuning(
uint inputid,
const QString &input_name);
406 {
return "DVB" == GetRawInputType(inputid); }
407 static bool IsDVBInputType(
const QString &inputType);
408 static QStringList ProbeDeliverySystems(
const QString &device);
409 static QStringList ProbeDeliverySystems(
int fd_frontend);
410 static QString ProbeDefaultDeliverySystem(
const QString &device);
411 static QString ProbeDVBType(
const QString &device);
412 static QString ProbeDVBFrontendName(
const QString &device);
413 static bool HasDVBCRCBug(
const QString &device);
414 static std::chrono::milliseconds GetMinSignalMonitoringDelay(
const QString &device);
418 static DTVTunerType ProbeTunerType(
const QString &device);
425 static int SetDefaultDeliverySystem(
uint inputid,
int fd);
426 static int SetDeliverySystem(
uint inputid);
428 static int SetDeliverySystem(
uint inputid,
int fd);
430 static int OpenVideoDevice(
int inputid);
431 static int OpenVideoDevice(
const QString &device);
433 static InputNames GetConfiguredDVBInputs(
const QString &device);
434 static QStringList CapabilitiesToString(uint64_t capabilities);
437 static bool hasV4L2(
int videofd);
438 static bool GetV4LInfo(
int videofd, QString &input, QString &driver,
439 uint32_t &
version, uint32_t &capabilities);
440 static bool GetV4LInfo(
int videofd, QString &input, QString &driver)
444 return GetV4LInfo(videofd, input, driver, d1, d2);
446 static InputNames ProbeV4LVideoInputs(
int videofd,
bool &ok);
447 static InputNames ProbeV4LAudioInputs(
int videofd,
bool &ok);
450 static bool HDHRdoesDVB(
const QString &device);
451 static bool HDHRdoesDVBC(
const QString &device);
452 static QString GetHDHRdesc(
const QString &device);
455 static QString GetVBoxdesc(
const QString &
id,
const QString &ip,
456 const QString &tunerNo,
const QString &tunerType);
459 static int GetASIDeviceNumber(
const QString &device,
460 QString *
error =
nullptr);
462 static uint GetASIBufferSize(
uint device_num,
463 QString *
error =
nullptr);
464 static uint GetASINumBuffers(
uint device_num,
465 QString *
error =
nullptr);
466 static int GetASIMode(
uint device_num,
467 QString *
error =
nullptr);
468 static bool SetASIMode(
uint device_num,
uint mode,
469 QString *
error =
nullptr);
472 static QStringList ProbeV4LVideoInputs(
const QString& device);
473 static QStringList ProbeV4LAudioInputs(
const QString& device);
474 static QStringList ProbeDVBInputs(
const QString& device);