Changeset 503 for trunk/DirectShowSpy/FilterGraphList.h
- Timestamp:
- Sep 4, 2015, 11:47:45 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DirectShowSpy/FilterGraphList.h
r448 r503 23 23 #include "FilterGraphHelper.h" 24 24 #include "AboutDialog.h" 25 #include "FilterGraphTable.h" 25 26 26 27 #pragma comment(lib, "psapi.lib") … … 248 249 { 249 250 return ((CListPropertyPage*) nParameter)->SortGraphListViewItems(nItemParameter1, nItemParameter2); 251 } 252 static BOOL FindItem(CRoMapT<CStringW, CItem>& ItemMap, const CFilterGraphTable::CItem& TableItem) 253 { 254 for(auto&& MapItem: ItemMap.GetValues()) 255 { 256 if(MapItem.m_nProcessIdentifier != TableItem.m_nProcessIdentifier) 257 continue; 258 if(abs((LONG_PTR) MapItem.m_nInstance - (LONG_PTR) TableItem.m_nInstance) > 32) //if(MapItem.m_nInstance != TableItem.m_nInstance) 259 continue; 260 return TRUE; 261 } 262 return FALSE; 250 263 } 251 264 static VOID EnumerateItems(IRunningObjectTable* pRunningObjectTable, CRoMapT<CStringW, CItem>& ItemMap, const LONG* pnProcessIdentifier = NULL) … … 294 307 } 295 308 } 309 #pragma region Filter Graph Table 310 _ATLTRY 311 { 312 CLocalObjectPtr<CFilterGraphTable> pFilterGraphTable; 313 CFilterGraphTable::CItemArray ItemArray; 314 if(pFilterGraphTable->GetItems(ItemArray)) 315 { 316 for(auto&& TableItem: ItemArray) 317 { 318 if(FindItem(ItemMap, TableItem)) 319 continue; 320 if(pnProcessIdentifier && TableItem.m_nProcessIdentifier != (DWORD) *pnProcessIdentifier) 321 continue; // Skip 322 const CStringW sDisplayName = AtlFormatStringW(L"!FilterGraph %p pid %08x; FGT", TableItem.m_nInstance, TableItem.m_nProcessIdentifier); 323 CItem Item; 324 Item.m_sDisplayName = sDisplayName; 325 Item.m_nInstance = TableItem.m_nInstance; 326 Item.m_nProcessIdentifier = TableItem.m_nProcessIdentifier; 327 Item.m_pFilterGraphUnknown = TableItem.m_pFilterGraph; 328 Item.m_pFilterGraph = TableItem.m_pFilterGraph; 329 SYSTEMTIME Time; 330 _W(FileTimeToSystemTime(&reinterpret_cast<const FILETIME&>(TableItem.m_nTime), &Time)); 331 Item.m_sTime = AtlFormatString(_T("%02d:%02d:%02d"), Time.wHour, Time.wMinute, Time.wSecond); 332 _W(ItemMap.SetAt(sDisplayName, Item) >= 0); 333 } 334 } 335 } 336 _ATLCATCHALL() 337 { 338 _Z_EXCEPTION(); 339 } 340 #pragma endregion 296 341 } 297 342 _ATLCATCHALL()
Note: See TracChangeset
for help on using the changeset viewer.