本文整理汇总了C++中CPVRChannelPtr::ClientChannelNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRChannelPtr::ClientChannelNumber方法的具体用法?C++ CPVRChannelPtr::ClientChannelNumber怎么用?C++ CPVRChannelPtr::ClientChannelNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRChannelPtr
的用法示例。
在下文中一共展示了CPVRChannelPtr::ClientChannelNumber方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateFromClient
bool CPVRChannel::UpdateFromClient(const CPVRChannelPtr &channel)
{
assert(channel.get());
SetClientID(channel->ClientID());
SetStreamURL(channel->StreamURL());
CSingleLock lock(m_critSection);
if (m_iClientChannelNumber.channel != channel->ClientChannelNumber() ||
m_iClientChannelNumber.subchannel != channel->ClientSubChannelNumber() ||
m_strInputFormat != channel->InputFormat() ||
m_iClientEncryptionSystem != channel->EncryptionSystem() ||
m_strClientChannelName != channel->ClientChannelName())
{
m_iClientChannelNumber.channel = channel->ClientChannelNumber();
m_iClientChannelNumber.subchannel = channel->ClientSubChannelNumber();
m_strInputFormat = channel->InputFormat();
m_iClientEncryptionSystem = channel->EncryptionSystem();
m_strClientChannelName = channel->ClientChannelName();
UpdateEncryptionName();
SetChanged();
}
// only update the channel name and icon if the user hasn't changed them manually
if (m_strChannelName.empty() || !IsUserSetName())
SetChannelName(channel->ClientChannelName());
if (m_strIconPath.empty() || !IsUserSetIcon())
SetIconPath(channel->IconPath());
return m_bChanged;
}
示例2: WriteClientChannelInfo
/*!
* @brief Copy over channel info from xbmcChannel to addonClient.
* @param xbmcChannel The channel on XBMC's side.
* @param addonChannel The channel on the addon's side.
*/
void CPVRClient::WriteClientChannelInfo(const CPVRChannelPtr &xbmcChannel, PVR_CHANNEL &addonChannel)
{
assert(xbmcChannel.get());
memset(&addonChannel, 0, sizeof(addonChannel));
addonChannel.iUniqueId = xbmcChannel->UniqueID();
addonChannel.iChannelNumber = xbmcChannel->ClientChannelNumber();
addonChannel.iSubChannelNumber = xbmcChannel->ClientSubChannelNumber();
strncpy(addonChannel.strChannelName, xbmcChannel->ClientChannelName().c_str(), sizeof(addonChannel.strChannelName) - 1);
strncpy(addonChannel.strIconPath, xbmcChannel->IconPath().c_str(), sizeof(addonChannel.strIconPath) - 1);
addonChannel.iEncryptionSystem = xbmcChannel->EncryptionSystem();
addonChannel.bIsRadio = xbmcChannel->IsRadio();
addonChannel.bIsHidden = xbmcChannel->IsHidden();
strncpy(addonChannel.strInputFormat, xbmcChannel->InputFormat().c_str(), sizeof(addonChannel.strInputFormat) - 1);
strncpy(addonChannel.strStreamURL, xbmcChannel->StreamURL().c_str(), sizeof(addonChannel.strStreamURL) - 1);
}
示例3: RemoveInvalidChannels
void CPVRChannelGroup::RemoveInvalidChannels(void)
{
CPVRChannelPtr channel;
CSingleLock lock(m_critSection);
for (PVR_CHANNEL_GROUP_SORTED_MEMBERS::iterator it = m_sortedMembers.begin(); it != m_sortedMembers.end();)
{
bool bDelete = false;
channel = (*it).channel;
if (channel->ClientChannelNumber() <= 0)
{
CLog::Log(LOGERROR, "PVRChannelGroup - %s - removing invalid channel '%s' from client '%i': no valid client channel number",
__FUNCTION__, channel->ChannelName().c_str(), channel->ClientID());
bDelete = true;
}
if (!bDelete && channel->UniqueID() <= 0)
{
CLog::Log(LOGERROR, "PVRChannelGroup - %s - removing invalid channel '%s' from client '%i': no valid unique ID",
__FUNCTION__, channel->ChannelName().c_str(), channel->ClientID());
bDelete = true;
}
/* remove this channel from all non-system groups if this is the internal group */
if (bDelete)
{
if (IsInternalGroup())
{
g_PVRChannelGroups->Get(m_bRadio)->RemoveFromAllGroups(channel);
channel->Delete();
}
else
{
m_members.erase(channel->StorageId());
it = m_sortedMembers.erase(it);
}
m_bChanged = true;
}
else
{
++it;
}
}
}