11#include <sys/socket.h>
12#include <netinet/in.h>
31#define LOC QString("HDHRChan[%1](%2): ").arg(m_inputId).arg(HDHRChannel::GetDevice())
35 m_deviceId(
std::move(device))
49 bool is_master = (master ==
this);
56 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"Opening HDHR channel");
79 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"Closing HDHR channel");
125 if ((QChar(
'8') == b) || (QChar(
'7') == b) || (QChar(
'6') == b))
127 return QString(
"auto%1t").arg(b);
137 if ((QChar(
'a') == b) && (mod !=
"auto") && (tuning.
m_symbolRate > 0))
138 return QString(
"a8%1-%2")
140 if ((QChar(
'a') == b) || (mod ==
"auto"))
143 return QString(
"a%1%2-%3")
145 return QString(
"auto%1c").arg(b);
155 return (mod ==
"auto") ?
"qam" : mod;
170 QString chan = QString(
"%1:%2").arg(spec).arg(tuning.
m_frequency);
172 LOG(VB_CHANNEL, LOG_INFO,
LOC +
"Tuning to " + chan);
192 bool has_dvbc =
false;
193 bool has_dvbt =
false;
200 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_)