本文整理汇总了C++中CPVREpgInfoTagPtr::Icon方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVREpgInfoTagPtr::Icon方法的具体用法?C++ CPVREpgInfoTagPtr::Icon怎么用?C++ CPVREpgInfoTagPtr::Icon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVREpgInfoTagPtr
的用法示例。
在下文中一共展示了CPVREpgInfoTagPtr::Icon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetPVRLabel
bool CPVRGUIInfo::GetPVRLabel(const CFileItem *item, const CGUIInfo &info, std::string &strValue) const
{
CSingleLock lock(m_critSection);
switch (info.m_info)
{
case PVR_EPG_EVENT_ICON:
{
const CPVREpgInfoTagPtr epgTag = (item->IsPVRChannel() || item->IsEPG()) ? CPVRItem(item).GetEpgInfoTag() : nullptr;
if (epgTag)
{
strValue = epgTag->Icon();
}
return true;
}
case PVR_EPG_EVENT_DURATION:
{
const CPVREpgInfoTagPtr epgTag = (item->IsPVRChannel() || item->IsEPG()) ? CPVRItem(item).GetEpgInfoTag() : nullptr;
strValue = m_timesInfo.GetEpgEventDuration(epgTag, static_cast<TIME_FORMAT>(info.GetData1()));
return true;
}
case PVR_EPG_EVENT_ELAPSED_TIME:
{
const CPVREpgInfoTagPtr epgTag = (item->IsPVRChannel() || item->IsEPG()) ? CPVRItem(item).GetEpgInfoTag() : nullptr;
strValue = m_timesInfo.GetEpgEventElapsedTime(epgTag, static_cast<TIME_FORMAT>(info.GetData1()));
return true;
}
case PVR_EPG_EVENT_REMAINING_TIME:
{
const CPVREpgInfoTagPtr epgTag = (item->IsPVRChannel() || item->IsEPG()) ? CPVRItem(item).GetEpgInfoTag() : nullptr;
strValue = m_timesInfo.GetEpgEventRemainingTime(epgTag, static_cast<TIME_FORMAT>(info.GetData1()));
return true;
}
case PVR_EPG_EVENT_FINISH_TIME:
{
const CPVREpgInfoTagPtr epgTag = (item->IsPVRChannel() || item->IsEPG()) ? CPVRItem(item).GetEpgInfoTag() : nullptr;
strValue = m_timesInfo.GetEpgEventFinishTime(epgTag, static_cast<TIME_FORMAT>(info.GetData1()));
return true;
}
case PVR_TIMESHIFT_START_TIME:
strValue = m_timesInfo.GetTimeshiftStartTime(static_cast<TIME_FORMAT>(info.GetData1()));
return true;
case PVR_TIMESHIFT_END_TIME:
strValue = m_timesInfo.GetTimeshiftEndTime(static_cast<TIME_FORMAT>(info.GetData1()));
return true;
case PVR_TIMESHIFT_PLAY_TIME:
strValue = m_timesInfo.GetTimeshiftPlayTime(static_cast<TIME_FORMAT>(info.GetData1()));
return true;
case PVR_TIMESHIFT_OFFSET:
strValue = m_timesInfo.GetTimeshiftOffset(static_cast<TIME_FORMAT>(info.GetData1()));
return true;
case PVR_TIMESHIFT_PROGRESS_DURATION:
strValue = m_timesInfo.GetTimeshiftProgressDuration(static_cast<TIME_FORMAT>(info.GetData1()));
return true;
case PVR_TIMESHIFT_PROGRESS_START_TIME:
strValue = m_timesInfo.GetTimeshiftProgressStartTime(static_cast<TIME_FORMAT>(info.GetData1()));
return true;
case PVR_TIMESHIFT_PROGRESS_END_TIME:
strValue = m_timesInfo.GetTimeshiftProgressEndTime(static_cast<TIME_FORMAT>(info.GetData1()));
return true;
case PVR_EPG_EVENT_SEEK_TIME:
strValue = m_timesInfo.GetEpgEventSeekTime(g_application.GetAppPlayer().GetSeekHandler().GetSeekSize(),
static_cast<TIME_FORMAT>(info.GetData1()));
return true;
case PVR_NOW_RECORDING_TITLE:
strValue = m_anyTimersInfo.GetActiveTimerTitle();
return true;
case PVR_NOW_RECORDING_CHANNEL:
strValue = m_anyTimersInfo.GetActiveTimerChannelName();
return true;
case PVR_NOW_RECORDING_CHAN_ICO:
strValue = m_anyTimersInfo.GetActiveTimerChannelIcon();
return true;
case PVR_NOW_RECORDING_DATETIME:
strValue = m_anyTimersInfo.GetActiveTimerDateTime();
return true;
case PVR_NEXT_RECORDING_TITLE:
strValue = m_anyTimersInfo.GetNextTimerTitle();
return true;
case PVR_NEXT_RECORDING_CHANNEL:
strValue = m_anyTimersInfo.GetNextTimerChannelName();
return true;
case PVR_NEXT_RECORDING_CHAN_ICO:
strValue = m_anyTimersInfo.GetNextTimerChannelIcon();
return true;
case PVR_NEXT_RECORDING_DATETIME:
strValue = m_anyTimersInfo.GetNextTimerDateTime();
return true;
case PVR_TV_NOW_RECORDING_TITLE:
strValue = m_tvTimersInfo.GetActiveTimerTitle();
return true;
case PVR_TV_NOW_RECORDING_CHANNEL:
strValue = m_tvTimersInfo.GetActiveTimerChannelName();
return true;
case PVR_TV_NOW_RECORDING_CHAN_ICO:
strValue = m_tvTimersInfo.GetActiveTimerChannelIcon();
return true;
case PVR_TV_NOW_RECORDING_DATETIME:
strValue = m_tvTimersInfo.GetActiveTimerDateTime();
return true;
//.........这里部分代码省略.........
示例2: GetListItemAndPlayerLabel
//.........这里部分代码省略.........
case VIDEOPLAYER_YEAR:
case LISTITEM_YEAR:
if (epgTag->Year() > 0)
{
strValue = StringUtils::Format("%i", epgTag->Year());
return true;
}
return false;
case VIDEOPLAYER_SEASON:
case LISTITEM_SEASON:
if (epgTag->SeriesNumber() > 0)
{
strValue = StringUtils::Format("%i", epgTag->SeriesNumber());
return true;
}
return false;
case VIDEOPLAYER_EPISODE:
case LISTITEM_EPISODE:
if (epgTag->EpisodeNumber() > 0)
{
if (epgTag->SeriesNumber() == 0) // prefix episode with 'S'
strValue = StringUtils::Format("S%i", epgTag->EpisodeNumber());
else
strValue = StringUtils::Format("%i", epgTag->EpisodeNumber());
return true;
}
return false;
case VIDEOPLAYER_EPISODENAME:
case LISTITEM_EPISODENAME:
strValue = epgTag->EpisodeName();
return true;
case VIDEOPLAYER_CAST:
case LISTITEM_CAST:
strValue = epgTag->GetCastLabel();
return true;
case VIDEOPLAYER_DIRECTOR:
case LISTITEM_DIRECTOR:
strValue = epgTag->GetDirectorsLabel();
return true;
case VIDEOPLAYER_WRITER:
case LISTITEM_WRITER:
strValue = epgTag->GetWritersLabel();
return true;
case LISTITEM_EPG_EVENT_ICON:
strValue = epgTag->Icon();
return true;
case VIDEOPLAYER_PARENTAL_RATING:
case LISTITEM_PARENTALRATING:
if (epgTag->ParentalRating() > 0)
{
strValue = StringUtils::Format("%i", epgTag->ParentalRating());
return true;
}
return false;
case LISTITEM_PREMIERED:
if (epgTag->FirstAiredAsLocalTime().IsValid())
{
strValue = epgTag->FirstAiredAsLocalTime().GetAsLocalizedDate(true);
return true;
}
return false;
}
}
if (channel)
{
switch (info.m_info)
{
case MUSICPLAYER_CHANNEL_NAME:
{
const std::shared_ptr<CPVRRadioRDSInfoTag> rdsTag = channel->GetRadioRDSInfoTag();
if (rdsTag)
{
strValue = rdsTag->GetProgStation();
if (!strValue.empty())
return true;
}
// fall-thru is intended
}
case VIDEOPLAYER_CHANNEL_NAME:
case LISTITEM_CHANNEL_NAME:
strValue = channel->ChannelName();
return true;
case MUSICPLAYER_CHANNEL_NUMBER:
case VIDEOPLAYER_CHANNEL_NUMBER:
case LISTITEM_CHANNEL_NUMBER:
strValue = channel->ChannelNumber().FormattedChannelNumber();
return true;
case MUSICPLAYER_CHANNEL_GROUP:
case VIDEOPLAYER_CHANNEL_GROUP:
{
CSingleLock lock(m_critSection);
strValue = channel->IsRadio() ? m_strPlayingRadioGroup : m_strPlayingTVGroup;
return true;
}
}
}
return false;
}