本文整理汇总了C++中CPVRClientPtr::GetFriendlyName方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRClientPtr::GetFriendlyName方法的具体用法?C++ CPVRClientPtr::GetFriendlyName怎么用?C++ CPVRClientPtr::GetFriendlyName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRClientPtr
的用法示例。
在下文中一共展示了CPVRClientPtr::GetFriendlyName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnPlaybackStarted
void CPVRManager::OnPlaybackStarted(const CFileItemPtr item)
{
m_playingChannel.reset();
m_playingRecording.reset();
m_playingEpgTag.reset();
m_playingClientId = -1;
m_strPlayingClientName.clear();
if (item->HasPVRChannelInfoTag())
{
const CPVRChannelPtr channel(item->GetPVRChannelInfoTag());
m_playingChannel = channel;
m_playingClientId = m_playingChannel->ClientID();
SetPlayingGroup(channel);
int iLastWatchedDelay = m_settings.GetIntValue(CSettings::SETTING_PVRPLAYBACK_DELAYMARKLASTWATCHED) * 1000;
if (iLastWatchedDelay > 0)
{
// Insert new / replace existing last watched update timer
if (m_lastWatchedUpdateTimer)
m_lastWatchedUpdateTimer->Stop(true);
m_lastWatchedUpdateTimer.reset(new CLastWatchedUpdateTimer(*this, channel, CDateTime::GetUTCDateTime()));
m_lastWatchedUpdateTimer->Start(iLastWatchedDelay);
}
else
{
// Store last watched timestamp immediately
UpdateLastWatched(channel, CDateTime::GetUTCDateTime());
}
}
else if (item->HasPVRRecordingInfoTag())
{
m_playingRecording = item->GetPVRRecordingInfoTag();
m_playingClientId = m_playingRecording->m_iClientId;
}
else if (item->HasEPGInfoTag())
{
m_playingEpgTag = item->GetEPGInfoTag();
m_playingClientId = m_playingEpgTag->ClientID();
}
if (m_playingClientId != -1)
{
const CPVRClientPtr client = GetClient(m_playingClientId);
if (client)
m_strPlayingClientName = client->GetFriendlyName();
}
m_guiActions->OnPlaybackStarted(item);
m_epgContainer.OnPlaybackStarted(item);
}
示例2: OnPlaybackStarted
void CPVRManager::OnPlaybackStarted(const CFileItemPtr item)
{
m_playingChannel.reset();
m_playingRecording.reset();
m_playingEpgTag.reset();
m_playingClientId = -1;
m_strPlayingClientName.clear();
if (item->HasPVRChannelInfoTag())
{
const CPVRChannelPtr channel(item->GetPVRChannelInfoTag());
m_playingChannel = channel;
m_playingClientId = m_playingChannel->ClientID();
SetPlayingGroup(channel);
UpdateLastWatched(channel);
}
else if (item->HasPVRRecordingInfoTag())
{
m_playingRecording = item->GetPVRRecordingInfoTag();
m_playingClientId = m_playingRecording->m_iClientId;
}
else if (item->HasEPGInfoTag())
{
m_playingEpgTag = item->GetEPGInfoTag();
m_playingClientId = m_playingEpgTag->ClientID();
}
if (m_playingClientId != -1)
{
const CPVRClientPtr client = GetClient(m_playingClientId);
if (client)
m_strPlayingClientName = client->GetFriendlyName();
}
m_guiActions->OnPlaybackStarted(item);
}