MythTV  master
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
DVBChannel Class Reference

Provides interface to the tuning hardware when using DVB drivers. More...

#include <dvbchannel.h>

Inheritance diagram for DVBChannel:
Inheritance graph
[legend]
Collaboration diagram for DVBChannel:
Collaboration graph
[legend]

Public Member Functions

 DVBChannel (QString device, TVRec *parent=nullptr)
 
 ~DVBChannel () override
 
bool Open (void) override
 Opens the channel changing hardware for use. More...
 
void Close (void) override
 Closes the channel changing hardware to use. More...
 
bool Init (QString &startchannel, bool setchan) override
 
void SetPMT (const ProgramMapTable *pmt)
 Tells the Conditional Access Module which streams we wish to decode. More...
 
void SetTimeOffset (double offset)
 Tells the Conditional Access Module the offset from the computers utc time to dvb time. More...
 
void SetSlowTuning (std::chrono::milliseconds how_slow)
 
bool IsOpen (void) const override
 Reports whether channel is already open. More...
 
int GetFd (void) const override
 Returns file descriptor, -1 if it does not exist. More...
 
bool IsTuningParamsProbeSupported (void) const
 Returns true iff tuning info probing is working. More...
 
QString GetDevice (void) const override
 Returns String representing device, useful for debugging. More...
 
QString GetCardNum (void) const
 Returns DVB device number, used to construct filenames for DVB devices. More...
 
QString GetFrontendName (void) const
 Returns frontend name as reported by driver. More...
 
bool IsMaster (void) const override
 Returns true if this is the first of a number of multi-rec devs. More...
 
bool HasCRCBug (void) const
 Returns true iff we have a faulty DVB driver that munges PMT. More...
 
std::chrono::milliseconds GetMinSignalMonitorDelay (void) const
 
const DiSEqCDevRotorGetRotor (void) const
 Returns rotor object if it exists, nullptr otherwise. More...
 
bool HasLock (bool *ok=nullptr) const
 Returns true iff we have a signal carrier lock. More...
 
double GetSignalStrength (bool *ok=nullptr) const
 Returns signal strength in the range [0.0..1.0] (non-calibrated). More...
 
double GetSNR (bool *ok=nullptr) const
 Returns signal/noise in the range [0..1.0]. More...
 
double GetBitErrorRate (bool *ok=nullptr) const
 Returns # of corrected bits since last call. First call undefined. More...
 
double GetUncorrectedBlockCount (bool *ok=nullptr) const
 Returns # of uncorrected blocks since last call. First call undefined. More...
 
uint64_t GetCapabilities (void) const
 
bool CanDo (uint64_t capability) const
 
bool SwitchToInput (int newcapchannel, bool setstarting)
 
bool Tune (const DTVMultiplex &tuning) override
 This performs the actual frequency tuning and in some cases input switching. More...
 
bool Tune (const DTVMultiplex &tuning, bool force_reset=false, bool same_input=false)
 Tunes the card to a frequency but does not deal with PIDs. More...
 
bool Retune (void) override
 
bool ProbeTuningParams (DTVMultiplex &tuning) const
 Fetches DTVMultiplex params from driver. More...
 
virtual bool Tune (const DTVMultiplex &tuning)=0
 This performs the actual frequency tuning and in some cases input switching. More...
 
virtual bool Tune (const IPTVTuningData &, bool)
 Performs IPTV Tuning. Only implemented by IPTVChannel. More...
 
virtual bool Tune (const QString &)
 Leave it up to the implementation to map the channnum appropriately. More...
 
bool Tune ([[maybe_unused]] const QString &freqid,[[maybe_unused]] int finetune) override
 This tunes on the frequency Identification parameter for hardware that supports it. More...
 
virtual bool Tune ([[maybe_unused]] uint64_t frequency)
 
- Public Member Functions inherited from DTVChannel
 DTVChannel (TVRec *parent)
 
 ~DTVChannel () override
 
bool SetChannelByString (const QString &chan) override
 
void SetFormat (const QString &format) override
 
QString GetFormat (void)
 
virtual bool TuneMultiplex (uint mplexid, const QString &inputname)
 To be used by the channel scanner and possibly the EIT scanner. More...
 
virtual bool Tune (const IPTVTuningData &, bool)
 Performs IPTV Tuning. Only implemented by IPTVChannel. More...
 
virtual bool Tune (const QString &)
 Leave it up to the implementation to map the channnum appropriately. More...
 
virtual bool EnterPowerSavingMode (void)
 Enters power saving mode if the card supports it. More...
 
bool Tune ([[maybe_unused]] const QString &freqid, [[maybe_unused]] int finetune) override
 This tunes on the frequency Identification parameter for hardware that supports it. More...
 
virtual bool Tune ([[maybe_unused]] uint64_t frequency)
 
int GetProgramNumber (void) const
 Returns program number in PAT, -1 if unknown. More...
 
uint GetMajorChannel (void) const
 Returns major channel, 0 if unknown. More...
 
uint GetMinorChannel (void) const
 Returns minor channel, 0 if unknown. More...
 
uint GetOriginalNetworkID (void) const
 Returns DVB original_network_id, 0 if unknown. More...
 
uint GetTransportID (void) const
 Returns DVB transport_stream_id, 0 if unknown. More...
 
QString GetSIStandard (void) const
 Returns PSIP table standard: MPEG, DVB, ATSC, or OpenCable. More...
 
QString GetSuggestedTuningMode (bool is_live_tv) const
 Returns suggested tuning mode: "mpeg", "dvb", or "atsc". More...
 
QString GetTuningMode (void) const
 Returns tuning mode last set by SetTuningMode(). More...
 
virtual std::vector< DTVTunerTypeGetTunerTypes (void) const
 Returns a vector of supported tuning types. More...
 
void GetCachedPids (pid_cache_t &pid_cache) const
 Returns cached MPEG PIDs for last tuned channel. More...
 
void RegisterForMaster (const QString &key)
 
void DeregisterForMaster (const QString &key)
 
virtual bool IsPIDTuningSupported (void) const
 
virtual bool IsIPTV (void) const
 
bool HasGeneratedPAT (void) const
 
bool HasGeneratedPMT (void) const
 
const ProgramAssociationTableGetGeneratedPAT (void) const
 
const ProgramMapTableGetGeneratedPMT (void) const
 
void SetTuningMode (const QString &tuning_mode)
 Sets tuning mode: "mpeg", "dvb", "atsc", etc. More...
 
void SaveCachedPids (const pid_cache_t &pid_cache) const
 Saves MPEG PIDs to cache to database. More...
 
- Public Member Functions inherited from ChannelBase
 ChannelBase (TVRec *parent)
 
virtual ~ChannelBase (void)
 
virtual bool IsTunable (const QString &channum) const
 
virtual int SetFreqTable (const QString &)
 
virtual void SetFd (int fd)
 Sets file descriptor. More...
 
virtual bool Tune (const QString &, int)
 
virtual bool IsExternalChannelChangeInUse (void)
 
virtual uint GetNextChannel (uint chanid, ChannelChangeDirection direction) const
 
virtual uint GetNextChannel (const QString &channum, ChannelChangeDirection direction) const
 
virtual QString GetChannelName (void) const
 
virtual int GetInputID (void) const
 
virtual QString GetInputName (void) const
 
virtual uint GetSourceID (void) const
 
bool IsCommercialFree (void) const
 Returns true iff commercial detection is not required. More...
 
virtual void Renumber (uint sourceid, const QString &oldChanNum, const QString &newChanNum)
 Changes a channum if we have it cached anywhere. More...
 
virtual bool InitializeInput (void)
 Fills in input map from DB. More...
 
virtual void StoreInputChannels (void)
 Saves current channel as the default channel for the current input. More...
 
virtual bool InitPictureAttributes (void)
 
virtual int GetPictureAttribute (PictureAttribute) const
 
virtual int ChangePictureAttribute (PictureAdjustType, PictureAttribute, bool)
 
bool CheckChannel (const QString &channum) const
 
void SetInputID (uint _inputid)
 
int GetMajorID (void)
 

Private Member Functions

bool Open (DVBChannel *who)
 
void Close (DVBChannel *who)
 
int GetChanID (void) const override
 Returns Channel ID. More...
 
void CheckOptions (DTVMultiplex &t) const override
 Checks tuning for problems, and tries to fix them. More...
 
void CheckFrequency (uint64_t frequency) const
 Checks tuning frequency. More...
 
bool CheckModulation (DTVModulation modulation) const
 Return true iff modulation is supported modulation on the frontend. More...
 
bool CheckCodeRate (DTVCodeRate rate) const
 Return true iff rate is supported rate on the frontend. More...
 
DVBChannelGetMasterLock (void) const
 
double GetSignalStrengthDVBv5 (bool *ok) const
 Get Signal strength from the DVBv5 interface [0-1.0] It is transformed to a linear relative scale if provided in dB. More...
 
double GetSNRDVBv5 (bool *ok) const
 Get SNR from the DVBv5 interface [0-1.0] It is transformed to a linear relative scale if provided in dB. More...
 
double GetBitErrorRateDVBv5 (bool *ok) const
 Get Bit Error Rate from the DVBv5 interface. More...
 
double GetUncorrectedBlockCountDVBv5 (bool *ok) const
 Get Uncorrected Block Count from the DVBv5 interface. More...
 
void DrainDVBEvents (void)
 
bool WaitForBackend (std::chrono::milliseconds timeout_ms)
 Waits for backend to get tune message. More...
 

Static Private Member Functions

static void ReturnMasterLock (DVBChannel *&dvbm)
 

Private Attributes

IsOpenMap m_isOpen
 
DiSEqCDevSettings m_diseqcSettings
 
DiSEqCDevTreem_diseqcTree {nullptr}
 
DVBCamm_dvbCam {nullptr}
 
QString m_frontendName
 
uint64_t m_capabilities {0}
 
uint64_t m_extModulations {0}
 
uint64_t m_frequencyMinimum {0}
 
uint64_t m_frequencyMaximum {0}
 
uint m_symbolRateMinimum {0}
 
uint m_symbolRateMaximum {0}
 
uint m_version {0}
 
bool m_legacyFe {false}
 
bool m_hasV5Stats {false}
 
DTVModulationSystem m_currentSys
 
QList< DTVModulationSystemm_sysList
 
QMutex m_tuneLock
 
QRecursiveMutex m_hwLock
 
DTVMultiplex m_desiredTuning
 
DTVMultiplex m_prevTuning
 
uint m_lastLnbDevId {(uint)~0x0}
 
std::chrono::milliseconds m_tuningDelay { 0ms}
 
std::chrono::milliseconds m_sigMonDelay {25ms}
 
bool m_firstTune {true}
 
int m_fdFrontend {-1}
 
QString m_device
 
QString m_key
 
bool m_hasCrcBug {false}
 
QMutex m_tuneDelayLock
 

Static Private Attributes

static std::chrono::milliseconds s_lastTuning = MythDate::currentMSecsSinceEpochAsDuration()
 

Additional Inherited Members

- Public Types inherited from DTVChannel
using DTVChannelP = DTVChannel *
 
- Static Public Member Functions inherited from DTVChannel
static DTVChannelGetMasterLock (const QString &key)
 
static void ReturnMasterLock (DTVChannelP &chan)
 
- Static Public Member Functions inherited from ChannelBase
static ChannelBaseCreateChannel (TVRec *tvrec, const GeneralDBOptions &genOpt, const DVBDBOptions &dvbOpt, const FireWireDBOptions &fwOpt, const QString &startchannel, bool enter_power_save_mode, QString &rbFileExt, bool setchan)
 
- Protected Types inherited from DTVChannel
using MasterMap = QMap< QString, QList< DTVChannel * > >
 
- Protected Member Functions inherited from DTVChannel
void SetSIStandard (const QString &si_std)
 Sets PSIP table standard: MPEG, DVB, ATSC, or OpenCable. More...
 
void SetDTVInfo (uint atsc_major, uint atsc_minor, uint dvb_orig_netid, uint mpeg_tsid, int mpeg_pnum)
 
void ClearDTVInfo (void)
 
void HandleScriptEnd (bool ok) override
 
- Protected Member Functions inherited from ChannelBase
virtual bool IsInputAvailable (uint &mplexid_restriction, uint &chanid_restriction) const
 Switches to another input on hardware, and sets the channel is setstarting is true. More...
 
virtual bool IsExternalChannelChangeSupported (void)
 
bool KillScript (void)
 
void HandleScript (const QString &freqid)
 
uint GetScriptStatus (bool holding_lock=false)
 
bool ChangeExternalChannel (const QString &changer, const QString &freqid)
 
bool ChangeInternalChannel (const QString &freqid, uint cardinputid) const
 
- Protected Attributes inherited from DTVChannel
QMutex m_dtvinfoLock
 
DTVTunerType m_tunerType {DTVTunerType::kTunerTypeUnknown}
 
QString m_sistandard {"mpeg"}
 PSIP table standard: MPEG, DVB, ATSC, OpenCable. More...
 
QString m_tuningMode
 
QString m_tvFormat
 
int m_currentProgramNum {-1}
 
uint m_currentATSCMajorChannel {0}
 
uint m_currentATSCMinorChannel {0}
 
uint m_currentTransportID {0}
 
uint m_currentOriginalNetworkID {0}
 
ProgramAssociationTablem_genPAT {nullptr}
 This is a generated PAT for RAW pid tuning. More...
 
ProgramMapTablem_genPMT {nullptr}
 This is a generated PMT for RAW pid tuning. More...
 
- Protected Attributes inherited from ChannelBase
TVRecm_pParent {nullptr}
 
QString m_curChannelName
 
bool m_commFree {false}
 
uint m_inputId {0}
 
uint m_sourceId {0}
 
QString m_name
 
QString m_startChanNum
 
QString m_externalChanger
 
QString m_tuneToChannel
 
ChannelInfoList m_channels
 channels across all inputs More...
 
QMutex m_systemLock
 
MythSystemLegacym_system {nullptr}
 
uint m_systemStatus {0}
 These get mapped from the GENERIC_EXIT_* to these values for use with the signalmonitor code. More...
 
- Static Protected Attributes inherited from DTVChannel
static QReadWriteLock s_master_map_lock
 
static MasterMap s_master_map
 

Detailed Description

Provides interface to the tuning hardware when using DVB drivers.

Bug:
Only supports single input cards.

Definition at line 31 of file dvbchannel.h.

Constructor & Destructor Documentation

◆ DVBChannel()

DVBChannel::DVBChannel ( QString  device,
TVRec parent = nullptr 
)
explicit

Definition at line 80 of file dvbchannel.cpp.

◆ ~DVBChannel()

DVBChannel::~DVBChannel ( )
override

Definition at line 106 of file dvbchannel.cpp.

Member Function Documentation

◆ Open() [1/2]

bool DVBChannel::Open ( void  )
inlineoverridevirtual

Opens the channel changing hardware for use.

Implements ChannelBase.

Definition at line 37 of file dvbchannel.h.

Referenced by Init(), and Open().

◆ Close() [1/2]

void DVBChannel::Close ( void  )
inlineoverridevirtual

Closes the channel changing hardware to use.

Implements ChannelBase.

Definition at line 39 of file dvbchannel.h.

Referenced by Close(), Open(), and ~DVBChannel().

◆ Init()

bool DVBChannel::Init ( QString &  startchannel,
bool  setchan 
)
overridevirtual

Reimplemented from ChannelBase.

Definition at line 552 of file dvbchannel.cpp.

◆ SetPMT()

void DVBChannel::SetPMT ( const ProgramMapTable pmt)

Tells the Conditional Access Module which streams we wish to decode.

Definition at line 726 of file dvbchannel.cpp.

Referenced by DVBSignalMonitor::HandlePMT(), DVBRecorder::SetCAMPMT(), and ChannelScanSM::TestNextProgramEncryption().

◆ SetTimeOffset()

void DVBChannel::SetTimeOffset ( double  offset)

Tells the Conditional Access Module the offset from the computers utc time to dvb time.

Definition at line 738 of file dvbchannel.cpp.

Referenced by DVBSignalMonitor::HandleSTT(), DVBSignalMonitor::HandleTDT(), and DVBRecorder::UpdateCAMTimeOffset().

◆ SetSlowTuning()

void DVBChannel::SetSlowTuning ( std::chrono::milliseconds  how_slow)
inline

Definition at line 47 of file dvbchannel.h.

Referenced by ChannelBase::CreateChannel().

◆ IsOpen()

bool DVBChannel::IsOpen ( void  ) const
overridevirtual

Reports whether channel is already open.

Implements ChannelBase.

Definition at line 544 of file dvbchannel.cpp.

Referenced by Init().

◆ GetFd()

int DVBChannel::GetFd ( void  ) const
inlineoverridevirtual

Returns file descriptor, -1 if it does not exist.

Reimplemented from ChannelBase.

Definition at line 52 of file dvbchannel.h.

◆ IsTuningParamsProbeSupported()

bool DVBChannel::IsTuningParamsProbeSupported ( void  ) const

Returns true iff tuning info probing is working.

Definition at line 988 of file dvbchannel.cpp.

Referenced by IsTuningParamsProbeSupported().

◆ GetDevice()

QString DVBChannel::GetDevice ( void  ) const
inlineoverridevirtual

Returns String representing device, useful for debugging.

Reimplemented from ChannelBase.

Definition at line 56 of file dvbchannel.h.

◆ GetCardNum()

QString DVBChannel::GetCardNum ( void  ) const
inline

Returns DVB device number, used to construct filenames for DVB devices.

Definition at line 59 of file dvbchannel.h.

Referenced by DVBSignalMonitor::DVBSignalMonitor().

◆ GetFrontendName()

QString DVBChannel::GetFrontendName ( void  ) const
inline

Returns frontend name as reported by driver.

Definition at line 61 of file dvbchannel.h.

◆ IsMaster()

bool DVBChannel::IsMaster ( void  ) const
overridevirtual

Returns true if this is the first of a number of multi-rec devs.

Reimplemented from DTVChannel.

Definition at line 1540 of file dvbchannel.cpp.

◆ HasCRCBug()

bool DVBChannel::HasCRCBug ( void  ) const
inline

Returns true iff we have a faulty DVB driver that munges PMT.

Definition at line 64 of file dvbchannel.h.

◆ GetMinSignalMonitorDelay()

std::chrono::milliseconds DVBChannel::GetMinSignalMonitorDelay ( void  ) const
inline

Definition at line 65 of file dvbchannel.h.

Referenced by DVBSignalMonitor::DVBSignalMonitor().

◆ GetRotor()

const DiSEqCDevRotor * DVBChannel::GetRotor ( void  ) const

Returns rotor object if it exists, nullptr otherwise.

Definition at line 1158 of file dvbchannel.cpp.

Referenced by DVBSignalMonitor::GetRotorStatus(), ChannelScanSM::HasTimedOut(), DVBStreamHandler::RetuneMonitor(), and DVBSignalMonitor::UpdateValues().

◆ HasLock()

bool DVBChannel::HasLock ( bool ok = nullptr) const

Returns true iff we have a signal carrier lock.

Definition at line 1166 of file dvbchannel.cpp.

Referenced by HasLock(), and DVBSignalMonitor::UpdateValues().

◆ GetSignalStrength()

double DVBChannel::GetSignalStrength ( bool ok = nullptr) const

Returns signal strength in the range [0.0..1.0] (non-calibrated).

Definition at line 1257 of file dvbchannel.cpp.

Referenced by DVBSignalMonitor::DVBSignalMonitor(), GetSignalStrength(), and DVBSignalMonitor::UpdateValues().

◆ GetSNR()

double DVBChannel::GetSNR ( bool ok = nullptr) const

Returns signal/noise in the range [0..1.0].

Some drivers report the actual ratio, while others report the dB, but in this case some weak signals may report a very high S/N since negative dB are not supported by MythTV or the 4.0 version of the DVB API due to the large number of drivers that ignored the fact that this was a signed number in the 3.0 API.

Definition at line 1342 of file dvbchannel.cpp.

Referenced by DVBSignalMonitor::DVBSignalMonitor(), GetSNR(), and DVBSignalMonitor::UpdateValues().

◆ GetBitErrorRate()

double DVBChannel::GetBitErrorRate ( bool ok = nullptr) const

Returns # of corrected bits since last call. First call undefined.

Definition at line 1425 of file dvbchannel.cpp.

Referenced by DVBSignalMonitor::DVBSignalMonitor(), GetBitErrorRate(), and DVBSignalMonitor::UpdateValues().

◆ GetUncorrectedBlockCount()

double DVBChannel::GetUncorrectedBlockCount ( bool ok = nullptr) const

Returns # of uncorrected blocks since last call. First call undefined.

Definition at line 1493 of file dvbchannel.cpp.

Referenced by DVBSignalMonitor::DVBSignalMonitor(), GetUncorrectedBlockCount(), and DVBSignalMonitor::UpdateValues().

◆ GetCapabilities()

uint64_t DVBChannel::GetCapabilities ( void  ) const
inline

Definition at line 85 of file dvbchannel.h.

◆ CanDo()

bool DVBChannel::CanDo ( uint64_t  capability) const
inline

Definition at line 86 of file dvbchannel.h.

◆ SwitchToInput()

bool DVBChannel::SwitchToInput ( int  newcapchannel,
bool  setstarting 
)

◆ Tune() [1/7]

bool DVBChannel::Tune ( const DTVMultiplex tuning)
overridevirtual

This performs the actual frequency tuning and in some cases input switching.

In rare cases such as ASI this does nothing since all the channels are in the same MPTS stream on the same input. But generally you will need to implement this when adding support for new hardware.

Implements DTVChannel.

Definition at line 744 of file dvbchannel.cpp.

Referenced by Retune(), and Tune().

◆ Tune() [2/7]

bool DVBChannel::Tune ( const DTVMultiplex tuning,
bool  force_reset = false,
bool  same_input = false 
)

Tunes the card to a frequency but does not deal with PIDs.

This is used by DVB Channel Scanner, the EIT Parser, and by TVRec.

Parameters
tuningInfo on transport to tune to
force_resetIf true, frequency tuning is done even if it should not be needed.
same_inputOptional, doesn't change input (for retuning).
Returns
true on success, false on failure

Definition at line 770 of file dvbchannel.cpp.

◆ Retune()

bool DVBChannel::Retune ( void  )
overridevirtual

Reimplemented from ChannelBase.

Definition at line 980 of file dvbchannel.cpp.

Referenced by DVBStreamHandler::RetuneMonitor().

◆ ProbeTuningParams()

bool DVBChannel::ProbeTuningParams ( DTVMultiplex tuning) const

Fetches DTVMultiplex params from driver.

Note: Only updates tuning on success.

Returns
true on success, false on failure

Definition at line 1034 of file dvbchannel.cpp.

Referenced by ProbeTuningParams().

◆ Open() [2/2]

bool DVBChannel::Open ( DVBChannel who)
private

Definition at line 183 of file dvbchannel.cpp.

◆ Close() [2/2]

void DVBChannel::Close ( DVBChannel who)
private

Definition at line 144 of file dvbchannel.cpp.

◆ GetChanID()

int DVBChannel::GetChanID ( void  ) const
overrideprivatevirtual

Returns Channel ID.

Bug:
This only works if there is only one input on the card.

Reimplemented from ChannelBase.

Definition at line 1094 of file dvbchannel.cpp.

◆ CheckOptions()

void DVBChannel::CheckOptions ( DTVMultiplex ) const
overrideprivatevirtual

Checks tuning for problems, and tries to fix them.

Reimplemented from DTVChannel.

Definition at line 575 of file dvbchannel.cpp.

◆ CheckFrequency()

void DVBChannel::CheckFrequency ( uint64_t  frequency) const
private

Checks tuning frequency.

Definition at line 563 of file dvbchannel.cpp.

Referenced by CheckOptions(), and Tune().

◆ CheckModulation()

bool DVBChannel::CheckModulation ( DTVModulation  modulation) const
private

Return true iff modulation is supported modulation on the frontend.

Definition at line 701 of file dvbchannel.cpp.

Referenced by CheckOptions().

◆ CheckCodeRate()

bool DVBChannel::CheckCodeRate ( DTVCodeRate  rate) const
private

Return true iff rate is supported rate on the frontend.

Definition at line 682 of file dvbchannel.cpp.

Referenced by CheckOptions().

◆ GetMasterLock()

DVBChannel * DVBChannel::GetMasterLock ( void  ) const
private

◆ ReturnMasterLock()

void DVBChannel::ReturnMasterLock ( DVBChannel *&  dvbm)
staticprivate

◆ GetSignalStrengthDVBv5()

double DVBChannel::GetSignalStrengthDVBv5 ( bool ok) const
private

Get Signal strength from the DVBv5 interface [0-1.0] It is transformed to a linear relative scale if provided in dB.

Parameters
okset to true if provided and value exists
Returns
linear signal strength in [0.0-1.0]

Definition at line 1200 of file dvbchannel.cpp.

Referenced by GetSignalStrength().

◆ GetSNRDVBv5()

double DVBChannel::GetSNRDVBv5 ( bool ok) const
private

Get SNR from the DVBv5 interface [0-1.0] It is transformed to a linear relative scale if provided in dB.

Parameters
okset to true if provided and value exists
Returns
linear SNR in [0.0-1.0]

Definition at line 1290 of file dvbchannel.cpp.

Referenced by GetSNR().

◆ GetBitErrorRateDVBv5()

double DVBChannel::GetBitErrorRateDVBv5 ( bool ok) const
private

Get Bit Error Rate from the DVBv5 interface.

Parameters
okset to true if provided and value exists
Returns
bit error rate

Definition at line 1375 of file dvbchannel.cpp.

Referenced by GetBitErrorRate().

◆ GetUncorrectedBlockCountDVBv5()

double DVBChannel::GetUncorrectedBlockCountDVBv5 ( bool ok) const
private

Get Uncorrected Block Count from the DVBv5 interface.

Parameters
okset to true if provided and value exists
Returns
block count

Definition at line 1456 of file dvbchannel.cpp.

Referenced by GetUncorrectedBlockCount().

◆ DrainDVBEvents()

void DVBChannel::DrainDVBEvents ( void  )
private

Definition at line 1552 of file dvbchannel.cpp.

Referenced by Tune().

◆ WaitForBackend()

bool DVBChannel::WaitForBackend ( std::chrono::milliseconds  timeout_ms)
private

Waits for backend to get tune message.

With linux 2.6.12 or later this should block until the backend is tuned to the proper frequency.

With earlier kernels sleeping for timeout_ms may save us.

Waiting for DVB events has been tried, but this fails with several DVB cards. They either don't send the required events or delete them from the event queue before we can read the event.

Using a FE_GET_FRONTEND has also been tried, but returns the old data until a 2 sec timeout elapses on at least one DVB card.

We do not block until we have a lock, the signal monitor does that.

Parameters
timeout_mstimeout before FE_READ_STATUS in milliseconds

Definition at line 1587 of file dvbchannel.cpp.

Referenced by Tune().

◆ Tune() [3/7]

virtual bool DTVChannel::Tune

This performs the actual frequency tuning and in some cases input switching.

In rare cases such as ASI this does nothing since all the channels are in the same MPTS stream on the same input. But generally you will need to implement this when adding support for new hardware.

◆ Tune() [4/7]

virtual bool DTVChannel::Tune
inline

Performs IPTV Tuning. Only implemented by IPTVChannel.

Definition at line 58 of file dtvchannel.h.

◆ Tune() [5/7]

virtual bool DTVChannel::Tune
inline

Leave it up to the implementation to map the channnum appropriately.

Used by the ExternalRecorder.

Definition at line 63 of file dtvchannel.h.

◆ Tune() [6/7]

bool DTVChannel::Tune
inlineoverride

This tunes on the frequency Identification parameter for hardware that supports it.

This is only called when there is no frequency set. This is used to implement "Channel Numbers" in analog tuning scenarios and to implement "Virtual Channels" in the OCUR and Firewire tuners.

Definition at line 75 of file dtvchannel.h.

◆ Tune() [7/7]

virtual bool DTVChannel::Tune
inline

Definition at line 81 of file dtvchannel.h.

Member Data Documentation

◆ m_isOpen

IsOpenMap DVBChannel::m_isOpen
private

Definition at line 135 of file dvbchannel.h.

Referenced by Close(), IsOpen(), Open(), and ~DVBChannel().

◆ m_diseqcSettings

DiSEqCDevSettings DVBChannel::m_diseqcSettings
private

Definition at line 138 of file dvbchannel.h.

Referenced by GetRotor(), Open(), and Tune().

◆ m_diseqcTree

DiSEqCDevTree* DVBChannel::m_diseqcTree {nullptr}
private

◆ m_dvbCam

DVBCam* DVBChannel::m_dvbCam {nullptr}
private

Definition at line 140 of file dvbchannel.h.

Referenced by Close(), DVBChannel(), SetPMT(), SetTimeOffset(), and ~DVBChannel().

◆ m_frontendName

QString DVBChannel::m_frontendName
private

Definition at line 143 of file dvbchannel.h.

Referenced by GetFrontendName(), and Open().

◆ m_capabilities

uint64_t DVBChannel::m_capabilities {0}
private

◆ m_extModulations

uint64_t DVBChannel::m_extModulations {0}
private

Definition at line 145 of file dvbchannel.h.

Referenced by Open().

◆ m_frequencyMinimum

uint64_t DVBChannel::m_frequencyMinimum {0}
private

Definition at line 146 of file dvbchannel.h.

Referenced by CheckFrequency(), and Open().

◆ m_frequencyMaximum

uint64_t DVBChannel::m_frequencyMaximum {0}
private

Definition at line 147 of file dvbchannel.h.

Referenced by CheckFrequency(), and Open().

◆ m_symbolRateMinimum

uint DVBChannel::m_symbolRateMinimum {0}
private

Definition at line 148 of file dvbchannel.h.

Referenced by CheckOptions(), and Open().

◆ m_symbolRateMaximum

uint DVBChannel::m_symbolRateMaximum {0}
private

Definition at line 149 of file dvbchannel.h.

Referenced by CheckOptions(), and Open().

◆ m_version

uint DVBChannel::m_version {0}
private

Definition at line 151 of file dvbchannel.h.

Referenced by Open().

◆ m_legacyFe

bool DVBChannel::m_legacyFe {false}
private

◆ m_hasV5Stats

bool DVBChannel::m_hasV5Stats {false}
private

◆ m_currentSys

DTVModulationSystem DVBChannel::m_currentSys
private

Definition at line 154 of file dvbchannel.h.

Referenced by Open(), and Tune().

◆ m_sysList

QList<DTVModulationSystem> DVBChannel::m_sysList
private

Definition at line 155 of file dvbchannel.h.

Referenced by Open().

◆ m_tuneLock

QMutex DVBChannel::m_tuneLock
mutableprivate

Definition at line 158 of file dvbchannel.h.

Referenced by Tune().

◆ m_hwLock

QRecursiveMutex DVBChannel::m_hwLock
mutableprivate

◆ m_desiredTuning

DTVMultiplex DVBChannel::m_desiredTuning
private

Definition at line 161 of file dvbchannel.h.

Referenced by Retune(), and Tune().

◆ m_prevTuning

DTVMultiplex DVBChannel::m_prevTuning
private

Definition at line 162 of file dvbchannel.h.

Referenced by Tune().

◆ m_lastLnbDevId

uint DVBChannel::m_lastLnbDevId {(uint)~0x0}
private

Definition at line 164 of file dvbchannel.h.

Referenced by Tune().

◆ m_tuningDelay

std::chrono::milliseconds DVBChannel::m_tuningDelay { 0ms}
private

Definition at line 166 of file dvbchannel.h.

Referenced by SetSlowTuning(), and Tune().

◆ m_sigMonDelay

std::chrono::milliseconds DVBChannel::m_sigMonDelay {25ms}
private

Definition at line 167 of file dvbchannel.h.

Referenced by DVBChannel(), and GetMinSignalMonitorDelay().

◆ m_firstTune

bool DVBChannel::m_firstTune {true}
private

Definition at line 168 of file dvbchannel.h.

Referenced by Open(), and Tune().

◆ m_fdFrontend

int DVBChannel::m_fdFrontend {-1}
private

◆ m_device

QString DVBChannel::m_device
private

Definition at line 172 of file dvbchannel.h.

Referenced by DVBChannel(), GetCardNum(), GetDevice(), and Open().

◆ m_key

QString DVBChannel::m_key
private

Definition at line 173 of file dvbchannel.h.

Referenced by DVBChannel(), GetMasterLock(), and ~DVBChannel().

◆ m_hasCrcBug

bool DVBChannel::m_hasCrcBug {false}
private

Definition at line 174 of file dvbchannel.h.

Referenced by DVBChannel(), and HasCRCBug().

◆ s_lastTuning

std::chrono::milliseconds DVBChannel::s_lastTuning = MythDate::currentMSecsSinceEpochAsDuration()
staticprivate

Definition at line 176 of file dvbchannel.h.

Referenced by Tune().

◆ m_tuneDelayLock

QMutex DVBChannel::m_tuneDelayLock
private

Definition at line 177 of file dvbchannel.h.

Referenced by Tune().


The documentation for this class was generated from the following files: