CardUtil Class Reference

#include <cardutil.h>

List of all members.


Detailed Description

Collection of helper utilities for capture card DB use.

Definition at line 38 of file cardutil.h.


Public Types

enum  CARD_TYPES {
  ERROR_OPEN = 0, ERROR_UNKNOWN, ERROR_PROBE, QPSK,
  QAM, OFDM, ATSC, V4L,
  MPEG, FIREWIRE, HDHOMERUN, FREEBOX
}
 all the different capture cards More...

Static Public Member Functions

static enum CARD_TYPES toCardType (const QString &name)
static bool IsEncoder (const QString &rawtype)
static bool IsUnscanable (const QString &rawtype)
static bool IsEITCapable (const QString &rawtype)
static bool IsTunerSharingCapable (const QString &rawtype)
static bool IsTunerShared (uint cardidA, uint cardidB)
static bool IsTuningDigital (const QString &rawtype)
static bool IsTuningAnalog (const QString &rawtype)
static uint GetFirstCardID (const QString &videodevice)
 Convenience function for GetCardIDs(const QString&, QString, QString).
static vector< uintGetCardIDs (const QString &videodevice, QString rawtype=QString::null, QString hostname=QString::null)
 Returns all cardids of cards that uses the specified videodevice, and optionally rawtype and a non-local hostname.
static bool IsCardTypePresent (const QString &rawtype, QString hostname=QString::null)
 Returns true if the card type is present and connected to an input.
static QStringVec GetVideoDevices (const QString &rawtype, QString hostname=QString::null)
 Returns the videodevices of the matching cards, duplicates removed.
static QString GetRawCardType (uint cardid)
static QString GetVideoDevice (uint cardid)
static QString GetVBIDevice (uint cardid)
static uint GetHDHRTuner (uint cardid)
static int GetValueInt (const QString &col, uint cid)
static bool SetValue (const QString &col, uint cid, uint sid, int val)
static bool SetValue (const QString &col, uint cid, uint sid, const QString &val)
static vector< uintGetCardIDs (uint sourceid)
static QString GetDefaultInput (uint cardid)
 Returns the default input for the card.
static QStringList GetInputNames (uint cardid, uint sourceid)
static bool GetInputInfo (InputInfo &info, vector< uint > *groupids=NULL)
static uint GetCardID (uint inputid)
static QString GetInputName (uint inputid)
static QString GetDisplayName (uint inputid)
static QString GetDisplayName (uint cardid, const QString &inputname)
static vector< uintGetInputIDs (uint cardid)
static bool DeleteInput (uint inputid)
static bool DeleteOrphanInputs (void)
static uint CreateInputGroup (const QString &name)
static bool CreateInputGroupIfNeeded (uint cardid)
static bool LinkInputGroup (uint inputid, uint inputgroupid)
static bool UnlinkInputGroup (uint inputid, uint inputgroupid)
static vector< uintGetInputGroups (uint inputid)
static vector< uintGetSharedInputGroups (uint cardid)
static vector< uintGetGroupCardIDs (uint inputgroupid)
static vector< uintGetConflictingCards (uint inputid, uint exclude_cardid)
static QString GetDeviceLabel (uint cardid, QString cardtype, QString videodevice)
static QString ProbeSubTypeName (uint cardid)
static QStringList probeInputs (QString device, QString cardtype=QString::null)
static void GetCardInputs (uint cardid, const QString &device, const QString &cardtype, QStringList &inputLabels, vector< CardInput * > &cardInputs)
static bool DeleteCard (uint cardid)
static bool DeleteAllCards (void)
static vector< uintGetCardList (void)
static QStringVec ProbeVideoDevices (const QString &rawtype)
static bool CloneCard (uint src_cardid, uint dst_cardid)
static vector< uintGetCloneCardIDs (uint cardid)
static bool GetTimeouts (uint cardid, uint &signal_timeout, uint &channel_timeout)
static bool IgnoreEncrypted (uint cardid, const QString &inputname)
static bool TVOnly (uint cardid, const QString &inputname)
static bool IsInNeedOfExternalInputConf (uint cardid)
static uint GetQuickTuning (uint cardid, const QString &inputname)
static bool IsDVB (uint cardid)
 Returns true if the card is a DVB card.
static bool IsDVBCardType (const QString card_type)
 Returns true iff the card_type is one of the DVB types.
static QString ProbeDVBFrontendName (uint device)
 Returns the card type from the video device.
static QString ProbeDVBType (uint device)
static bool HasDVBCRCBug (uint device)
 Returns true if and only if the device munges PAT/PMT tables, and then doesn't fix the CRC.
static uint GetMinSignalMonitoringDelay (uint device)
static QString GetDeviceName (dvb_dev_type_t, uint cardnum)
static InputNames GetConfiguredDVBInputs (uint cardid)
static bool hasV4L2 (int videofd)
static bool GetV4LInfo (int videofd, QString &card, QString &driver, uint32_t &version)
static bool GetV4LInfo (int videofd, QString &card, QString &driver)
static InputNames probeV4LInputs (int videofd, bool &ok)

Static Private Member Functions

static QStringList probeV4LInputs (QString device)
static QStringList probeDVBInputs (QString device)

Member Enumeration Documentation

all the different capture cards

Enumerator:
ERROR_OPEN 
ERROR_UNKNOWN 
ERROR_PROBE 
QPSK 
QAM 
OFDM 
ATSC 
V4L 
MPEG 
FIREWIRE 
HDHOMERUN 
FREEBOX 

Definition at line 42 of file cardutil.h.


Member Function Documentation

static enum CARD_TYPES CardUtil::toCardType ( const QString &  name  )  [inline, static]

static bool CardUtil::IsEncoder ( const QString &  rawtype  )  [inline, static]

static bool CardUtil::IsUnscanable ( const QString &  rawtype  )  [inline, static]

static bool CardUtil::IsEITCapable ( const QString &  rawtype  )  [inline, static]

Definition at line 101 of file cardutil.h.

Referenced by TVRec::RunTV(), and ChannelOptionsCommon::sourceChanged().

static bool CardUtil::IsTunerSharingCapable ( const QString &  rawtype  )  [inline, static]

bool CardUtil::IsTunerShared ( uint  cardidA,
uint  cardidB 
) [static]

Definition at line 35 of file cardutil.cpp.

Referenced by TV::UpdateOSDAskAllowDialog().

static bool CardUtil::IsTuningDigital ( const QString &  rawtype  )  [inline, static]

Definition at line 114 of file cardutil.h.

Referenced by SourceUtil::IsProperlyConnected().

static bool CardUtil::IsTuningAnalog ( const QString &  rawtype  )  [inline, static]

Definition at line 120 of file cardutil.h.

Referenced by SourceUtil::IsProperlyConnected().

static uint CardUtil::GetFirstCardID ( const QString &  videodevice  )  [inline, static]

Convenience function for GetCardIDs(const QString&, QString, QString).

Definition at line 126 of file cardutil.h.

Referenced by ChannelBase::GetCardID(), and probeDVBInputs().

vector< uint > CardUtil::GetCardIDs ( const QString &  videodevice,
QString  rawtype = QString::null,
QString  hostname = QString::null 
) [static]

Returns all cardids of cards that uses the specified videodevice, and optionally rawtype and a non-local hostname.

The result is ordered from smallest to largest.

Parameters:
videodevice Video device we want card ids for
rawtype Card type as used in DB or empty string for any type
hostname Host on which device resides, only required if said host is not the localhost

Definition at line 380 of file cardutil.cpp.

Referenced by TV::IsTunable(), CaptureCard::loadByID(), and CaptureCard::save().

bool CardUtil::IsCardTypePresent ( const QString &  rawtype,
QString  hostname = QString::null 
) [static]

Returns true if the card type is present and connected to an input.

Parameters:
rawtype Card type as used in DB or empty string for all cards
hostname Host to check, or empty string for current host

Definition at line 82 of file cardutil.cpp.

QStringVec CardUtil::GetVideoDevices ( const QString &  rawtype,
QString  hostname = QString::null 
) [static]

Returns the videodevices of the matching cards, duplicates removed.

Parameters:
rawtype Card type as used in DB or empty string for all cardids
hostname Host to check, or empty string for current host

Definition at line 122 of file cardutil.cpp.

Referenced by DVBCardNum::fillSelections().

static QString CardUtil::GetRawCardType ( uint  cardid  )  [inline, static]

static QString CardUtil::GetVideoDevice ( uint  cardid  )  [inline, static]

static QString CardUtil::GetVBIDevice ( uint  cardid  )  [inline, static]

Definition at line 147 of file cardutil.h.

static uint CardUtil::GetHDHRTuner ( uint  cardid  )  [inline, static]

Definition at line 149 of file cardutil.h.

Referenced by ScanWizardScanner::PreScanCommon().

static int CardUtil::GetValueInt ( const QString &  col,
uint  cid 
) [inline, static]

static bool CardUtil::SetValue ( const QString &  col,
uint  cid,
uint  sid,
int  val 
) [inline, static]

Definition at line 154 of file cardutil.h.

Referenced by Channel::ChangePictureAttribute().

static bool CardUtil::SetValue ( const QString &  col,
uint  cid,
uint  sid,
const QString &  val 
) [inline, static]

Definition at line 157 of file cardutil.h.

vector< uint > CardUtil::GetCardIDs ( uint  sourceid  )  [static]

Definition at line 759 of file cardutil.cpp.

QString CardUtil::GetDefaultInput ( uint  cardid  )  [static]

Returns the default input for the card.

Parameters:
nCardID card id to check
Returns:
the default input

Definition at line 788 of file cardutil.cpp.

QStringList CardUtil::GetInputNames ( uint  cardid,
uint  sourceid 
) [static]

Definition at line 805 of file cardutil.cpp.

bool CardUtil::GetInputInfo ( InputInfo info,
vector< uint > *  groupids = NULL 
) [static]

uint CardUtil::GetCardID ( uint  inputid  )  [static]

Definition at line 859 of file cardutil.cpp.

Referenced by TV::SwitchCards(), and TV::SwitchInputs().

QString CardUtil::GetInputName ( uint  inputid  )  [static]

Definition at line 866 of file cardutil.cpp.

Referenced by clone_cardinputs().

QString CardUtil::GetDisplayName ( uint  inputid  )  [static]

Definition at line 873 of file cardutil.cpp.

Referenced by TV::FillMenuLiveTV(), and TV::UpdateOSDInput().

QString CardUtil::GetDisplayName ( uint  cardid,
const QString &  inputname 
) [static]

Definition at line 889 of file cardutil.cpp.

vector< uint > CardUtil::GetInputIDs ( uint  cardid  )  [static]

bool CardUtil::DeleteInput ( uint  inputid  )  [static]

Definition at line 931 of file cardutil.cpp.

Referenced by clone_cardinputs(), DeleteCard(), and DeleteOrphanInputs().

bool CardUtil::DeleteOrphanInputs ( void   )  [static]

Definition at line 948 of file cardutil.cpp.

Referenced by DeleteCard(), SourceUtil::DeleteSource(), and CardInput::save().

uint CardUtil::CreateInputGroup ( const QString &  name  )  [static]

Definition at line 983 of file cardutil.cpp.

Referenced by CreateInputGroupIfNeeded(), and CardInput::CreateNewInputGroup().

bool CardUtil::CreateInputGroupIfNeeded ( uint  cardid  )  [static]

Definition at line 1012 of file cardutil.cpp.

Referenced by CardInput::save(), and CaptureCard::save().

bool CardUtil::LinkInputGroup ( uint  inputid,
uint  inputgroupid 
) [static]

Definition at line 1049 of file cardutil.cpp.

Referenced by clone_cardinputs(), CreateInputGroupIfNeeded(), and InputGroup::save().

bool CardUtil::UnlinkInputGroup ( uint  inputid,
uint  inputgroupid 
) [static]

vector< uint > CardUtil::GetInputGroups ( uint  inputid  )  [static]

vector< uint > CardUtil::GetSharedInputGroups ( uint  cardid  )  [static]

Definition at line 1145 of file cardutil.cpp.

Referenced by CreateInputGroupIfNeeded().

vector< uint > CardUtil::GetGroupCardIDs ( uint  inputgroupid  )  [static]

Definition at line 1169 of file cardutil.cpp.

Referenced by GetConflictingCards(), and is_input_group_busy().

vector< uint > CardUtil::GetConflictingCards ( uint  inputid,
uint  exclude_cardid 
) [static]

Definition at line 1196 of file cardutil.cpp.

Referenced by Scheduler::IsBusyRecording(), and TVRec::RecordPending().

QString CardUtil::GetDeviceLabel ( uint  cardid,
QString  cardtype,
QString  videodevice 
) [static]

QString CardUtil::ProbeSubTypeName ( uint  cardid  )  [static]

Definition at line 304 of file cardutil.cpp.

Referenced by get_cardtype(), ScanTypeSetting::SetInput(), and ScanWizard::SetInput().

QStringList CardUtil::probeInputs ( QString  device,
QString  cardtype = QString::null 
) [static]

Definition at line 1453 of file cardutil.cpp.

Referenced by TunerCardInput::fillSelections().

void CardUtil::GetCardInputs ( uint  cardid,
const QString &  device,
const QString &  cardtype,
QStringList &  inputLabels,
vector< CardInput * > &  cardInputs 
) [static]

Definition at line 1572 of file cardutil.cpp.

Referenced by CardInputEditor::load().

bool CardUtil::DeleteCard ( uint  cardid  )  [static]

bool CardUtil::DeleteAllCards ( void   )  [static]

Definition at line 1708 of file cardutil.cpp.

Referenced by CaptureCardEditor::edit().

vector< uint > CardUtil::GetCardList ( void   )  [static]

Definition at line 1718 of file cardutil.cpp.

Referenced by RemoteGetRecordingStatus().

QStringVec CardUtil::ProbeVideoDevices ( const QString &  rawtype  )  [static]

Definition at line 165 of file cardutil.cpp.

Referenced by DVBCardNum::fillSelections().

bool CardUtil::CloneCard ( uint  src_cardid,
uint  dst_cardid 
) [static]

Definition at line 690 of file cardutil.cpp.

Referenced by CardInput::save(), and CaptureCard::save().

vector< uint > CardUtil::GetCloneCardIDs ( uint  cardid  )  [static]

Definition at line 709 of file cardutil.cpp.

Referenced by CardInput::save().

bool CardUtil::GetTimeouts ( uint  cardid,
uint signal_timeout,
uint channel_timeout 
) [static]

Definition at line 1228 of file cardutil.cpp.

Referenced by ScanWizardScanner::PreScanCommon().

bool CardUtil::IgnoreEncrypted ( uint  cardid,
const QString &  inputname 
) [static]

Definition at line 1250 of file cardutil.cpp.

Referenced by ScanWizardScanner::PreScanCommon().

bool CardUtil::TVOnly ( uint  cardid,
const QString &  inputname 
) [static]

Definition at line 1270 of file cardutil.cpp.

Referenced by ScanWizardScanner::PreScanCommon().

bool CardUtil::IsInNeedOfExternalInputConf ( uint  cardid  )  [static]

Definition at line 1291 of file cardutil.cpp.

Referenced by CardInput::CardInput(), and GetCardInputs().

uint CardUtil::GetQuickTuning ( uint  cardid,
const QString &  inputname 
) [static]

Definition at line 1303 of file cardutil.cpp.

Referenced by DTVChannel::GetSuggestedTuningMode().

static bool CardUtil::IsDVB ( uint  cardid  )  [inline, static]

Returns true if the card is a DVB card.

Definition at line 221 of file cardutil.h.

bool CardUtil::IsDVBCardType ( const QString  card_type  )  [static]

Returns true iff the card_type is one of the DVB types.

Definition at line 321 of file cardutil.cpp.

Referenced by SignalMonitor::Init(), and SignalMonitor::IsRequired().

QString CardUtil::ProbeDVBFrontendName ( uint  device  )  [static]

Returns the card type from the video device.

Definition at line 243 of file cardutil.cpp.

Referenced by GetMinSignalMonitoringDelay(), HasDVBCRCBug(), and DVBConfigurationGroup::probeCard().

QString CardUtil::ProbeDVBType ( uint  device  )  [static]

bool CardUtil::HasDVBCRCBug ( uint  device  )  [static]

Returns true if and only if the device munges PAT/PMT tables, and then doesn't fix the CRC.

Currently the list of broken DVB hardware and drivers includes: "VLSI VES1x93 DVB-S", and "ST STV0299 DVB-S"

Note: "DST DVB-S" was on this list but has been verified to not mess up the PAT using Linux 2.6.18.1.

Note: "Philips TDA10046H DVB-T" was on this list but has been verified to not mess up the PMT with a recent kernel and firmware (See http://svn.mythtv.org/trac/ticket/3541).

Parameters:
device Open DVB frontend device file descriptor to be checked
Returns:
true iff the device munges tables, so that they fail a CRC check.

Definition at line 287 of file cardutil.cpp.

Referenced by DVBChannel::DVBChannel().

uint CardUtil::GetMinSignalMonitoringDelay ( uint  device  )  [static]

Definition at line 294 of file cardutil.cpp.

Referenced by DVBChannel::DVBChannel().

QString CardUtil::GetDeviceName ( dvb_dev_type_t  type,
uint  cardnum 
) [static]

InputNames CardUtil::GetConfiguredDVBInputs ( uint  cardid  )  [static]

Definition at line 1433 of file cardutil.cpp.

Referenced by GetCardInputs(), and probeDVBInputs().

bool CardUtil::hasV4L2 ( int  videofd  )  [static]

bool CardUtil::GetV4LInfo ( int  videofd,
QString &  card,
QString &  driver,
uint32_t version 
) [static]

static bool CardUtil::GetV4LInfo ( int  videofd,
QString &  card,
QString &  driver 
) [inline, static]

Definition at line 235 of file cardutil.h.

InputNames CardUtil::probeV4LInputs ( int  videofd,
bool ok 
) [static]

QStringList CardUtil::probeV4LInputs ( QString  device  )  [static, private]

Definition at line 1472 of file cardutil.cpp.

QStringList CardUtil::probeDVBInputs ( QString  device  )  [static, private]

Definition at line 1502 of file cardutil.cpp.

Referenced by probeInputs().


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

Generated on Sat Dec 18 05:16:00 2010 for MythTV by  doxygen 1.5.5