8#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
9#include <QtSystemDetection>
16#include <sys/socket.h>
17#include <netinet/in.h>
36#define LOC QString("HDHRChan[%1](%2): ").arg(m_inputId).arg(HDHRChannel::GetDevice())
40 m_deviceId(
std::move(device))
54 bool is_master = (master ==
this);
61 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"Opening HDHR channel");
84 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"Closing HDHR channel");
130 if ((QChar(
'8') == b) || (QChar(
'7') == b) || (QChar(
'6') == b))
132 return QString(
"auto%1t").arg(b);
142 if ((QChar(
'a') == b) && (mod !=
"auto") && (tuning.
m_symbolRate > 0))
143 return QString(
"a8%1-%2")
145 if ((QChar(
'a') == b) || (mod ==
"auto"))
148 return QString(
"a%1%2-%3")
150 return QString(
"auto%1c").arg(b);
160 return (mod ==
"auto") ?
"qam" : mod;
175 QString chan = QString(
"%1:%2").arg(spec).arg(tuning.
m_frequency);
177 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"Tuning to " + chan);
197 bool has_dvbc =
false;
198 bool has_dvbt =
false;
205 if (has_dvbt && has_dvbc)
virtual int GetInputID(void) const
virtual bool InitializeInput(void)
Fills in input map from DB.
Class providing a generic interface to digital tuning hardware.
static void ReturnMasterLock(DTVChannelP &chan)
void DeregisterForMaster(const QString &key)
bool SetChannelByString(const QString &chan) override
void SetSIStandard(const QString &si_std)
Sets PSIP table standard: MPEG, DVB, ATSC, or OpenCable.
static DTVChannel * GetMasterLock(const QString &key)
void RegisterForMaster(const QString &key)
DTVModulation m_modulation
static const int kTunerTypeDVBT
static const int kTunerTypeUnknown
static const int kTunerTypeDVBC
static const int kTunerTypeDVBT2
static const int kTunerTypeATSC
void Close(void) override
Closes the channel changing hardware to use.
bool Tune(const DTVMultiplex &tuning) override
This performs the actual frequency tuning and in some cases input switching.
std::vector< DTVTunerType > m_tunerTypes
bool EnterPowerSavingMode(void) override
Enters power saving mode if the card supports it.
bool Open(void) override
Opens the channel changing hardware for use.
QString GetDevice(void) const override
Returns String representing device, useful for debugging.
bool IsMaster(void) const override
Returns true if this is the first of a number of multi-rec devs.
bool SetChannelByString(const QString &channum) override
HDHRChannel(TVRec *parent, QString device)
HDHRStreamHandler * m_streamHandler
~HDHRChannel(void) override
bool IsOpen(void) const override
Reports whether channel is already open.
bool TuneVChannel(const QString &vchn)
static HDHRStreamHandler * Get(const QString &devname, int inputid, int majorid)
std::vector< DTVTunerType > GetTunerTypes(void) const
bool TuneChannel(const QString &chanid)
bool IsConnected(void) const
static void Return(HDHRStreamHandler *&ref, int inputid)
This is the coordinating class of the Recorder Subsystem.
#define LOC
HDHRChannel Copyright (c) 2006-2009 by Silicondust Engineering Ltd.
static QString format_dvbt(const DTVMultiplex &tuning)
static QString get_tune_spec(const DTVTunerType tunerType, const DTVMultiplex &tuning)
static QString format_dvbc(const DTVMultiplex &tuning, const QString &mod)
static QString format_modulation(const DTVMultiplex &tuning)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)