MythTV  master
Public Types | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Static Private Attributes | Friends | List of all members
ChannelUtil Class Reference

Collection of helper utilities for channel DB use. More...

#include <channelutil.h>

Public Types

enum  OrderBy { kChanOrderByChanNum, kChanOrderByName, kChanOrderByLiveTV }
 
enum  GroupBy { kChanGroupByCallsign, kChanGroupByCallsignAndChannum, kChanGroupByChanid }
 

Static Public Member Functions

static uint CreateMultiplex (int sourceid, const QString &sistandard, uint64_t frequency, const QString &modulation, int transport_id=-1, int network_id=-1)
 
static uint CreateMultiplex (int sourceid, const QString &sistandard, uint64_t frequency, const QString &modulation, int transport_id, int network_id, int symbol_rate, signed char bandwidth, signed char polarity, signed char inversion, signed char trans_mode, const QString &inner_FEC, const QString &constellation, signed char hierarchy, const QString &hp_code_rate, const QString &lp_code_rate, const QString &guard_interval, const QString &mod_sys, const QString &rolloff)
 
static uint CreateMultiplex (uint sourceid, const DTVMultiplex &mux, int transport_id, int network_id)
 
static std::vector< uintCreateMultiplexes (int sourceid, const NetworkInformationTable *nit)
 
static uint GetMplexID (uint sourceid, const QString &channum)
 
static int GetMplexID (uint sourceid, uint64_t frequency)
 
static int GetMplexID (uint sourceid, uint64_t frequency, uint transport_id, uint network_id)
 
static int GetMplexID (uint sourceid, uint transport_id, uint network_id)
 
static uint GetMplexID (uint chanid)
 
static int GetBetterMplexID (int current_mplexid, int transport_id, int network_id)
 Returns best match multiplex ID, creating one if needed. More...
 
static bool GetTuningParams (uint mplexid, QString &modulation, uint64_t &frequency, uint &dvb_transportid, uint &dvb_networkid, QString &si_std)
 
static bool GetATSCChannel (uint sourceid, const QString &channum, uint &major, uint &minor)
 
static bool IsATSCChannel (uint sourceid, const QString &channum)
 
static int CreateChanID (uint sourceid, const QString &chan_num)
 Creates a unique channel ID for database use. More...
 
static bool CreateChannel (uint db_mplexid, uint db_sourceid, uint new_channel_id, const QString &callsign, const QString &service_name, const QString &chan_num, uint service_id, uint atsc_major_channel, uint atsc_minor_channel, bool use_on_air_guide, ChannelVisibleType visible, const QString &freqid, const QString &icon=QString(), QString format="Default", const QString &xmltvid=QString(), const QString &default_authority=QString(), uint service_type=0, int recpriority=0, int tmOffset=0, int commMethod=-1)
 
static bool UpdateChannel (uint db_mplexid, uint source_id, uint channel_id, const QString &callsign, const QString &service_name, const QString &chan_num, uint service_id, uint atsc_major_channel, uint atsc_minor_channel, bool use_on_air_guide, ChannelVisibleType visible, const QString &freqid=QString(), const QString &icon=QString(), QString format=QString(), const QString &xmltvid=QString(), const QString &default_authority=QString(), uint service_type=0, int recpriority=INT_MIN, int tmOffset=INT_MIN, int commMethod=INT_MIN)
 
static bool CreateIPTVTuningData (uint channel_id, const IPTVTuningData &tuning)
 
static bool UpdateIPTVTuningData (uint channel_id, const IPTVTuningData &tuning)
 
static void UpdateInsertInfoFromDB (ChannelInsertInfo &chan)
 
static void UpdateChannelNumberFromDB (ChannelInsertInfo &chan)
 
static bool DeleteChannel (uint channel_id)
 
static bool SetVisible (uint channel_id, ChannelVisibleType visible)
 
static bool SetServiceVersion (int mplexid, int version)
 
static int GetChanID (int db_mplexid, int service_transport_id, int major_channel, int minor_channel, int program_number)
 
static int GetServiceVersion (int mplexid)
 
static QString GetDefaultAuthority (uint chanid)
 Returns the DVB default authority for the chanid given. More...
 
static QString GetIcon (uint chanid)
 
static std::vector< uintGetInputIDs (uint chanid)
 
static QString GetUnknownCallsign (void)
 
static uint FindChannel (uint sourceid, const QString &freqid)
 
static int GetChanID (uint sourceid, const QString &channum)
 
static bool GetChannelData (uint sourceid, uint &chanid, const QString &channum, QString &tvformat, QString &modulation, QString &freqtable, QString &freqid, int &finetune, uint64_t &frequency, QString &dtv_si_std, int &mpeg_prog_num, uint &atsc_major, uint &atsc_minor, uint &dvb_transportid, uint &dvb_networkid, uint &mplexid, bool &commfree)
 
static int GetProgramNumber (uint sourceid, const QString &channum)
 
static QString GetVideoFilters (uint sourceid, const QString &channum)
 
static IPTVTuningData GetIPTVTuningData (uint chanid)
 
static ChannelInfoList LoadChannels (uint startIndex, uint count, uint &totalAvailable, bool ignoreHidden=true, OrderBy orderBy=kChanOrderByChanNum, GroupBy groupBy=kChanGroupByChanid, uint sourceID=0, uint channelGroupID=0, bool liveTVOnly=false, const QString &callsign="", const QString &channum="", bool ignoreUntunable=true)
 Load channels from database into a list of ChannelInfo objects. More...
 
static ChannelInfoList GetChannels (uint sourceid, bool visible_only, const QString &group_by=QString(), uint channel_groupid=0)
 
static ChannelInfoList GetAllChannels (uint sourceid)
 Returns channels that are not connected to an input and channels that are not marked as visible. More...
 
static std::vector< uintGetChanIDs (int sourceid=-1, bool onlyVisible=false)
 
static uint GetChannelCount (int sourceid=-1)
 
static void SortChannels (ChannelInfoList &list, const QString &order, bool eliminate_duplicates=false)
 
static int GetNearestChannel (const ChannelInfoList &list, const QString &channum)
 
static uint GetNextChannel (const ChannelInfoList &sorted, uint old_chanid, uint mplexid_restriction, uint chanid_restriction, ChannelChangeDirection direction, bool skip_non_visible=true, bool skip_same_channum_and_callsign=false, bool skip_other_sources=false)
 
static QString GetChannelValueStr (const QString &channel_field, uint sourceid, const QString &channum)
 
static int GetChannelValueInt (const QString &channel_field, uint sourceid, const QString &channum)
 
static bool IsOnSameMultiplex (uint srcid, const QString &new_channum, const QString &old_channum)
 
static QStringList GetValidRecorderList (uint chanid, const QString &channum)
 Returns list of the recorders that have chanid or channum in their sources. More...
 
static bool IsConflicting (const QString &channum, uint sourceid=0, uint excluded_chanid=0)
 
static std::vector< uintGetConflicting (const QString &channum, uint sourceid=0)
 
static QString GetChanNum (int chan_id)
 Returns the channel-number string of the given channel. More...
 
static std::chrono::minutes GetTimeOffset (int chan_id)
 Returns the listings time offset in minutes for given channel. More...
 
static int GetSourceID (int mplexid)
 
static uint GetSourceIDForChannel (uint chanid)
 
static QStringList GetInputTypes (uint chanid)
 
static bool GetCachedPids (uint chanid, pid_cache_t &pid_cache)
 Returns cached MPEG PIDs when given a Channel ID. More...
 
static bool SetChannelValue (const QString &field_name, const QString &value, uint sourceid, const QString &channum)
 
static bool SetChannelValue (const QString &field_name, const QString &value, int chanid)
 
static bool SaveCachedPids (uint chanid, const pid_cache_t &_pid_cache, bool delete_all=false)
 Saves PIDs for PSIP tables to database. More...
 

Static Public Attributes

static const QString kATSCSeparators = "(_|-|#|\\.)"
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (ChannelUtil)
 

Static Private Member Functions

static ChannelInfoList GetChannelsInternal (uint sourceid, bool visible_only, bool include_disconnected, const QString &group_by, uint channel_groupid)
 
static QString GetChannelStringField (int chan_id, const QString &field)
 

Static Private Attributes

static QReadWriteLock s_channelDefaultAuthorityMapLock
 
static QMap< uint, QString > s_channelDefaultAuthorityMap
 
static bool s_channelDefaultAuthority_runInit = true
 

Friends

class TestEITFixups
 

Detailed Description

Collection of helper utilities for channel DB use.

Definition at line 48 of file channelutil.h.

Member Enumeration Documentation

◆ OrderBy

Enumerator
kChanOrderByChanNum 
kChanOrderByName 
kChanOrderByLiveTV 

Definition at line 206 of file channelutil.h.

◆ GroupBy

Enumerator
kChanGroupByCallsign 
kChanGroupByCallsignAndChannum 
kChanGroupByChanid 

Definition at line 213 of file channelutil.h.

Member Function Documentation

◆ Q_DECLARE_TR_FUNCTIONS()

ChannelUtil::Q_DECLARE_TR_FUNCTIONS ( ChannelUtil  )
private

◆ CreateMultiplex() [1/3]

uint ChannelUtil::CreateMultiplex ( int  sourceid,
const QString &  sistandard,
uint64_t  frequency,
const QString &  modulation,
int  transport_id = -1,
int  network_id = -1 
)
static

◆ CreateMultiplex() [2/3]

uint ChannelUtil::CreateMultiplex ( int  sourceid,
const QString &  sistandard,
uint64_t  frequency,
const QString &  modulation,
int  transport_id,
int  network_id,
int  symbol_rate,
signed char  bandwidth,
signed char  polarity,
signed char  inversion,
signed char  trans_mode,
const QString &  inner_FEC,
const QString &  constellation,
signed char  hierarchy,
const QString &  hp_code_rate,
const QString &  lp_code_rate,
const QString &  guard_interval,
const QString &  mod_sys,
const QString &  rolloff 
)
static

Definition at line 389 of file channelutil.cpp.

◆ CreateMultiplex() [3/3]

uint ChannelUtil::CreateMultiplex ( uint  sourceid,
const DTVMultiplex mux,
int  transport_id,
int  network_id 
)
static

Definition at line 416 of file channelutil.cpp.

◆ CreateMultiplexes()

std::vector< uint > ChannelUtil::CreateMultiplexes ( int  sourceid,
const NetworkInformationTable nit 
)
static

Definition at line 437 of file channelutil.cpp.

◆ GetMplexID() [1/5]

uint ChannelUtil::GetMplexID ( uint  sourceid,
const QString &  channum 
)
static

◆ GetMplexID() [2/5]

int ChannelUtil::GetMplexID ( uint  sourceid,
uint64_t  frequency 
)
static

Definition at line 484 of file channelutil.cpp.

◆ GetMplexID() [3/5]

int ChannelUtil::GetMplexID ( uint  sourceid,
uint64_t  frequency,
uint  transport_id,
uint  network_id 
)
static

Definition at line 509 of file channelutil.cpp.

◆ GetMplexID() [4/5]

int ChannelUtil::GetMplexID ( uint  sourceid,
uint  transport_id,
uint  network_id 
)
static

Definition at line 539 of file channelutil.cpp.

◆ GetMplexID() [5/5]

uint ChannelUtil::GetMplexID ( uint  chanid)
static

Definition at line 567 of file channelutil.cpp.

◆ GetBetterMplexID()

int ChannelUtil::GetBetterMplexID ( int  current_mplexid,
int  transport_id,
int  network_id 
)
static

Returns best match multiplex ID, creating one if needed.

First, see if you can get an exact match based on the current mplexid's sourceID and the NetworkID/TransportID.

Next, see if current one is NULL, if so update those values and return current mplexid.

Next, if values were set, see where you can find this NetworkID/TransportID. If we get an exact match just return it, since there is no question what mplexid this NetworkId/TransportId is for. If we get many matches, return CurrentMplexID.

Next, try to repeat query without currentmplexid as source id. If we get a singe match return it, if we get many matches we return the first one.

If none of these work return -1.

Returns
mplexid on success, -1 on failure.

Definition at line 610 of file channelutil.cpp.

◆ GetTuningParams()

bool ChannelUtil::GetTuningParams ( uint  mplexid,
QString &  modulation,
uint64_t &  frequency,
uint dvb_transportid,
uint dvb_networkid,
QString &  si_std 
)
static

Definition at line 721 of file channelutil.cpp.

Referenced by GetChannelData(), and handle_transport_desc().

◆ GetATSCChannel()

bool ChannelUtil::GetATSCChannel ( uint  sourceid,
const QString &  channum,
uint major,
uint minor 
)
static

Definition at line 1876 of file channelutil.cpp.

Referenced by TVRec::TuningOnSameMultiplex().

◆ IsATSCChannel()

static bool ChannelUtil::IsATSCChannel ( uint  sourceid,
const QString &  channum 
)
inlinestatic

Definition at line 100 of file channelutil.h.

◆ CreateChanID()

int ChannelUtil::CreateChanID ( uint  sourceid,
const QString &  chan_num 
)
static

Creates a unique channel ID for database use.

Returns
chanid if successful, -1 if not

Definition at line 1448 of file channelutil.cpp.

Referenced by ChannelScanSM::HandleAllGood(), ChannelData::handleChannels(), ChannelImporter::InsertChannels(), ExternRecChannelScanner::run(), VBoxChannelFetcher::run(), IPTVChannelFetcher::run(), and HDHRChannelFetcher::run().

◆ CreateChannel()

bool ChannelUtil::CreateChannel ( uint  db_mplexid,
uint  db_sourceid,
uint  new_channel_id,
const QString &  callsign,
const QString &  service_name,
const QString &  chan_num,
uint  service_id,
uint  atsc_major_channel,
uint  atsc_minor_channel,
bool  use_on_air_guide,
ChannelVisibleType  visible,
const QString &  freqid,
const QString &  icon = QString(),
QString  format = "Default",
const QString &  xmltvid = QString(),
const QString &  default_authority = QString(),
uint  service_type = 0,
int  recpriority = 0,
int  tmOffset = 0,
int  commMethod = -1 
)
static

◆ UpdateChannel()

bool ChannelUtil::UpdateChannel ( uint  db_mplexid,
uint  source_id,
uint  channel_id,
const QString &  callsign,
const QString &  service_name,
const QString &  chan_num,
uint  service_id,
uint  atsc_major_channel,
uint  atsc_minor_channel,
bool  use_on_air_guide,
ChannelVisibleType  visible,
const QString &  freqid = QString(),
const QString &  icon = QString(),
QString  format = QString(),
const QString &  xmltvid = QString(),
const QString &  default_authority = QString(),
uint  service_type = 0,
int  recpriority = INT_MIN,
int  tmOffset = INT_MIN,
int  commMethod = INT_MIN 
)
static

◆ CreateIPTVTuningData()

static bool ChannelUtil::CreateIPTVTuningData ( uint  channel_id,
const IPTVTuningData tuning 
)
inlinestatic

◆ UpdateIPTVTuningData()

bool ChannelUtil::UpdateIPTVTuningData ( uint  channel_id,
const IPTVTuningData tuning 
)
static

◆ UpdateInsertInfoFromDB()

void ChannelUtil::UpdateInsertInfoFromDB ( ChannelInsertInfo chan)
static

Definition at line 1690 of file channelutil.cpp.

Referenced by ChannelImporter::UpdateChannels().

◆ UpdateChannelNumberFromDB()

void ChannelUtil::UpdateChannelNumberFromDB ( ChannelInsertInfo chan)
static

Definition at line 1664 of file channelutil.cpp.

Referenced by ChannelImporter::UpdateChannels().

◆ DeleteChannel()

bool ChannelUtil::DeleteChannel ( uint  channel_id)
static

◆ SetVisible()

bool ChannelUtil::SetVisible ( uint  channel_id,
ChannelVisibleType  visible 
)
static

Definition at line 1816 of file channelutil.cpp.

Referenced by ChannelImporter::DeleteChannels().

◆ SetServiceVersion()

bool ChannelUtil::SetServiceVersion ( int  mplexid,
int  version 
)
static

Definition at line 1835 of file channelutil.cpp.

◆ GetChanID() [1/2]

int ChannelUtil::GetChanID ( int  db_mplexid,
int  service_transport_id,
int  major_channel,
int  minor_channel,
int  program_number 
)
static

◆ GetServiceVersion()

int ChannelUtil::GetServiceVersion ( int  mplexid)
static

Definition at line 1854 of file channelutil.cpp.

◆ GetDefaultAuthority()

QString ChannelUtil::GetDefaultAuthority ( uint  chanid)
static

Returns the DVB default authority for the chanid given.

Definition at line 1179 of file channelutil.cpp.

Referenced by EITFixUp::AddDVBEITAuthority().

◆ GetIcon()

QString ChannelUtil::GetIcon ( uint  chanid)
static

◆ GetInputIDs()

static std::vector<uint> ChannelUtil::GetInputIDs ( uint  chanid)
static

◆ GetUnknownCallsign()

QString ChannelUtil::GetUnknownCallsign ( void  )
static

Definition at line 1307 of file channelutil.cpp.

Referenced by ChannelScanSM::HandleAllGood(), and update_info().

◆ FindChannel()

uint ChannelUtil::FindChannel ( uint  sourceid,
const QString &  freqid 
)
static

Definition at line 1385 of file channelutil.cpp.

Referenced by ChannelScanSM::HandleAllGood().

◆ GetChanID() [2/2]

static int ChannelUtil::GetChanID ( uint  sourceid,
const QString &  channum 
)
inlinestatic

Definition at line 185 of file channelutil.h.

◆ GetChannelData()

bool ChannelUtil::GetChannelData ( uint  sourceid,
uint chanid,
const QString &  channum,
QString &  tvformat,
QString &  modulation,
QString &  freqtable,
QString &  freqid,
int &  finetune,
uint64_t &  frequency,
QString &  dtv_si_std,
int &  mpeg_prog_num,
uint atsc_major,
uint atsc_minor,
uint dvb_transportid,
uint dvb_networkid,
uint mplexid,
bool commfree 
)
static

Definition at line 1904 of file channelutil.cpp.

Referenced by ChannelBase::IsTunable(), and DTVChannel::SetChannelByString().

◆ GetProgramNumber()

static int ChannelUtil::GetProgramNumber ( uint  sourceid,
const QString &  channum 
)
inlinestatic

Definition at line 197 of file channelutil.h.

Referenced by TVRec::TuningOnSameMultiplex().

◆ GetVideoFilters()

static QString ChannelUtil::GetVideoFilters ( uint  sourceid,
const QString &  channum 
)
inlinestatic

Definition at line 199 of file channelutil.h.

Referenced by TVRec::SetVideoFiltersForChannel().

◆ GetIPTVTuningData()

IPTVTuningData ChannelUtil::GetIPTVTuningData ( uint  chanid)
static

Definition at line 2002 of file channelutil.cpp.

Referenced by DTVChannel::SetChannelByString().

◆ LoadChannels()

ChannelInfoList ChannelUtil::LoadChannels ( uint  startIndex,
uint  count,
uint totalAvailable,
bool  ignoreHidden = true,
ChannelUtil::OrderBy  orderBy = kChanOrderByChanNum,
ChannelUtil::GroupBy  groupBy = kChanGroupByChanid,
uint  sourceID = 0,
uint  channelGroupID = 0,
bool  liveTVOnly = false,
const QString &  callsign = "",
const QString &  channum = "",
bool  ignoreUntunable = true 
)
static

Load channels from database into a list of ChannelInfo objects.

Note
This replaces all previous methods e.g. GetChannels() and GetAllChannels() in channelutil.h
There is no grouping option by design and here's why. Grouping with a ChannelInfo object is largely self-defeating, 99% of the information in the remaining result won't apply to the other 'grouped' channels. Therefore GroupBy should be used when you only care about Name, Number and Callsign. Loading a complete ChannelInfo object, including input info is therefore an actual waste of processor cycles and memory, so we may yet introduce a parent class for ChannelInfo called BasicChannelInfo or similar with it's own Load function

Definition at line 2454 of file channelutil.cpp.

Referenced by ChannelData::channelList(), GuideGrid::fillChannelInfos(), Channel::GetChannelInfoList(), V2Channel::GetChannelInfoList(), Guide::GetProgramGuide(), V2Guide::GetProgramGuide(), and startTVNormal().

◆ GetChannels()

static ChannelInfoList ChannelUtil::GetChannels ( uint  sourceid,
bool  visible_only,
const QString &  group_by = QString(),
uint  channel_groupid = 0 
)
inlinestatic

◆ GetAllChannels()

static ChannelInfoList ChannelUtil::GetAllChannels ( uint  sourceid)
inlinestatic

Returns channels that are not connected to an input and channels that are not marked as visible.

Deprecated:

Definition at line 264 of file channelutil.h.

Referenced by StartingChannel::SetSourceID().

◆ GetChanIDs()

std::vector< uint > ChannelUtil::GetChanIDs ( int  sourceid = -1,
bool  onlyVisible = false 
)
static

◆ GetChannelCount()

uint ChannelUtil::GetChannelCount ( int  sourceid = -1)
static

Definition at line 2305 of file channelutil.cpp.

Referenced by ChannelImporter::Process().

◆ SortChannels()

void ChannelUtil::SortChannels ( ChannelInfoList list,
const QString &  order,
bool  eliminate_duplicates = false 
)
static

◆ GetNearestChannel()

int ChannelUtil::GetNearestChannel ( const ChannelInfoList list,
const QString &  channum 
)
static

Definition at line 2357 of file channelutil.cpp.

Referenced by GuideGrid::FindChannel().

◆ GetNextChannel()

uint ChannelUtil::GetNextChannel ( const ChannelInfoList sorted,
uint  old_chanid,
uint  mplexid_restriction,
uint  chanid_restriction,
ChannelChangeDirection  direction,
bool  skip_non_visible = true,
bool  skip_same_channum_and_callsign = false,
bool  skip_other_sources = false 
)
static

◆ GetChannelValueStr()

QString ChannelUtil::GetChannelValueStr ( const QString &  channel_field,
uint  sourceid,
const QString &  channum 
)
static

Definition at line 950 of file channelutil.cpp.

Referenced by GetChannelValueInt().

◆ GetChannelValueInt()

int ChannelUtil::GetChannelValueInt ( const QString &  channel_field,
uint  sourceid,
const QString &  channum 
)
static

◆ IsOnSameMultiplex()

bool ChannelUtil::IsOnSameMultiplex ( uint  srcid,
const QString &  new_channum,
const QString &  old_channum 
)
static

Definition at line 991 of file channelutil.cpp.

Referenced by TVRec::TuningOnSameMultiplex().

◆ GetValidRecorderList()

QStringList ChannelUtil::GetValidRecorderList ( uint  chanid,
const QString &  channum 
)
static

Returns list of the recorders that have chanid or channum in their sources.

Parameters
chanidChannel ID of channel we are querying recorders for.
channumChannel "number" we are querying recorders for.
Returns
List of inputid's for recorders with channel.

Definition at line 1092 of file channelutil.cpp.

Referenced by TV::ChangeChannel(), TV::HandleStateChange(), and TV::SwitchInputs().

◆ IsConflicting()

static bool ChannelUtil::IsConflicting ( const QString &  channum,
uint  sourceid = 0,
uint  excluded_chanid = 0 
)
inlinestatic

◆ GetConflicting()

std::vector< uint > ChannelUtil::GetConflicting ( const QString &  channum,
uint  sourceid = 0 
)
static

Definition at line 1103 of file channelutil.cpp.

◆ GetChanNum()

QString ChannelUtil::GetChanNum ( int  chan_id)
static

Returns the channel-number string of the given channel.

Parameters
chanidprimary key for channel record

Definition at line 777 of file channelutil.cpp.

Referenced by Dvr::AddRecordedProgram(), V2Dvr::AddRecordedProgram(), TV::ChangeChannel(), ChannelImporter::DeleteChannels(), ManualSchedule::recordClicked(), ExternRecChannelScanner::run(), TV::SwitchInputs(), and TVRec::TuningGetChanNum().

◆ GetTimeOffset()

std::chrono::minutes ChannelUtil::GetTimeOffset ( int  chan_id)
static

Returns the listings time offset in minutes for given channel.

Parameters
chanidprimary key for channel record

Definition at line 782 of file channelutil.cpp.

Referenced by ProgramData::ClearDataByChannel().

◆ GetSourceID()

int ChannelUtil::GetSourceID ( int  mplexid)
static

Definition at line 787 of file channelutil.cpp.

◆ GetSourceIDForChannel()

uint ChannelUtil::GetSourceIDForChannel ( uint  chanid)
static

◆ GetInputTypes()

QStringList ChannelUtil::GetInputTypes ( uint  chanid)
static

Definition at line 825 of file channelutil.cpp.

Referenced by ChannelWizard::ChannelWizard().

◆ GetCachedPids()

bool ChannelUtil::GetCachedPids ( uint  chanid,
pid_cache_t pid_cache 
)
static

Returns cached MPEG PIDs when given a Channel ID.

Parameters
chanidChannel ID to fetch cached pids for.
pid_cacheList of PIDs with their TableID types is returned in pid_cache.

Definition at line 858 of file channelutil.cpp.

Referenced by DTVChannel::GetCachedPids(), ChannelOptionsRawTS::Load(), SaveCachedPids(), and DTVChannel::SetChannelByString().

◆ SetChannelValue() [1/2]

bool ChannelUtil::SetChannelValue ( const QString &  field_name,
const QString &  value,
uint  sourceid,
const QString &  channum 
)
static

◆ SetChannelValue() [2/2]

bool ChannelUtil::SetChannelValue ( const QString &  field_name,
const QString &  value,
int  chanid 
)
static

Definition at line 1158 of file channelutil.cpp.

◆ SaveCachedPids()

bool ChannelUtil::SaveCachedPids ( uint  chanid,
const pid_cache_t _pid_cache,
bool  delete_all = false 
)
static

Saves PIDs for PSIP tables to database.

Parameters
chanidChannel ID to fetch cached pids for.
_pid_cacheList of PIDs with their TableID types to be saved.
delete_allIf true delete both permanent and transient pids first.

Definition at line 891 of file channelutil.cpp.

Referenced by ChannelOptionsRawTS::Save(), and DTVChannel::SaveCachedPids().

◆ GetChannelsInternal()

ChannelInfoList ChannelUtil::GetChannelsInternal ( uint  sourceid,
bool  visible_only,
bool  include_disconnected,
const QString &  group_by,
uint  channel_groupid 
)
staticprivate
Deprecated:
Use LoadChannels instead
Deprecated:
Use ChannelInfo::LoadChannels() instead

Definition at line 2078 of file channelutil.cpp.

◆ GetChannelStringField()

QString ChannelUtil::GetChannelStringField ( int  chan_id,
const QString &  field 
)
staticprivate

Definition at line 756 of file channelutil.cpp.

Referenced by GetChanNum(), and GetTimeOffset().

Friends And Related Function Documentation

◆ TestEITFixups

friend class TestEITFixups
friend

Definition at line 50 of file channelutil.h.

Member Data Documentation

◆ kATSCSeparators

const QString ChannelUtil::kATSCSeparators = "(_|-|#|\\.)"
static

Definition at line 342 of file channelutil.h.

Referenced by lt_smart().

◆ s_channelDefaultAuthorityMapLock

QReadWriteLock ChannelUtil::s_channelDefaultAuthorityMapLock
staticprivate

Definition at line 353 of file channelutil.h.

Referenced by GetDefaultAuthority().

◆ s_channelDefaultAuthorityMap

QMap< uint, QString > ChannelUtil::s_channelDefaultAuthorityMap
staticprivate

Definition at line 354 of file channelutil.h.

Referenced by GetDefaultAuthority().

◆ s_channelDefaultAuthority_runInit

bool ChannelUtil::s_channelDefaultAuthority_runInit = true
staticprivate

Definition at line 355 of file channelutil.h.

Referenced by GetDefaultAuthority().


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