bool CChannelMenu::OnMenuSelect(HWND hwnd,WPARAM wParam,LPARAM lParam) { HMENU hmenu=reinterpret_cast<HMENU>(lParam); UINT Command=LOWORD(wParam); if (hmenu==NULL || hmenu!=m_hmenu || hwnd!=m_hwnd || HIWORD(wParam)==0xFFFF || Command<m_FirstCommand || Command>m_LastCommand) { if (m_Tooltip.IsVisible()) m_Tooltip.TrackActivate(1,false); return false; } if ((m_Flags&FLAG_SHOWTOOLTIP)!=0) { MENUITEMINFO mii; mii.cbSize=sizeof(mii); mii.fMask=MIIM_DATA; if (::GetMenuItemInfo(hmenu,Command,FALSE,&mii)) { CChannelMenuItem *pItem=reinterpret_cast<CChannelMenuItem*>(mii.dwItemData); if (pItem==NULL) return false; const CEventInfoData *pEventInfo1,*pEventInfo2; pEventInfo1=pItem->GetEventInfo(0); if (pEventInfo1==NULL) { pEventInfo1=pItem->GetEventInfo(&GetAppClass().EpgProgramList,0); } if (pEventInfo1!=NULL) { TCHAR szText[256*2+1]; int Length; POINT pt; Length=GetEventText(pEventInfo1,szText,lengthof(szText)/2); pEventInfo2=pItem->GetEventInfo(&GetAppClass().EpgProgramList,1); if (pEventInfo2!=NULL) { szText[Length++]=_T('\r'); szText[Length++]=_T('\n'); GetEventText(pEventInfo2,szText+Length,lengthof(szText)/2); } m_Tooltip.SetText(1,szText); ::GetCursorPos(&pt); pt.x+=16; pt.y+=max(m_TextHeight,m_LogoHeight)+ m_Margins.cyTopHeight+m_Margins.cyBottomHeight; m_Tooltip.TrackPosition(pt.x,pt.y); m_Tooltip.TrackActivate(1,true); } else { m_Tooltip.TrackActivate(1,false); } } } return true; }
void CEpgOptions::Finalize() { if (m_hLoadThread!=NULL) { if (::WaitForSingleObject(m_hLoadThread,0)==WAIT_TIMEOUT) { GetAppClass().AddLog(TEXT("EPGデータ読み込みスレッドの終了を待っています...")); if (::WaitForSingleObject(m_hLoadThread,30000)==WAIT_TIMEOUT) { GetAppClass().AddLog(CLogItem::TYPE_WARNING,TEXT("EPGデータ読み込みスレッドを強制終了します。")); ::TerminateThread(m_hLoadThread,-1); } } ::CloseHandle(m_hLoadThread); m_hLoadThread=NULL; } SAFE_DELETE(m_pEpgDataLoader); }
bool CEpgOptions::SaveLogoFile() { if (m_fSaveLogoFile && m_szLogoFileName[0]!='\0') { CAppMain &App=GetAppClass(); CLogoManager &LogoManager=App.LogoManager; TCHAR szFileName[MAX_PATH]; if (!GetAbsolutePath(m_szLogoFileName,szFileName,lengthof(szFileName))) return false; if (!::PathFileExists(szFileName) || LogoManager.IsLogoDataUpdated()) { App.AddLog(TEXT("ロゴデータを \"%s\" に保存します..."),szFileName); if (!LogoManager.SaveLogoFile(szFileName)) { App.AddLog(CLogItem::TYPE_ERROR,TEXT("ロゴファイルの保存でエラーが発生しました。")); return false; } } if (::lstrlen(szFileName)+4<MAX_PATH) { ::lstrcat(szFileName,TEXT(".ini")); if (!::PathFileExists(szFileName) || LogoManager.IsLogoIDMapUpdated()) { App.AddLog(TEXT("ロゴ設定を \"%s\" に保存します..."),szFileName); LogoManager.SaveLogoIDMap(szFileName); } } } return true; }
bool CEpgOptions::LoadLogoFile() { if (m_fSaveLogoFile && m_szLogoFileName[0]!='\0') { CAppMain &App=GetAppClass(); CLogoManager &LogoManager=App.LogoManager; TCHAR szFileName[MAX_PATH]; if (!GetAbsolutePath(m_szLogoFileName,szFileName,lengthof(szFileName))) return false; if (::PathFileExists(szFileName)) { App.AddLog(TEXT("ロゴデータを \"%s\" から読み込みます..."),szFileName); if (!LogoManager.LoadLogoFile(szFileName)) { App.AddLog(CLogItem::TYPE_ERROR,TEXT("ロゴファイルの読み込みでエラーが発生しました。")); return false; } } if (::lstrlen(szFileName)+4<MAX_PATH) { ::lstrcat(szFileName,TEXT(".ini")); if (!::PathFileExists(szFileName)) { // 以前のバージョンとの互換用 ::GetModuleFileName(NULL,szFileName,lengthof(szFileName)); ::PathRenameExtension(szFileName,TEXT(".logo.ini")); if (!::PathFileExists(szFileName)) return false; } App.AddLog(TEXT("ロゴ設定を \"%s\" から読み込みます..."),szFileName); LogoManager.LoadLogoIDMap(szFileName); } } return true; }
bool CInformationPanel::CRecordItem::Update() { CAppMain &App=GetAppClass(); bool fRecording=App.RecordManager.IsRecording(); LONGLONG WroteSize; CRecordTask::DurationType RecordTime; LONGLONG DiskFreeSpace; if (fRecording) { const CRecordTask *pRecordTask=App.RecordManager.GetRecordTask(); WroteSize=pRecordTask->GetWroteSize(); RecordTime=pRecordTask->GetRecordTime(); DiskFreeSpace=pRecordTask->GetFreeSpace(); } if (fRecording==m_fRecording && (!fRecording || (WroteSize==m_WroteSize && RecordTime==m_RecordTime && DiskFreeSpace==m_DiskFreeSpace))) return false; m_fRecording=fRecording; if (fRecording) { m_WroteSize=WroteSize; m_RecordTime=RecordTime; m_DiskFreeSpace=DiskFreeSpace; } return true; }
bool CEpgOptions::AsyncLoadEpgFile(CEpgProgramList *pEpgList,CEpgFileLoadEventHandler *pEventHandler) { if (m_fSaveEpgFile) { TCHAR szFileName[MAX_PATH]; if (!GetAbsolutePath(m_szEpgFileName,szFileName,lengthof(szFileName))) return false; if (::PathFileExists(szFileName)) { GetAppClass().AddLog(TEXT("EPG データを \"%s\" から読み込みます..."),szFileName); EpgLoadInfo *pInfo=new EpgLoadInfo; pInfo->pList=pEpgList; pInfo->pEventHandler=pEventHandler; ::lstrcpy(pInfo->szFileName,szFileName); m_hLoadThread=(HANDLE)::_beginthreadex(NULL,0,EpgFileLoadThread,pInfo,0,NULL); if (m_hLoadThread==NULL) { delete pInfo; //return pEpgList->LoadFromFile(szFileName); return false; } } } return true; }
bool CInformationPanel::CVideoInfoItem::Update() { const CCoreEngine &CoreEngine=GetAppClass().CoreEngine; int OriginalVideoWidth,OriginalVideoHeight; int DisplayVideoWidth,DisplayVideoHeight; BYTE AspectX,AspectY; OriginalVideoWidth=CoreEngine.GetOriginalVideoWidth(); OriginalVideoHeight=CoreEngine.GetOriginalVideoHeight(); DisplayVideoWidth=CoreEngine.GetDisplayVideoWidth(); DisplayVideoHeight=CoreEngine.GetDisplayVideoHeight(); if (!CoreEngine.m_DtvEngine.m_MediaViewer.GetEffectiveAspectRatio(&AspectX,&AspectY)) AspectX=AspectY=0; if (OriginalVideoWidth==m_OriginalVideoWidth && OriginalVideoHeight==m_OriginalVideoHeight && DisplayVideoWidth==m_DisplayVideoWidth && DisplayVideoHeight==m_DisplayVideoHeight && AspectX==m_AspectX && AspectY==m_AspectY) return false; m_OriginalVideoWidth=OriginalVideoWidth; m_OriginalVideoHeight=OriginalVideoHeight; m_DisplayVideoWidth=DisplayVideoWidth; m_DisplayVideoHeight=DisplayVideoHeight; m_AspectX=AspectX; m_AspectY=AspectY; return true; }
bool CVideoDecoderOptions::ReadSettings(CSettings &Settings) { CMediaViewer &MediaViewer = GetAppClass().CoreEngine.m_DtvEngine.m_MediaViewer; VideoDecoderSettings DecoderSettings; int Value; MediaViewer.GetVideoDecoderSettings(&DecoderSettings); Settings.Read(TEXT("EnableDeinterlace"), &DecoderSettings.bEnableDeinterlace); if (Settings.Read(TEXT("DeinterlaceMethod"), &Value)) DecoderSettings.DeinterlaceMethod = static_cast<TVTVIDEODEC_DeinterlaceMethod>(Value); Settings.Read(TEXT("AdaptProgressive"), &DecoderSettings.bAdaptProgressive); Settings.Read(TEXT("AdaptTelecine"), &DecoderSettings.bAdaptTelecine); Settings.Read(TEXT("SetInterlacedFlag"), &DecoderSettings.bSetInterlacedFlag); Settings.Read(TEXT("Brightness"), &DecoderSettings.Brightness); Settings.Read(TEXT("Contrast"), &DecoderSettings.Contrast); Settings.Read(TEXT("Hue"), &DecoderSettings.Hue); Settings.Read(TEXT("Saturation"), &DecoderSettings.Saturation); Settings.Read(TEXT("NumThreads"), &DecoderSettings.NumThreads); Settings.Read(TEXT("EnableDXVA2"), &DecoderSettings.bEnableDXVA2); MediaViewer.SetVideoDecoderSettings(DecoderSettings); return true; }
bool CInformationPanel::CItem::GetButtonTipText(int Button,LPTSTR pszText,int MaxText) const { if (Button==0 && HasProperty()) { return GetAppClass().CommandList.GetCommandNameByID(m_PropertyID,pszText,MaxText)>0; } return false; }
void CControllerManager::SetButtonCommand(HWND hwndList,int Index,int Command) { int CurController=(int)DlgComboBox_GetCurSel(m_hDlg,IDC_CONTROLLER_LIST); if (CurController<0) return; LV_ITEM lvi; TCHAR szText[CCommandList::MAX_COMMAND_NAME]; lvi.mask=LVIF_PARAM; lvi.iItem=Index; lvi.iSubItem=0; lvi.lParam=Command; ListView_SetItem(hwndList,&lvi); lvi.mask=LVIF_TEXT; lvi.iSubItem=1; if (Command>0) { GetAppClass().CommandList.GetCommandNameByID(Command,szText,lengthof(szText)); lvi.pszText=szText; } else { lvi.pszText=TEXT(""); } ListView_SetItem(hwndList,&lvi); m_CurSettingsList[CurController].AssignList[Index]=(WORD)Command; }
bool CControllerManager::SaveControllerSettings(LPCTSTR pszName) const { int Index=FindController(pszName); if (Index<0) return false; const ControllerInfo &Info=m_ControllerList[Index]; if (!Info.fSettingsChanged) return true; CSettings Settings; TCHAR szFileName[MAX_PATH]; if (!Info.pController->GetIniFileName(szFileName,lengthof(szFileName))) return false; if (Settings.Open(szFileName,CSettings::OPEN_WRITE) && Settings.SetSection(Info.pController->GetIniFileSection())) { const int NumButtons=Info.pController->NumButtons(); const CCommandList &CommandList=GetAppClass().CommandList; for (int i=0;i<NumButtons;i++) { TCHAR szName[64]; LPCTSTR pszText=NULL; ::wsprintf(szName,TEXT("Button%d_Command"),i); if (Info.Settings.AssignList[i]!=0) pszText=CommandList.GetCommandTextByID(Info.Settings.AssignList[i]); Settings.Write(szName,pszText!=NULL?pszText:TEXT("")); } if (!Info.pController->IsActiveOnly()) Settings.Write(TEXT("ActiveOnly"),Info.Settings.fActiveOnly); } return true; }
bool CEpgOptions::SaveEpgFile(CEpgProgramList *pEpgList) { bool fOK=true; if (m_fSaveEpgFile) { TCHAR szFileName[MAX_PATH]; if (!pEpgList->IsUpdated()) return true; if (!GetAbsolutePath(m_szEpgFileName,szFileName,lengthof(szFileName))) return false; if (pEpgList->NumServices()>0) { GetAppClass().AddLog(TEXT("EPG データを \"%s\" に保存します..."),szFileName); fOK=pEpgList->SaveToFile(szFileName); if (!fOK) ::DeleteFile(szFileName); } else { /* fOK=::DeleteFile(szFileName) || ::GetLastError()==ERROR_FILE_NOT_FOUND; */ } } return fOK; }
bool CInformationPanel::CItem::OnButtonPushed(int Button) { if (Button==0 && HasProperty()) { GetAppClass().UICore.DoCommand(m_PropertyID); return true; } return false; }
bool CController::GetIniFileName(LPTSTR pszFileName,int MaxLength) const { LPCTSTR pszIniFileName=GetAppClass().GetIniFileName(); if (::lstrlen(pszIniFileName)>=MaxLength) return false; ::lstrcpy(pszFileName,pszIniFileName); return true; }
bool CViewOptions::Apply(DWORD Flags) { CAppMain &App=GetAppClass(); if ((Flags&UPDATE_LOGO)!=0) { App.UICore.SetLogo(m_fShowLogo?m_szLogoFileName:NULL); } return true; }
bool CEpgOptions::ReadSettings(CSettings &Settings) { Settings.Read(TEXT("SaveEpgData"),&m_fSaveEpgFile); Settings.Read(TEXT("EpgDataFileName"),m_szEpgFileName,lengthof(m_szEpgFileName)); Settings.Read(TEXT("EpgUpdateWhenStandby"),&m_fUpdateWhenStandby); Settings.Read(TEXT("EpgUpdateBSExtended"),&m_fUpdateBSExtended); Settings.Read(TEXT("EpgUpdateCSExtended"),&m_fUpdateCSExtended); Settings.Read(TEXT("UseEpgData"),&m_fUseEDCBData); Settings.Read(TEXT("EpgDataFolder"),m_szEDCBDataFolder,lengthof(m_szEDCBDataFolder)); int Value; if (Settings.Read(TEXT("EpgTimeMode"),&Value) && Value>=EPGTIME_FIRST && Value<=EPGTIME_LAST) m_EpgTimeMode=(EpgTimeMode)Value; Settings.Read(TEXT("SaveLogoData"),&m_fSaveLogoFile); Settings.Read(TEXT("LogoDataFileName"),m_szLogoFileName,lengthof(m_szLogoFileName)); CLogoManager &LogoManager=GetAppClass().LogoManager; bool fSaveLogo; if (Settings.Read(TEXT("SaveRawLogo"),&fSaveLogo)) LogoManager.SetSaveLogo(fSaveLogo); if (Settings.Read(TEXT("SaveBmpLogo"),&fSaveLogo)) LogoManager.SetSaveLogoBmp(fSaveLogo); TCHAR szLogoDir[MAX_PATH]; if (Settings.Read(TEXT("LogoDirectory"),szLogoDir,MAX_PATH)) { LogoManager.SetLogoDirectory(szLogoDir); } else { // TVLogoMark のロゴがあれば利用する GetAppClass().GetAppDirectory(szLogoDir); ::PathAppend(szLogoDir,TEXT("Plugins\\Logo")); if (::PathIsDirectory(szLogoDir)) LogoManager.SetLogoDirectory(TEXT(".\\Plugins\\Logo")); } bool f; if (TVTest::StyleUtil::ReadFontSettings(Settings,TEXT("EventInfoFont"),&m_EventInfoFont,false,&f)) { if (!f) m_fChanged=true; } return true; }
void CCaptureWindow::CPreviewEventHandler::OnRButtonDown(int x,int y) { CPopupMenu Menu(GetAppClass().GetResourceInstance(),IDM_CAPTUREPREVIEW); Menu.EnableItem(CM_COPY,m_pCaptureWindow->HasImage()); Menu.EnableItem(CM_SAVEIMAGE,m_pCaptureWindow->HasImage()); Menu.CheckItem(CM_CAPTURESTATUSBAR,m_pCaptureWindow->IsStatusBarVisible()); POINT pt= {x,y}; ::ClientToScreen(m_pCapturePreview->GetHandle(),&pt); Menu.Show(m_pCaptureWindow->GetHandle(),&pt,TPM_RIGHTBUTTON); }
bool CTaskbarSharedProperties::Open(LPCTSTR pszName,const CRecentChannelList *pRecentChannels) { bool fExists; if (!m_SharedMemory.Create(pszName, sizeof(SharedInfoHeader)+sizeof(RecentChannelInfo)*MAX_RECENT_CHANNELS, &fExists)) { GetAppClass().AddLog(CLogItem::TYPE_ERROR, TEXT("共有メモリ(%s)を作成できません。"), pszName); return false; } m_pHeader=static_cast<SharedInfoHeader*>(m_SharedMemory.Map()); if (m_pHeader==nullptr) { m_SharedMemory.Close(); return false; } if (!fExists) { m_pHeader->Size=sizeof(SharedInfoHeader); m_pHeader->Version=SharedInfoHeader::VERSION_CURRENT; m_pHeader->MaxRecentChannels=MAX_RECENT_CHANNELS; if (pRecentChannels!=nullptr) { DWORD ChannelCount=pRecentChannels->NumChannels(); if (ChannelCount>MAX_RECENT_CHANNELS) ChannelCount=MAX_RECENT_CHANNELS; RecentChannelInfo *pChannelList=pointer_cast<RecentChannelInfo*>(m_pHeader+1); for (DWORD i=0;i<ChannelCount;i++) { TunerChannelInfoToRecentChannelInfo( pRecentChannels->GetChannelInfo(ChannelCount-1-i), pChannelList+i); } m_pHeader->RecentChannelCount=ChannelCount; } else { m_pHeader->RecentChannelCount=0; } } else { if (!ValidateHeader(m_pHeader)) { Close(); return false; } } m_SharedMemory.Unlock(); return true; }
bool CGeneralOptions::WriteSettings(CSettings &Settings) { Settings.Write(TEXT("DriverDirectory"),m_BonDriverDirectory); Settings.Write(TEXT("DefaultDriverType"),(int)m_DefaultDriverType); Settings.Write(TEXT("DefaultDriver"),m_DefaultBonDriverName); Settings.Write(TEXT("Driver"),GetAppClass().CoreEngine.GetDriverFileName()); Settings.Write(TEXT("Resident"),m_fResident); Settings.Write(TEXT("KeepSingleTask"),m_fKeepSingleTask); Settings.Write(TEXT("StandaloneProgramGuide"),m_fStandaloneProgramGuide); Settings.Write(TEXT("Enable1SegFallback"),m_fEnable1SegFallback); return true; }
bool CInformationPanel::CMediaBitRateItem::Update() { const CTsPacketCounter &PacketCounter=GetAppClass().CoreEngine.m_DtvEngine.m_TsPacketCounter; const DWORD VideoBitRate=PacketCounter.GetVideoBitRate(); const DWORD AudioBitRate=PacketCounter.GetAudioBitRate(); if (VideoBitRate==m_VideoBitRate && AudioBitRate==m_AudioBitRate) return false; m_VideoBitRate=VideoBitRate; m_AudioBitRate=AudioBitRate; return true; }
bool CGeneralOptions::Apply(DWORD Flags) { CAppMain &App=GetAppClass(); if ((Flags & UPDATE_RESIDENT)!=0) { App.UICore.SetResident(m_fResident); } if ((Flags & UPDATE_1SEGFALLBACK)!=0) { App.CoreEngine.m_DtvEngine.m_TsPacketParser.EnablePATGeneration(m_fEnable1SegFallback); } return true; }
const CEventInfoData *CChannelMenuItem::GetEventInfo(CEpgProgramList *pProgramList, int Index,const SYSTEMTIME *pCurTime) { if (Index<0 || Index>=lengthof(m_EventList) || (Index>0 && !m_EventList[Index-1].fValid) || m_pChannelInfo->GetServiceID()==0) return NULL; if (!m_EventList[Index].fValid) { SYSTEMTIME st; if (Index==0) { if (pCurTime!=NULL) st=*pCurTime; else GetCurrentEpgTime(&st); } else { if (!m_EventList[Index-1].EventInfo.GetEndTime(&st)) return NULL; } bool fCurrent=false; if (pCurTime==NULL && Index<=1) { CAppMain &App=GetAppClass(); CAppCore::StreamIDInfo StreamID; if (App.Core.GetCurrentStreamIDInfo(&StreamID) && m_pChannelInfo->GetNetworkID()==StreamID.NetworkID && m_pChannelInfo->GetTransportStreamID()==StreamID.TransportStreamID) { if (!App.CoreEngine.GetCurrentEventInfo(&m_EventList[Index].EventInfo, m_pChannelInfo->GetServiceID(), Index>0)) return NULL; fCurrent=true; } } if (!fCurrent) { if (!pProgramList->GetEventInfo(m_pChannelInfo->GetNetworkID(), m_pChannelInfo->GetTransportStreamID(), m_pChannelInfo->GetServiceID(), &st,&m_EventList[Index].EventInfo)) return NULL; } m_EventList[Index].fValid=true; } return &m_EventList[Index].EventInfo; }
int CAudioManager::GetDefaultAudio(AudioSelectInfo *pSelectInfo) const { CBlockLock Lock(&m_Lock); if (m_AudioList.empty()) return -1; const CAudioOptions &AudioOptions=GetAppClass().AudioOptions; bool fDefault=true; if (AudioOptions.GetEnableLanguagePriority()) { const CAudioOptions::AudioLanguageList &PriorityList=AudioOptions.GetLanguagePriority(); if (!PriorityList.empty()) { for (auto itPriority=PriorityList.begin();itPriority!=PriorityList.end();++itPriority) { for (auto itAudio=m_AudioList.begin();itAudio!=m_AudioList.end();++itAudio) { if (itAudio->Language==itPriority->Language && itAudio->DualMono!=DUALMONO_BOTH) { if (!itPriority->fSub || itAudio!=m_AudioList.begin() || itAudio->DualMono==CAudioManager::DUALMONO_SUB) { if (pSelectInfo!=nullptr) { pSelectInfo->ComponentTag=itAudio->ComponentTag; pSelectInfo->DualMono=itAudio->DualMono; } return (int)std::distance(m_AudioList.begin(),itAudio); } } } } } } if (pSelectInfo!=nullptr) { const AudioInfo &Info=m_AudioList.front(); pSelectInfo->ComponentTag=Info.ComponentTag; if (Info.IsDualMono()) { if (m_SelectedAudio.DualMono!=DUALMONO_INVALID) pSelectInfo->DualMono=m_SelectedAudio.DualMono; else pSelectInfo->DualMono=DUALMONO_MAIN; } else { pSelectInfo->DualMono=DUALMONO_INVALID; } } return 0; }
void CMenuOptions::GetItemText(int ID,LPTSTR pszText,int MaxLength) const { if (ID==MENU_ID_SEPARATOR) { ::lstrcpyn(pszText,TEXT("�@<���>"),MaxLength); } else { for (int i=0;i<lengthof(m_DefaultMenuItemList);i++) { if (m_DefaultMenuItemList[i].ID==ID) { ::LoadString(GetAppClass().GetResourceInstance(), m_DefaultMenuItemList[i].TextID, pszText,MaxLength); break; } } } }
bool CInformationPanel::CSignalLevelItem::Update() { const CCoreEngine &CoreEngine=GetAppClass().CoreEngine; const float SignalLevel= m_fShowSignalLevel ? CoreEngine.GetSignalLevel() : 0.0f; const DWORD BitRate=CoreEngine.GetBitRate(); if (SignalLevel==m_SignalLevel && BitRate==m_BitRate) return false; m_SignalLevel=SignalLevel; m_BitRate=BitRate; return true; }
void CInformationPanel::CSignalLevelItem::Draw(HDC hdc,const RECT &Rect) { const CCoreEngine &CoreEngine=GetAppClass().CoreEngine; TCHAR szText[64]; int Length=0; if (m_fShowSignalLevel) { TCHAR szSignalLevel[32]; CoreEngine.GetSignalLevelText(m_SignalLevel,szSignalLevel,lengthof(szSignalLevel)); Length=StdUtil::snprintf(szText,lengthof(szText),TEXT("%s / "),szSignalLevel); } CoreEngine.GetBitRateText(m_BitRate,szText+Length,lengthof(szText)-Length); DrawItem(hdc,Rect,szText); }
bool CEpgOptions::LoadEpgFile(CEpgProgramList *pEpgList) { bool fOK=true; if (m_fSaveEpgFile) { TCHAR szFileName[MAX_PATH]; if (!GetAbsolutePath(m_szEpgFileName,szFileName,lengthof(szFileName))) return false; if (::PathFileExists(szFileName)) { GetAppClass().AddLog(TEXT("EPG データを \"%s\" から読み込みます..."),szFileName); fOK=pEpgList->LoadFromFile(szFileName); } } return fOK; }
bool CInformationPanel::CVideoRendererItem::Update() { TCHAR szRenderer[256]; if (GetAppClass().CoreEngine.m_DtvEngine.m_MediaViewer.GetVideoRendererName( szRenderer,lengthof(szRenderer))) { if (m_VideoRendererName.compare(szRenderer)==0) return false; m_VideoRendererName=szRenderer; } else { if (m_VideoRendererName.empty()) return false; m_VideoRendererName.clear(); } return true; }
bool CInformationPanel::CAudioDeviceItem::Update() { TCHAR szDevice[256]; if (GetAppClass().CoreEngine.m_DtvEngine.m_MediaViewer.GetAudioRendererName( szDevice,lengthof(szDevice))) { if (m_AudioDeviceName.compare(szDevice)==0) return false; m_AudioDeviceName=szDevice; } else { if (m_AudioDeviceName.empty()) return false; m_AudioDeviceName.clear(); } return true; }
bool CInformationPanel::CErrorItem::Update() { const CCoreEngine &CoreEngine=GetAppClass().CoreEngine; const ULONGLONG ContinuityErrorPacketCount=CoreEngine.GetContinuityErrorPacketCount(); const ULONGLONG ErrorPacketCount=CoreEngine.GetErrorPacketCount(); const ULONGLONG ScramblePacketCount=CoreEngine.GetScramblePacketCount(); if (ContinuityErrorPacketCount==m_ContinuityErrorPacketCount && ErrorPacketCount==m_ErrorPacketCount && ScramblePacketCount==m_ScramblePacketCount) return false; m_ContinuityErrorPacketCount=ContinuityErrorPacketCount; m_ErrorPacketCount=ErrorPacketCount; m_ScramblePacketCount=ScramblePacketCount; return true; }