本文整理汇总了C++中CFileItem::FillInDefaultIcon方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileItem::FillInDefaultIcon方法的具体用法?C++ CFileItem::FillInDefaultIcon怎么用?C++ CFileItem::FillInDefaultIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileItem
的用法示例。
在下文中一共展示了CFileItem::FillInDefaultIcon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MediaPlay
void CApplicationMessenger::MediaPlay(string filename)
{
CFileItem item;
item.m_strPath = filename;
item.m_bIsFolder = false;
if (item.IsAudio())
item.SetMusicThumb();
else
item.SetVideoThumb();
item.FillInDefaultIcon();
MediaPlay(item);
}
示例2: ProcessMessage
//.........这里部分代码省略.........
if (pMsg->lpVoid && pMsg->dwParam2 == 0)
{
CFileItem *item = (CFileItem *)pMsg->lpVoid;
g_application.PlayFile(*item, pMsg->dwParam1 != 0);
delete item;
return;
}
// restore to previous window if needed
if (g_windowManager.GetActiveWindow() == WINDOW_SLIDESHOW ||
g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO ||
g_windowManager.GetActiveWindow() == WINDOW_VISUALISATION)
g_windowManager.PreviousWindow();
g_application.ResetScreenSaver();
g_application.WakeUpScreenSaverAndDPMS();
//g_application.StopPlaying();
// play file
CFileItem *item;
if (pMsg->lpVoid && pMsg->dwParam2 == 1)
{
item = (CFileItem *)pMsg->lpVoid;
}
else
{
item = new CFileItem(pMsg->strParam, false);
}
if (item->IsAudio())
item->SetMusicThumb();
else
item->SetVideoThumb();
item->FillInDefaultIcon();
g_application.PlayMedia(*item, item->IsAudio() ? PLAYLIST_MUSIC : PLAYLIST_VIDEO); //Note: this will play playlists always in the temp music playlist (default 2nd parameter), maybe needs some tweaking.
delete item;
}
break;
case TMSG_MEDIA_RESTART:
g_application.Restart(true);
break;
case TMSG_MEDIA_QUEUE_NEXT_ITEM:
{
CFileItem *item = (CFileItem *)pMsg->lpVoid;
//g_application.QueueNextMedia(*item);
delete item;
return;
}
case TMSG_MEDIA_UPDATE_ITEM:
{
CGUIMessage msg(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_UPDATE_ITEM, 0);
msg.SetItem(CFileItemPtr((CFileItem*)pMsg->lpVoid));
g_windowManager.SendMessage(msg);
return;
}
case TMSG_PICTURE_SHOW:
{
CGUIWindowSlideShow *pSlideShow = (CGUIWindowSlideShow *)g_windowManager.GetWindow(WINDOW_SLIDESHOW);
if (!pSlideShow) return ;