12 #include <QStringList>
75 if (
"ERROR_OPEN" == name)
77 if (
"ERROR_UNKNOWN" == name)
79 if (
"ERROR_PROBE" == name)
99 if (
"FIREWIRE" == name)
101 if (
"HDHOMERUN" == name)
103 if (
"FREEBOX" == name)
107 if (
"DVB_S2" == name)
109 if (
"IMPORT" == name)
117 if (
"EXTERNAL" == name)
121 if (
"DVB_T2" == name)
123 if (
"V4L2ENC" == name)
127 return ERROR_UNKNOWN;
133 (rawtype !=
"DVB") && (rawtype !=
"FIREWIRE") &&
134 (rawtype !=
"HDHOMERUN") && (rawtype !=
"FREEBOX") &&
135 (rawtype !=
"IMPORT") && (rawtype !=
"DEMO") &&
136 (rawtype !=
"ASI") && (rawtype !=
"CETON") &&
137 (rawtype !=
"VBOX") && (rawtype !=
"SATIP");
140 static bool IsV4L(
const QString &rawtype)
142 return (rawtype ==
"V4L" || rawtype ==
"MPEG" ||
143 rawtype ==
"HDPVR" || rawtype ==
"GO7007" ||
144 rawtype ==
"MJPEG" || rawtype ==
"V4L2ENC");
149 return (!IsEncoder(rawtype) || rawtype ==
"HDPVR" ||
150 rawtype ==
"EXTERNAL");
156 (rawtype ==
"FIREWIRE") || (rawtype ==
"HDPVR") ||
157 (rawtype ==
"IMPORT") || (rawtype ==
"DEMO") ||
158 (rawtype ==
"GO7007") || (rawtype ==
"MJPEG");
160 static QString GetScanableInputTypes(
void);
162 static bool IsCableCardPresent(
uint inputid,
163 const QString &inputType);
168 (rawtype ==
"DVB") || (rawtype ==
"HDHOMERUN") ||
169 (rawtype ==
"SATIP");
175 (rawtype ==
"DVB") || (rawtype ==
"HDHOMERUN") ||
176 (rawtype ==
"ASI") || (rawtype ==
"FREEBOX") ||
177 (rawtype ==
"CETON") || (rawtype ==
"EXTERNAL") ||
178 (rawtype ==
"VBOX") || (rawtype ==
"V4L2ENC") ||
179 (rawtype ==
"SATIP");
182 static bool HasTuner(
const QString &rawtype,
const QString & device);
183 static bool IsTunerShared(
uint inputidA,
uint inputidB);
188 (rawtype ==
"DVB") || (rawtype ==
"HDHOMERUN") ||
189 (rawtype ==
"ASI") || (rawtype ==
"CETON") ||
190 (rawtype ==
"EXTERNAL") || (rawtype ==
"SATIP");
196 (rawtype ==
"V4L") || (rawtype ==
"V4L2ENC" ||
203 (rawtype ==
"FIREWIRE") || (rawtype ==
"HDPVR") ||
204 (rawtype ==
"EXTERNAL") || (rawtype ==
"V4L2ENC");
210 (rawtype ==
"FIREWIRE") || (rawtype ==
"HDHOMERUN") ||
211 (rawtype ==
"FREEBOX") || (rawtype ==
"ASI") ||
212 (rawtype ==
"IMPORT") || (rawtype ==
"DEMO") ||
213 (rawtype ==
"CETON") || (rawtype ==
"EXTERNAL") ||
214 (rawtype ==
"VBOX") || (rawtype ==
"SATIP");
219 return !(rawtype ==
"FREEBOX" || rawtype ==
"VBOX");
223 static bool IsVBoxPresent(
uint inputid);
226 static bool IsSatIPPresent(
uint inputid);
231 static int CreateCaptureCard(
const QString &videodevice,
232 const QString &audiodevice,
233 const QString &vbidevice,
234 const QString &inputtype,
239 bool dvb_wait_for_seqstart,
242 uint dvb_diseqc_type,
244 const QString &firewire_model,
245 uint firewire_connection,
246 std::chrono::milliseconds signal_timeout,
247 std::chrono::milliseconds channel_timeout,
248 uint dvb_tuning_delay,
256 static bool DeleteInput(
uint inputid);
257 static bool DeleteAllInputs(
void);
258 static std::vector<uint> GetInputList(
void);
259 static std::vector<uint> GetSchedInputList(
void);
260 static std::vector<uint> GetLiveTVInputList(
void);
265 std::vector<uint> list = GetInputIDs(videodevice);
271 static std::vector<uint> GetInputIDs(
const QString& videodevice = QString(),
272 const QString& rawtype = QString(),
273 const QString& inputname = QString(),
276 static uint GetChildInputCount(
uint inputid);
277 static std::vector<uint> GetChildInputIDs(
uint inputid);
279 static bool IsInputTypePresent(
const QString &rawtype,
281 static InputTypes GetInputTypes(
void);
282 static QStringList GetInputTypeNames(
uint sourceid);
284 static QStringList GetVideoDevices(
const QString &rawtype,
307 {
return set_on_input(col, inputid, QString::number(val)); }
312 static bool SetStartChannel(
uint inputid,
313 const QString &channum);
316 static int CreateCardInput(
uint inputid,
318 const QString &inputname,
319 const QString &externalcommand,
320 const QString &changer_device,
321 const QString &changer_model,
323 const QString &tunechan,
324 const QString &startchan,
325 const QString &displayname,
334 static std::vector<uint> GetInputIDs(
uint sourceid);
335 static bool GetInputInfo(
InputInfo &input,
336 std::vector<uint> *groupids =
nullptr);
337 static QList<InputInfo> GetAllInputInfo();
338 static QString GetInputName(
uint inputid);
339 static QString GetStartChannel(
uint inputid);
340 static QString GetDisplayName(
uint inputid);
341 static bool IsUniqueDisplayName(
const QString &name,
342 uint exclude_inputid);
343 static uint GetSourceID(
uint inputid);
346 static uint CreateInputGroup(
const QString &name);
347 static uint CreateDeviceInputGroup(
uint inputid,
350 const QString &device);
351 static uint GetDeviceInputGroup(
uint inputid);
352 static bool LinkInputGroup(
uint inputid,
uint inputgroupid);
353 static bool UnlinkInputGroup(
uint inputid,
uint inputgroupid);
354 static std::vector<uint> GetInputGroups(
uint inputid);
355 static std::vector<uint> GetGroupInputIDs(
uint inputgroupid);
356 static std::vector<uint> GetConflictingInputs(
uint inputid);
358 static QString GetDeviceLabel(
const QString &inputtype,
359 const QString &videodevice);
360 static QString GetDeviceLabel(
uint inputid);
362 static QString ProbeSubTypeName(
uint inputid);
364 static QStringList ProbeVideoInputs(
const QString& device,
365 const QString& inputtype = QString());
366 static QStringList ProbeAudioInputs(
const QString& device,
367 const QString& inputtype = QString());
368 static void GetDeviceInputNames(
const QString &device,
369 const QString &inputtype,
370 QStringList &inputs);
373 static QStringList ProbeVideoDevices(
const QString &rawtype);
374 static void ClearVideoDeviceCache();
377 static uint CloneCard(
uint src_inputid,
uint dst_inputid);
378 static bool InputSetMaxRecordings(
uint parentid,
379 uint max_recordings);
380 static uint AddChildInput(
uint parentid);
381 static QString GetFirewireChangerNode(
uint inputid);
382 static QString GetFirewireChangerModel(
uint inputid);
385 static bool GetTimeouts(
uint inputid,
386 std::chrono::milliseconds &signal_timeout,
387 std::chrono::milliseconds &channel_timeout);
388 static bool IgnoreEncrypted(
uint inputid,
389 const QString &inputname);
390 static bool TVOnly(
uint inputid,
const QString &inputname);
391 static bool IsInNeedOfExternalInputConf(
uint inputid);
392 static uint GetQuickTuning(
uint inputid,
const QString &input_name);
397 {
return "DVB" == GetRawInputType(inputid); }
398 static bool IsDVBInputType(
const QString &inputType);
399 static QStringList ProbeDeliverySystems(
const QString &device);
400 static QStringList ProbeDeliverySystems(
int fd_frontend);
401 static QString ProbeDefaultDeliverySystem(
const QString &device);
402 static QString ProbeDVBType(
const QString &device);
403 static QString ProbeDVBFrontendName(
const QString &device);
404 static bool HasDVBCRCBug(
const QString &device);
405 static std::chrono::milliseconds GetMinSignalMonitoringDelay(
const QString &device);
409 static DTVTunerType ProbeTunerType(
const QString &device);
416 static int SetDefaultDeliverySystem(
uint inputid,
int fd);
417 static int SetDeliverySystem(
uint inputid);
419 static int SetDeliverySystem(
uint inputid,
int fd);
421 static int OpenVideoDevice(
int inputid);
422 static int OpenVideoDevice(
const QString &device);
424 static InputNames GetConfiguredDVBInputs(
const QString &device);
425 static QStringList CapabilitiesToString(uint64_t capabilities);
428 static bool hasV4L2(
int videofd);
429 static bool GetV4LInfo(
int videofd, QString &input, QString &driver,
430 uint32_t &
version, uint32_t &capabilities);
431 static bool GetV4LInfo(
int videofd, QString &input, QString &driver)
435 return GetV4LInfo(videofd, input, driver, d1, d2);
437 static InputNames ProbeV4LVideoInputs(
int videofd,
bool &ok);
438 static InputNames ProbeV4LAudioInputs(
int videofd,
bool &ok);
441 static bool HDHRdoesDVB(
const QString &device);
442 static bool HDHRdoesDVBC(
const QString &device);
443 static QString GetHDHRdesc(
const QString &device);
446 static QString GetVBoxdesc(
const QString &
id,
const QString &ip,
447 const QString &tunerNo,
const QString &tunerType);
450 static int GetASIDeviceNumber(
const QString &device,
451 QString *
error =
nullptr);
453 static uint GetASIBufferSize(
uint device_num,
454 QString *
error =
nullptr);
455 static uint GetASINumBuffers(
uint device_num,
456 QString *
error =
nullptr);
457 static int GetASIMode(
uint device_num,
458 QString *
error =
nullptr);
459 static bool SetASIMode(
uint device_num,
uint mode,
460 QString *
error =
nullptr);
463 static QStringList ProbeV4LVideoInputs(
const QString& device);
464 static QStringList ProbeV4LAudioInputs(
const QString& device);
465 static QStringList ProbeDVBInputs(
const QString& device);