MythTV master
|
Provides interface to the tuning hardware when using DVB drivers. More...
#include <libmythtv/recorders/dvbchannel.h>
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 DiSEqCDevRotor * | GetRotor (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 (const QString &freqid, int finetune) override |
This tunes on the frequency Identification parameter for hardware that supports it. More... | |
virtual bool | Tune (uint64_t frequency) |
![]() | |
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 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... | |
virtual bool | EnterPowerSavingMode (void) |
Enters power saving mode if the card supports it. More... | |
bool | Tune (const QString &freqid, int finetune) override |
This tunes on the frequency Identification parameter for hardware that supports it. More... | |
virtual bool | Tune (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< DTVTunerType > | GetTunerTypes (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 | IsMaster (void) const |
Returns true if this is the first of a number of multi-rec devs. More... | |
virtual bool | IsPIDTuningSupported (void) const |
virtual bool | IsIPTV (void) const |
bool | HasGeneratedPAT (void) const |
bool | HasGeneratedPMT (void) const |
const ProgramAssociationTable * | GetGeneratedPAT (void) const |
const ProgramMapTable * | GetGeneratedPMT (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... | |
![]() | |
ChannelBase (TVRec *parent) | |
virtual | ~ChannelBase (void) |
virtual bool | Init (QString &startchannel, bool setchan) |
virtual bool | IsTunable (const QString &channum) const |
virtual bool | Open (void)=0 |
Opens the channel changing hardware for use. More... | |
virtual void | Close (void)=0 |
Closes the channel changing hardware to use. More... | |
virtual bool | IsOpen (void) const =0 |
Reports whether channel is already open. More... | |
virtual bool | SetChannelByString (const QString &chan)=0 |
virtual void | SetFormat (const QString &) |
virtual int | SetFreqTable (const QString &) |
virtual void | SetFd (int fd) |
Sets file descriptor. More... | |
virtual int | GetFd (void) const |
Returns file descriptor, -1 if it does not exist. 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 | GetChanID (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 QString | GetDevice (void) const |
Returns String representing device, useful for debugging. 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 bool | Retune (void) |
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... | |
DVBChannel * | GetMasterLock (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 |
DiSEqCDevTree * | m_diseqcTree {nullptr} |
DVBCam * | m_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< DTVModulationSystem > | m_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 | |
![]() | |
using | DTVChannelP = DTVChannel * |
![]() | |
static DTVChannel * | GetMasterLock (const QString &key) |
static void | ReturnMasterLock (DTVChannelP &chan) |
![]() | |
static ChannelBase * | CreateChannel (TVRec *tvrec, const GeneralDBOptions &genOpt, const DVBDBOptions &dvbOpt, const FireWireDBOptions &fwOpt, const QString &startchannel, bool enter_power_save_mode, QString &rbFileExt, bool setchan) |
![]() | |
using | MasterMap = QMap< QString, QList< 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) |
virtual void | CheckOptions (DTVMultiplex &) const |
Checks tuning for problems, and tries to fix them. More... | |
void | HandleScriptEnd (bool ok) override |
![]() | |
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) |
virtual void | HandleScriptEnd (bool ok) |
uint | GetScriptStatus (bool holding_lock=false) |
bool | ChangeExternalChannel (const QString &changer, const QString &freqid) |
bool | ChangeInternalChannel (const QString &freqid, uint cardinputid) const |
![]() | |
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} |
ProgramAssociationTable * | m_genPAT {nullptr} |
This is a generated PAT for RAW pid tuning. More... | |
ProgramMapTable * | m_genPMT {nullptr} |
This is a generated PMT for RAW pid tuning. More... | |
![]() | |
TVRec * | m_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 |
MythSystemLegacy * | m_system {nullptr} |
uint | m_systemStatus {0} |
These get mapped from the GENERIC_EXIT_* to these values for use with the signalmonitor code. More... | |
![]() | |
static QReadWriteLock | s_master_map_lock |
static MasterMap | s_master_map |
Provides interface to the tuning hardware when using DVB drivers.
Definition at line 30 of file dvbchannel.h.
|
explicit |
Definition at line 83 of file dvbchannel.cpp.
|
override |
Definition at line 109 of file dvbchannel.cpp.
|
inline |
Definition at line 85 of file dvbchannel.h.
|
private |
Return true iff rate is supported rate on the frontend.
Definition at line 685 of file dvbchannel.cpp.
Referenced by CheckOptions().
|
private |
Checks tuning frequency.
Definition at line 566 of file dvbchannel.cpp.
Referenced by CheckOptions(), and Tune().
|
private |
Return true iff modulation is supported modulation on the frontend.
Definition at line 704 of file dvbchannel.cpp.
Referenced by CheckOptions().
|
overrideprivatevirtual |
Checks tuning for problems, and tries to fix them.
Reimplemented from DTVChannel.
Definition at line 578 of file dvbchannel.cpp.
|
private |
Definition at line 147 of file dvbchannel.cpp.
|
inlineoverridevirtual |
Closes the channel changing hardware to use.
Implements ChannelBase.
Definition at line 38 of file dvbchannel.h.
Referenced by Close(), Open(), and ~DVBChannel().
|
private |
Definition at line 1554 of file dvbchannel.cpp.
Referenced by Tune().
double DVBChannel::GetBitErrorRate | ( | bool * | ok = nullptr | ) | const |
Returns # of corrected bits since last call. First call undefined.
Definition at line 1427 of file dvbchannel.cpp.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), GetBitErrorRate(), and DVBSignalMonitor::UpdateValues().
|
private |
Get Bit Error Rate from the DVBv5 interface.
ok | set to true if provided and value exists |
Definition at line 1377 of file dvbchannel.cpp.
Referenced by GetBitErrorRate().
|
inline |
Definition at line 84 of file dvbchannel.h.
|
inline |
Returns DVB device number, used to construct filenames for DVB devices.
Definition at line 58 of file dvbchannel.h.
Referenced by DVBSignalMonitor::DVBSignalMonitor().
|
overrideprivatevirtual |
Returns Channel ID.
Reimplemented from ChannelBase.
Definition at line 1097 of file dvbchannel.cpp.
|
inlineoverridevirtual |
Returns String representing device, useful for debugging.
Reimplemented from ChannelBase.
Definition at line 55 of file dvbchannel.h.
|
inlineoverridevirtual |
Returns file descriptor, -1 if it does not exist.
Reimplemented from ChannelBase.
Definition at line 51 of file dvbchannel.h.
|
inline |
Returns frontend name as reported by driver.
Definition at line 60 of file dvbchannel.h.
|
private |
Definition at line 1533 of file dvbchannel.cpp.
Referenced by CheckOptions(), Close(), GetBitErrorRate(), GetSignalStrength(), GetSNR(), GetUncorrectedBlockCount(), HasLock(), IsMaster(), IsTuningParamsProbeSupported(), Open(), ProbeTuningParams(), and Tune().
|
inline |
Definition at line 64 of file dvbchannel.h.
Referenced by DVBSignalMonitor::DVBSignalMonitor().
const DiSEqCDevRotor * DVBChannel::GetRotor | ( | void | ) | const |
Returns rotor object if it exists, nullptr otherwise.
Definition at line 1161 of file dvbchannel.cpp.
Referenced by DVBSignalMonitor::GetRotorStatus(), ChannelScanSM::HasTimedOut(), DVBStreamHandler::RetuneMonitor(), and DVBSignalMonitor::UpdateValues().
double DVBChannel::GetSignalStrength | ( | bool * | ok = nullptr | ) | const |
Returns signal strength in the range [0.0..1.0] (non-calibrated).
Definition at line 1259 of file dvbchannel.cpp.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), GetSignalStrength(), and DVBSignalMonitor::UpdateValues().
|
private |
Get Signal strength from the DVBv5 interface [0-1.0] It is transformed to a linear relative scale if provided in dB.
ok | set to true if provided and value exists |
Definition at line 1203 of file dvbchannel.cpp.
Referenced by GetSignalStrength().
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 1344 of file dvbchannel.cpp.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), GetSNR(), and DVBSignalMonitor::UpdateValues().
|
private |
Get SNR from the DVBv5 interface [0-1.0] It is transformed to a linear relative scale if provided in dB.
ok | set to true if provided and value exists |
Definition at line 1292 of file dvbchannel.cpp.
Referenced by GetSNR().
double DVBChannel::GetUncorrectedBlockCount | ( | bool * | ok = nullptr | ) | const |
Returns # of uncorrected blocks since last call. First call undefined.
Definition at line 1495 of file dvbchannel.cpp.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), GetUncorrectedBlockCount(), and DVBSignalMonitor::UpdateValues().
|
private |
Get Uncorrected Block Count from the DVBv5 interface.
ok | set to true if provided and value exists |
Definition at line 1458 of file dvbchannel.cpp.
Referenced by GetUncorrectedBlockCount().
|
inline |
Returns true iff we have a faulty DVB driver that munges PMT.
Definition at line 63 of file dvbchannel.h.
Returns true iff we have a signal carrier lock.
Definition at line 1169 of file dvbchannel.cpp.
Referenced by HasLock(), and DVBSignalMonitor::UpdateValues().
Reimplemented from ChannelBase.
Definition at line 555 of file dvbchannel.cpp.
|
overridevirtual |
Returns true if this is the first of a number of multi-rec devs.
Reimplemented from DTVChannel.
Definition at line 1542 of file dvbchannel.cpp.
|
overridevirtual |
Reports whether channel is already open.
Implements ChannelBase.
Definition at line 547 of file dvbchannel.cpp.
Referenced by Init().
bool DVBChannel::IsTuningParamsProbeSupported | ( | void | ) | const |
Returns true iff tuning info probing is working.
Definition at line 991 of file dvbchannel.cpp.
Referenced by IsTuningParamsProbeSupported().
|
private |
Definition at line 186 of file dvbchannel.cpp.
|
inlineoverridevirtual |
Opens the channel changing hardware for use.
Implements ChannelBase.
Definition at line 36 of file dvbchannel.h.
bool DVBChannel::ProbeTuningParams | ( | DTVMultiplex & | tuning | ) | const |
Fetches DTVMultiplex params from driver.
Note: Only updates tuning on success.
Definition at line 1037 of file dvbchannel.cpp.
Referenced by ProbeTuningParams().
|
overridevirtual |
Reimplemented from ChannelBase.
Definition at line 983 of file dvbchannel.cpp.
Referenced by DVBStreamHandler::RetuneMonitor().
|
staticprivate |
Definition at line 1526 of file dvbchannel.cpp.
Referenced by CheckOptions(), Close(), GetBitErrorRate(), GetSignalStrength(), GetSNR(), GetUncorrectedBlockCount(), HasLock(), IsMaster(), IsTuningParamsProbeSupported(), Open(), ProbeTuningParams(), and Tune().
void DVBChannel::SetPMT | ( | const ProgramMapTable * | pmt | ) |
Tells the Conditional Access Module which streams we wish to decode.
Definition at line 729 of file dvbchannel.cpp.
Referenced by DVBSignalMonitor::HandlePMT(), DVBRecorder::SetCAMPMT(), and ChannelScanSM::TestNextProgramEncryption().
|
inline |
Definition at line 46 of file dvbchannel.h.
Referenced by ChannelBase::CreateChannel().
void DVBChannel::SetTimeOffset | ( | double | offset | ) |
Tells the Conditional Access Module the offset from the computers utc time to dvb time.
Definition at line 741 of file dvbchannel.cpp.
Referenced by DVBSignalMonitor::HandleSTT(), DVBSignalMonitor::HandleTDT(), and DVBRecorder::UpdateCAMTimeOffset().
|
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 747 of file dvbchannel.cpp.
|
virtual |
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.
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.
tuning | Info on transport to tune to |
force_reset | If true, frequency tuning is done even if it should not be needed. |
same_input | Optional, doesn't change input (for retuning). |
Definition at line 773 of file dvbchannel.cpp.
|
inlinevirtual |
Performs IPTV Tuning. Only implemented by IPTVChannel.
Reimplemented from DTVChannel.
Definition at line 58 of file dtvchannel.h.
|
inlinevirtual |
Leave it up to the implementation to map the channnum appropriately.
Used by the ExternalRecorder.
Reimplemented from DTVChannel.
Definition at line 63 of file dtvchannel.h.
|
inlineoverridevirtual |
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.
Reimplemented from DTVChannel.
Definition at line 75 of file dtvchannel.h.
|
inlinevirtual |
Reimplemented from DTVChannel.
Definition at line 81 of file dtvchannel.h.
|
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.
timeout_ms | timeout before FE_READ_STATUS in milliseconds |
Definition at line 1589 of file dvbchannel.cpp.
Referenced by Tune().
|
private |
Definition at line 143 of file dvbchannel.h.
Referenced by CanDo(), CheckCodeRate(), CheckModulation(), CheckOptions(), GetCapabilities(), Open(), and Tune().
|
private |
Definition at line 153 of file dvbchannel.h.
|
private |
Definition at line 160 of file dvbchannel.h.
|
private |
Definition at line 171 of file dvbchannel.h.
Referenced by DVBChannel(), GetCardNum(), GetDevice(), and Open().
|
private |
Definition at line 137 of file dvbchannel.h.
Referenced by GetRotor(), Open(), and Tune().
|
private |
Definition at line 138 of file dvbchannel.h.
Referenced by CheckOptions(), Close(), GetRotor(), IsTuningParamsProbeSupported(), Open(), ProbeTuningParams(), and Tune().
|
private |
Definition at line 139 of file dvbchannel.h.
Referenced by Close(), DVBChannel(), SetPMT(), SetTimeOffset(), and ~DVBChannel().
|
private |
Definition at line 144 of file dvbchannel.h.
Referenced by Open().
|
private |
Definition at line 170 of file dvbchannel.h.
Referenced by Close(), DrainDVBEvents(), GetBitErrorRate(), GetBitErrorRateDVBv5(), GetFd(), GetSignalStrength(), GetSignalStrengthDVBv5(), GetSNR(), GetSNRDVBv5(), GetUncorrectedBlockCount(), GetUncorrectedBlockCountDVBv5(), HasLock(), IsTuningParamsProbeSupported(), Open(), ProbeTuningParams(), Tune(), and WaitForBackend().
Definition at line 167 of file dvbchannel.h.
|
private |
Definition at line 146 of file dvbchannel.h.
Referenced by CheckFrequency(), and Open().
|
private |
Definition at line 145 of file dvbchannel.h.
Referenced by CheckFrequency(), and Open().
|
private |
Definition at line 142 of file dvbchannel.h.
Referenced by GetFrontendName(), and Open().
Definition at line 173 of file dvbchannel.h.
Referenced by DVBChannel(), and HasCRCBug().
Definition at line 152 of file dvbchannel.h.
Referenced by GetBitErrorRate(), GetSignalStrength(), GetSNR(), GetUncorrectedBlockCount(), and Open().
|
mutableprivate |
Definition at line 158 of file dvbchannel.h.
Referenced by Close(), IsOpen(), IsTuningParamsProbeSupported(), Open(), ProbeTuningParams(), Tune(), and ~DVBChannel().
|
private |
Definition at line 134 of file dvbchannel.h.
Referenced by Close(), IsOpen(), Open(), and ~DVBChannel().
|
private |
Definition at line 172 of file dvbchannel.h.
Referenced by DVBChannel(), GetMasterLock(), and ~DVBChannel().
Definition at line 163 of file dvbchannel.h.
Referenced by Tune().
Definition at line 151 of file dvbchannel.h.
Referenced by GetBitErrorRate(), GetSignalStrength(), GetSNR(), GetUncorrectedBlockCount(), Open(), ProbeTuningParams(), and Tune().
|
private |
Definition at line 161 of file dvbchannel.h.
Referenced by Tune().
|
private |
Definition at line 166 of file dvbchannel.h.
Referenced by DVBChannel(), and GetMinSignalMonitorDelay().
|
private |
Definition at line 148 of file dvbchannel.h.
Referenced by CheckOptions(), and Open().
|
private |
Definition at line 147 of file dvbchannel.h.
Referenced by CheckOptions(), and Open().
|
private |
Definition at line 154 of file dvbchannel.h.
Referenced by Open().
|
private |
Definition at line 176 of file dvbchannel.h.
Referenced by Tune().
|
mutableprivate |
Definition at line 157 of file dvbchannel.h.
Referenced by Tune().
|
private |
Definition at line 165 of file dvbchannel.h.
Referenced by SetSlowTuning(), and Tune().
|
private |
Definition at line 150 of file dvbchannel.h.
Referenced by Open().
|
staticprivate |
Definition at line 175 of file dvbchannel.h.
Referenced by Tune().