Changeset 333 for trunk/DirectShowSpy/RunPropertyBag.h
- Timestamp:
- Oct 5, 2014, 1:57:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DirectShowSpy/RunPropertyBag.h
r312 r333 282 282 __if_exists(ISpy) 283 283 { 284 static CString GetPropertyBagText(IRunPropertyBagAware* pRunPropertyBagAware, ISpy* pSpy = NULL) 285 { 286 if(pSpy) 287 { 288 CComVariantArray vValue; 289 __C(pSpy->ReadRunPropertyBag(pRunPropertyBagAware, ATL_VARIANT_TRUE, &vValue)); 290 return GetPropertyBagText(vValue); 291 } 292 if(!pRunPropertyBagAware) 293 return _T(""); 294 return GetPropertyBagText(ReadRunPropertyBag(pRunPropertyBagAware)); 295 } 284 296 static CString GetPropertyBagText(IUnknown* pBaseFilterUnknown, ISpy* pSpy = NULL) 285 297 { … … 288 300 if(!pEffectiveSpy && pRunPropertyBagAware) 289 301 pEffectiveSpy = _FilterGraphHelper::GetFilterGraph(CComQIPtr<IBaseFilter>(pBaseFilterUnknown)); 290 if(pEffectiveSpy) 291 { 292 CComVariantArray vValue; 293 __C(pEffectiveSpy->ReadRunPropertyBag(pBaseFilterUnknown, ATL_VARIANT_TRUE, &vValue)); 294 return GetPropertyBagText(vValue); 295 } 296 if(!pRunPropertyBagAware) 297 return _T(""); 298 return GetPropertyBagText(ReadRunPropertyBag(pRunPropertyBagAware)); 302 return GetPropertyBagText(pRunPropertyBagAware, pEffectiveSpy); 303 } 304 static CString GetPropertyBagText(IFilterGraph* pFilterGraph, ISpy* pSpy = NULL) 305 { 306 const CComQIPtr<IServiceProvider> pServiceProvider = pFilterGraph; 307 if(pServiceProvider) 308 { 309 CComPtr<IRunPropertyBagAware> pRunPropertyBagAware; 310 pServiceProvider->QueryService<IRunPropertyBagAware>(__uuidof(IRunPropertyBagAware), &pRunPropertyBagAware); 311 if(pRunPropertyBagAware) 312 return GetPropertyBagText(pRunPropertyBagAware, pSpy); 313 } 314 return _T(""); 299 315 } 300 316 }
Note: See TracChangeset
for help on using the changeset viewer.