#include <dvbchannel.h>

Definition at line 28 of file dvbchannel.h.
Public Member Functions | |
| DVBChannel (int cardnum, TVRec *parent=NULL) | |
| ~DVBChannel () | |
| bool | Open (void) |
| Opens the channel changing hardware for use. | |
| void | Close (void) |
| Closes the channel changing hardware to use. | |
| bool | Init (QString &inputname, QString &startchannel, bool setchan) |
| void | SetPMT (const ProgramMapTable *) |
| Tells the Conditional Access Module which streams we wish to decode. | |
| void | SetTimeOffset (double offset) |
| Tells the Conditional Access Module the offset from the computers utc time to dvb time. | |
| void | SetSlowTuning (uint how_slow_in_ms) |
| bool | IsOpen (void) const |
| Reports whether channel is already open. | |
| int | GetFd (void) const |
| Returns file descriptor, -1 if it does not exist. | |
| bool | IsTuningParamsProbeSupported (void) const |
| Returns true iff tuning info probing is working. | |
| QString | GetDevice (void) const |
| Returns String representing device, useful for debugging. | |
| int | GetCardNum (void) const |
| Returns DVB device number, used to construct filenames for DVB devices. | |
| QString | GetFrontendName (void) const |
| Returns frontend name as reported by driver. | |
| DTVTunerType | GetCardType (void) const |
| bool | IsMaster (void) const |
| bool | HasCRCBug (void) const |
| Returns true iff we have a faulty DVB driver that munges PMT. | |
| uint | GetMinSignalMonitorDelay (void) const |
| const DiSEqCDevRotor * | GetRotor (void) const |
| Returns rotor object if it exists, NULL otherwise. | |
| bool | HasLock (bool *ok=NULL) const |
| Returns true iff we have a signal carrier lock. | |
| double | GetSignalStrength (bool *ok=NULL) const |
| Returns signal strength in the range [0.0..1.0] (non-calibrated). | |
| double | GetSNR (bool *ok=NULL) const |
| Returns signal/noise in the range [0. | |
| double | GetBitErrorRate (bool *ok=NULL) const |
| Returns # of corrected bits since last call. First call undefined. | |
| double | GetUncorrectedBlockCount (bool *ok=NULL) const |
| Returns # of uncorrected blocks since last call. First call undefined. | |
| bool | SwitchToInput (const QString &inputname, const QString &chan) |
| bool | SwitchToInput (int newcapchannel, bool setstarting) |
| Switches to another input on hardware, and sets the channel is setstarting is true. | |
| bool | SetChannelByString (const QString &chan) |
| bool | Tune (const DTVMultiplex &tuning, QString inputname) |
| To be used by the channel scanner and possibly the EIT scanner. | |
| bool | Tune (const DTVMultiplex &tuning, uint inputid, bool force_reset=false, bool same_input=false) |
| Tunes the card to a frequency but does not deal with PIDs. | |
| bool | TuneMultiplex (uint mplexid, QString inputname) |
| To be used by the channel scanner and possibly the EIT scanner. | |
| bool | Retune (void) |
| bool | ProbeTuningParams (DTVMultiplex &tuning) const |
| Fetches DTVMultiplex params from driver. | |
| void | SaveCachedPids (const pid_cache_t &) const |
| Saves MPEG PIDs to cache to database. | |
| void | GetCachedPids (pid_cache_t &) const |
| Returns cached MPEG PIDs for last tuned channel. | |
Private Member Functions | |
| bool | Open (DVBChannel *) |
| void | Close (DVBChannel *) |
| int | GetChanID (void) const |
| Returns Channel ID. | |
| void | CheckOptions (DTVMultiplex &t) const |
| Checks tuning for problems, and tries to fix them. | |
| bool | CheckModulation (DTVModulation modulation) const |
| Return true iff modulation is supported modulation on the frontend. | |
| bool | CheckCodeRate (DTVCodeRate rate) const |
| Return true iff rate is supported rate on the frontend. | |
Private Attributes | |
| DVBChannel * | master |
| IsOpenMap | is_open |
| DiSEqCDev | diseqc_dev |
| DiSEqCDevSettings | diseqc_settings |
| DiSEqCDevTree * | diseqc_tree |
| DVBCam * | dvbcam |
| Used to decrypt encrypted streams. | |
| QString | frontend_name |
| DTVTunerType | card_type |
| uint64_t | capabilities |
| uint64_t | ext_modulations |
| uint64_t | frequency_minimum |
| uint64_t | frequency_maximum |
| uint | symbol_rate_minimum |
| uint | symbol_rate_maximum |
| QMutex | tune_lock |
| QMutex | hw_lock |
| DTVMultiplex | desired_tuning |
| Last tuning options Tune() attempted to send to hardware. | |
| DTVMultiplex | prev_tuning |
| Last tuning options Tune() succesfully sent to hardware. | |
| uint | last_lnb_dev_id |
| uint | tuning_delay |
| Extra delay to add for broken drivers. | |
| uint | sigmon_delay |
| Minimum delay between FE_LOCK checks. | |
| bool | first_tune |
| Used to force hardware reset. | |
| int | fd_frontend |
| File descriptor for tuning hardware. | |
| int | cardnum |
| DVB Card number. | |
| bool | has_crc_bug |
| true iff our driver munges PMT | |
| int | nextInputID |
| Signal an input change. | |
| DVBChannel::DVBChannel | ( | int | cardnum, | |
| TVRec * | parent = NULL | |||
| ) |
Definition at line 68 of file dvbchannel.cpp.
| DVBChannel::~DVBChannel | ( | ) |
Definition at line 101 of file dvbchannel.cpp.
| bool DVBChannel::Open | ( | void | ) | [inline, virtual] |
Opens the channel changing hardware for use.
Implements ChannelBase.
Definition at line 34 of file dvbchannel.h.
| void DVBChannel::Close | ( | void | ) | [inline, virtual] |
Closes the channel changing hardware to use.
Implements ChannelBase.
Definition at line 35 of file dvbchannel.h.
Referenced by Close(), Open(), and ~DVBChannel().
| void DVBChannel::SetPMT | ( | const ProgramMapTable * | pmt | ) |
Tells the Conditional Access Module which streams we wish to decode.
Definition at line 621 of file dvbchannel.cpp.
Referenced by DVBSignalMonitor::HandlePMT(), and DVBRecorder::HandlePMT().
| void DVBChannel::SetTimeOffset | ( | double | offset | ) |
Tells the Conditional Access Module the offset from the computers utc time to dvb time.
Definition at line 631 of file dvbchannel.cpp.
Referenced by DVBSignalMonitor::HandleSTT(), DVBRecorder::HandleSTT(), DVBSignalMonitor::HandleTDT(), and DVBRecorder::HandleTDT().
| void DVBChannel::SetSlowTuning | ( | uint | how_slow_in_ms | ) | [inline] |
| bool DVBChannel::IsOpen | ( | void | ) | const [virtual] |
Reports whether channel is already open.
Implements ChannelBase.
Definition at line 294 of file dvbchannel.cpp.
Referenced by Init(), and SetChannelByString().
| int DVBChannel::GetFd | ( | void | ) | const [inline, virtual] |
Returns file descriptor, -1 if it does not exist.
Reimplemented from ChannelBase.
Definition at line 47 of file dvbchannel.h.
| bool DVBChannel::IsTuningParamsProbeSupported | ( | void | ) | const |
Returns true iff tuning info probing is working.
Definition at line 812 of file dvbchannel.cpp.
Referenced by IsTuningParamsProbeSupported().
| QString DVBChannel::GetDevice | ( | void | ) | const [inline, virtual] |
Returns String representing device, useful for debugging.
Reimplemented from ChannelBase.
Definition at line 50 of file dvbchannel.h.
| int DVBChannel::GetCardNum | ( | void | ) | const [inline] |
Returns DVB device number, used to construct filenames for DVB devices.
Definition at line 52 of file dvbchannel.h.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), and GetDevice().
| QString DVBChannel::GetFrontendName | ( | void | ) | const |
| DTVTunerType DVBChannel::GetCardType | ( | void | ) | const [inline] |
Definition at line 55 of file dvbchannel.h.
| bool DVBChannel::IsMaster | ( | void | ) | const [inline] |
Definition at line 56 of file dvbchannel.h.
| bool DVBChannel::HasCRCBug | ( | void | ) | const [inline] |
Returns true iff we have a faulty DVB driver that munges PMT.
Definition at line 58 of file dvbchannel.h.
| uint DVBChannel::GetMinSignalMonitorDelay | ( | void | ) | const [inline] |
| const DiSEqCDevRotor * DVBChannel::GetRotor | ( | void | ) | const |
Returns rotor object if it exists, NULL otherwise.
Definition at line 933 of file dvbchannel.cpp.
Referenced by DVBSignalMonitor::GetRotorStatus(), DVBStreamHandler::RetuneMonitor(), and SIScan::Tune().
Returns true iff we have a signal carrier lock.
Definition at line 942 of file dvbchannel.cpp.
Referenced by DVBSignalMonitor::DVBSignalMonitor(), HasLock(), and DVBSignalMonitor::UpdateValues().
| double DVBChannel::GetSignalStrength | ( | bool * | ok = NULL |
) | const |
Returns signal strength in the range [0.0..1.0] (non-calibrated).
Definition at line 958 of file dvbchannel.cpp.
Referenced by GetSignalStrength(), and DVBSignalMonitor::UpdateValues().
| double DVBChannel::GetSNR | ( | bool * | ok = NULL |
) | 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 976 of file dvbchannel.cpp.
Referenced by GetSNR(), and DVBSignalMonitor::UpdateValues().
| double DVBChannel::GetBitErrorRate | ( | bool * | ok = NULL |
) | const |
Returns # of corrected bits since last call. First call undefined.
Definition at line 994 of file dvbchannel.cpp.
Referenced by GetBitErrorRate(), and DVBSignalMonitor::UpdateValues().
| double DVBChannel::GetUncorrectedBlockCount | ( | bool * | ok = NULL |
) | const |
Returns # of uncorrected blocks since last call. First call undefined.
Definition at line 1009 of file dvbchannel.cpp.
Referenced by GetUncorrectedBlockCount(), and DVBSignalMonitor::UpdateValues().
| bool DVBChannel::SwitchToInput | ( | const QString & | inputname, | |
| const QString & | chan | |||
| ) | [virtual] |
Switches to another input on hardware, and sets the channel is setstarting is true.
Reimplemented from ChannelBase.
Definition at line 444 of file dvbchannel.cpp.
| bool DVBChannel::SetChannelByString | ( | const QString & | chan | ) | [virtual] |
Implements ChannelBase.
Definition at line 320 of file dvbchannel.cpp.
Referenced by SwitchToInput().
| bool DVBChannel::Tune | ( | const DTVMultiplex & | tuning, | |
| QString | inputname | |||
| ) | [virtual] |
To be used by the channel scanner and possibly the EIT scanner.
Implements DTVChannel.
Definition at line 638 of file dvbchannel.cpp.
Referenced by Retune(), SetChannelByString(), Tune(), and TuneMultiplex().
| bool DVBChannel::Tune | ( | const DTVMultiplex & | tuning, | |
| uint | inputid, | |||
| 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 | |
| inputid | Optional, forces specific input (for DiSEqC) | |
| 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 666 of file dvbchannel.cpp.
To be used by the channel scanner and possibly the EIT scanner.
Implements DTVChannel.
Definition at line 309 of file dvbchannel.cpp.
| bool DVBChannel::Retune | ( | void | ) | [virtual] |
Reimplemented from ChannelBase.
Definition at line 799 of file dvbchannel.cpp.
Referenced by DVBStreamHandler::RetuneMonitor().
| bool DVBChannel::ProbeTuningParams | ( | DTVMultiplex & | tuning | ) | const |
Fetches DTVMultiplex params from driver.
Note: Only updates tuning on success.
Definition at line 845 of file dvbchannel.cpp.
Referenced by SIScan::InsertMultiplex(), and ProbeTuningParams().
| void DVBChannel::SaveCachedPids | ( | const pid_cache_t & | pid_cache | ) | const [virtual] |
Saves MPEG PIDs to cache to database.
| pid_cache | List of PIDs with their TableID types to be saved. |
Reimplemented from DTVChannel.
Definition at line 919 of file dvbchannel.cpp.
| void DVBChannel::GetCachedPids | ( | pid_cache_t & | pid_cache | ) | const [virtual] |
Returns cached MPEG PIDs for last tuned channel.
| pid_cache | List of PIDs with their TableID types is returned in pid_cache. |
Reimplemented from DTVChannel.
Definition at line 926 of file dvbchannel.cpp.
| bool DVBChannel::Open | ( | DVBChannel * | who | ) | [private] |
Definition at line 150 of file dvbchannel.cpp.
| void DVBChannel::Close | ( | DVBChannel * | who | ) | [private] |
Definition at line 114 of file dvbchannel.cpp.
| int DVBChannel::GetChanID | ( | void | ) | const [private, virtual] |
Returns Channel ID.
Reimplemented from ChannelBase.
Definition at line 891 of file dvbchannel.cpp.
Referenced by GetCachedPids(), and SaveCachedPids().
| void DVBChannel::CheckOptions | ( | DTVMultiplex & | t | ) | const [private] |
Checks tuning for problems, and tries to fix them.
Definition at line 464 of file dvbchannel.cpp.
Referenced by SetChannelByString(), and TuneMultiplex().
| bool DVBChannel::CheckModulation | ( | DTVModulation | modulation | ) | const [private] |
Return true iff modulation is supported modulation on the frontend.
Definition at line 592 of file dvbchannel.cpp.
Referenced by CheckOptions().
| bool DVBChannel::CheckCodeRate | ( | DTVCodeRate | rate | ) | const [private] |
Return true iff rate is supported rate on the frontend.
Definition at line 573 of file dvbchannel.cpp.
Referenced by CheckOptions().
DVBChannel* DVBChannel::master [private] |
Definition at line 107 of file dvbchannel.h.
Referenced by Close(), DVBChannel(), GetBitErrorRate(), GetSignalStrength(), GetSNR(), GetUncorrectedBlockCount(), HasLock(), IsMaster(), IsTuningParamsProbeSupported(), Open(), ProbeTuningParams(), Tune(), and ~DVBChannel().
IsOpenMap DVBChannel::is_open [private] |
DiSEqCDev DVBChannel::diseqc_dev [private] |
DiSEqCDevSettings DVBChannel::diseqc_settings [private] |
DiSEqCDevTree* DVBChannel::diseqc_tree [private] |
Definition at line 113 of file dvbchannel.h.
Referenced by CheckOptions(), Close(), GetRotor(), IsTuningParamsProbeSupported(), Open(), ProbeTuningParams(), and Tune().
DVBCam* DVBChannel::dvbcam [private] |
Used to decrypt encrypted streams.
Definition at line 114 of file dvbchannel.h.
Referenced by Close(), DVBChannel(), Open(), SetPMT(), SetTimeOffset(), and ~DVBChannel().
QString DVBChannel::frontend_name [private] |
DTVTunerType DVBChannel::card_type [private] |
Definition at line 118 of file dvbchannel.h.
Referenced by CheckOptions(), GetCardType(), Open(), ProbeTuningParams(), SetChannelByString(), Tune(), and TuneMultiplex().
uint64_t DVBChannel::capabilities [private] |
Definition at line 119 of file dvbchannel.h.
Referenced by CheckCodeRate(), CheckModulation(), CheckOptions(), Open(), and Tune().
uint64_t DVBChannel::ext_modulations [private] |
uint64_t DVBChannel::frequency_minimum [private] |
uint64_t DVBChannel::frequency_maximum [private] |
uint DVBChannel::symbol_rate_minimum [private] |
uint DVBChannel::symbol_rate_maximum [private] |
QMutex DVBChannel::tune_lock [mutable, private] |
QMutex DVBChannel::hw_lock [mutable, private] |
Definition at line 128 of file dvbchannel.h.
Referenced by Close(), IsTuningParamsProbeSupported(), Open(), ProbeTuningParams(), and Tune().
DTVMultiplex DVBChannel::desired_tuning [private] |
Last tuning options Tune() attempted to send to hardware.
Definition at line 130 of file dvbchannel.h.
DTVMultiplex DVBChannel::prev_tuning [private] |
Last tuning options Tune() succesfully sent to hardware.
Definition at line 132 of file dvbchannel.h.
Referenced by Tune().
uint DVBChannel::last_lnb_dev_id [private] |
uint DVBChannel::tuning_delay [private] |
Extra delay to add for broken drivers.
Definition at line 136 of file dvbchannel.h.
Referenced by SetSlowTuning(), and Tune().
uint DVBChannel::sigmon_delay [private] |
Minimum delay between FE_LOCK checks.
Definition at line 137 of file dvbchannel.h.
Referenced by DVBChannel(), and GetMinSignalMonitorDelay().
bool DVBChannel::first_tune [private] |
int DVBChannel::fd_frontend [private] |
File descriptor for tuning hardware.
Definition at line 141 of file dvbchannel.h.
Referenced by Close(), GetBitErrorRate(), GetFd(), GetSignalStrength(), GetSNR(), GetUncorrectedBlockCount(), HasLock(), IsTuningParamsProbeSupported(), Open(), ProbeTuningParams(), and Tune().
int DVBChannel::cardnum [private] |
DVB Card number.
Definition at line 142 of file dvbchannel.h.
Referenced by DVBChannel(), and Open().
bool DVBChannel::has_crc_bug [private] |
true iff our driver munges PMT
Definition at line 143 of file dvbchannel.h.
Referenced by DVBChannel(), and HasCRCBug().
int DVBChannel::nextInputID [private] |
Signal an input change.
Definition at line 144 of file dvbchannel.h.
Referenced by Open(), SetChannelByString(), and SwitchToInput().
1.5.5