Changeset 207 for trunk/DirectShowSpy
- Timestamp:
- Aug 9, 2013, 12:23:17 AM (11 years ago)
- Location:
- trunk/DirectShowSpy
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DirectShowSpy/DirectShowSpy.rc
r202 r207 60 60 61 61 VS_VERSION_INFO VERSIONINFO 62 FILEVERSION 1, 0, 0, 98 062 FILEVERSION 1, 0, 0, 988 63 63 PRODUCTVERSION 1,0,0,1 64 64 FILEFLAGSMASK 0x3fL … … 79 79 VALUE "CompanyName", "Roman Ryltsov" 80 80 VALUE "FileDescription", "Alax.Info DirectShow Spy Module" 81 VALUE "FileVersion", "1, 0, 0, 98 0\0"81 VALUE "FileVersion", "1, 0, 0, 988\0" 82 82 VALUE "InternalName", "DirectShowSpy.dll" 83 83 VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2013" -
trunk/DirectShowSpy/FilterGraphHelper.h
r202 r207 121 121 } 122 122 #define I FormatIdentifier 123 static CString FormatPhysicalConnectorType(PhysicalConnectorType Value) 124 { 125 struct 126 { 127 PhysicalConnectorType Value; 128 LPCSTR pszName; 129 } g_pMap[] = 130 { 131 #define A(x) { x, #x }, 132 A(PhysConn_Video_Tuner) 133 A(PhysConn_Video_Composite) 134 A(PhysConn_Video_SVideo) 135 A(PhysConn_Video_RGB) 136 A(PhysConn_Video_YRYBY) 137 A(PhysConn_Video_SerialDigital) 138 A(PhysConn_Video_ParallelDigital) 139 A(PhysConn_Video_SCSI) 140 A(PhysConn_Video_AUX) 141 A(PhysConn_Video_1394) 142 A(PhysConn_Video_USB) 143 A(PhysConn_Video_VideoDecoder) 144 A(PhysConn_Video_VideoEncoder) 145 A(PhysConn_Video_SCART) 146 A(PhysConn_Video_Black) 147 A(PhysConn_Audio_Tuner) 148 A(PhysConn_Audio_Line) 149 A(PhysConn_Audio_Mic) 150 A(PhysConn_Audio_AESDigital) 151 A(PhysConn_Audio_SPDIFDigital) 152 A(PhysConn_Audio_SCSI) 153 A(PhysConn_Audio_AUX) 154 A(PhysConn_Audio_1394) 155 A(PhysConn_Audio_USB) 156 A(PhysConn_Audio_AudioDecoder) 157 #undef A 158 }; 159 for(SIZE_T nIndex = 0; nIndex < DIM(g_pMap); nIndex++) 160 if(g_pMap[nIndex].Value == Value) 161 return CString(g_pMap[nIndex].pszName); 162 return AtlFormatString(_T("0x%04X"), Value); 163 } 123 164 static CString FormatPins(_FilterGraphHelper::CPinArray& PinArray) 124 165 { … … 231 272 const CComQIPtr<IFileSourceFilter> pFileSourceFilter = pBaseFilter; 232 273 if(pFileSourceFilter) 233 { 234 CComHeapPtr<OLECHAR> pszFileName; 235 CMediaType pMediaType; 236 pMediaType.Allocate(MEDIATYPE_NULL, MEDIASUBTYPE_NULL); 237 const HRESULT nGetCurFileResult = pFileSourceFilter->GetCurFile(&pszFileName, pMediaType); 238 _Z45_DSHRESULT(nGetCurFileResult); 239 if(SUCCEEDED(nGetCurFileResult)) 240 sText += AtlFormatString(_T(" * ") _T("File Source: %s") _T("\r\n"), I(pszFileName)); 241 } 274 _ATLTRY 275 { 276 CComHeapPtr<OLECHAR> pszFileName; 277 CMediaType pMediaType; 278 pMediaType.Allocate(MEDIATYPE_NULL, MEDIASUBTYPE_NULL); 279 const HRESULT nGetCurFileResult = pFileSourceFilter->GetCurFile(&pszFileName, pMediaType); 280 _Z45_DSHRESULT(nGetCurFileResult); 281 if(SUCCEEDED(nGetCurFileResult)) 282 sText += AtlFormatString(_T(" * ") _T("File Source: %s") _T("\r\n"), I(pszFileName)); 283 } 284 _ATLCATCHALL() 285 { 286 _Z_EXCEPTION(); 287 } 242 288 #pragma endregion 243 289 #pragma region IFileSinkFilter 244 290 const CComQIPtr<IFileSinkFilter> pFileSinkFilter = pBaseFilter; 245 291 if(pFileSinkFilter) 246 { 247 CComHeapPtr<OLECHAR> pszFileName; 248 CMediaType pMediaType; 249 pMediaType.Allocate(MEDIATYPE_NULL, MEDIASUBTYPE_NULL); 250 const HRESULT nGetCurFileResult = pFileSinkFilter->GetCurFile(&pszFileName, pMediaType); 251 _Z45_DSHRESULT(nGetCurFileResult); 252 if(SUCCEEDED(nGetCurFileResult)) 253 sText += AtlFormatString(_T(" * ") _T("File Sink: %s") _T("\r\n"), I(pszFileName)); 254 } 292 _ATLTRY 293 { 294 CComHeapPtr<OLECHAR> pszFileName; 295 CMediaType pMediaType; 296 pMediaType.Allocate(MEDIATYPE_NULL, MEDIASUBTYPE_NULL); 297 const HRESULT nGetCurFileResult = pFileSinkFilter->GetCurFile(&pszFileName, pMediaType); 298 _Z45_DSHRESULT(nGetCurFileResult); 299 if(SUCCEEDED(nGetCurFileResult)) 300 sText += AtlFormatString(_T(" * ") _T("File Sink: %s") _T("\r\n"), I(pszFileName)); 301 } 302 _ATLCATCHALL() 303 { 304 _Z_EXCEPTION(); 305 } 306 #pragma endregion 307 #pragma region IAMCrossbar 308 const CComQIPtr<IAMCrossbar> pAmCrossbar = pBaseFilter; 309 if(pAmCrossbar) 310 _ATLTRY 311 { 312 sText += AtlFormatString(_T(" * ") _T("Crossbar:") _T("\r\n")); 313 LONG nOutputPinCount = 0, nInputPinCount = 0; 314 __C(pAmCrossbar->get_PinCounts(&nOutputPinCount, &nInputPinCount)); 315 sText += AtlFormatString(_T(" * ") _T("Pins: %s Input, %s Output") _T("\r\n"), I(nInputPinCount), I(nOutputPinCount)); 316 #pragma region Input 317 for(LONG nInputPinIndex = 0; nInputPinIndex < nInputPinCount; nInputPinIndex++) 318 _ATLTRY 319 { 320 CRoArrayT<CString> Array; 321 LONG nRelatedPinIndex = -1; 322 LONG nPhysicalType = 0; // PhysicalConnectorType 323 __C(pAmCrossbar->get_CrossbarPinInfo(TRUE, nInputPinIndex, &nRelatedPinIndex, &nPhysicalType)); 324 if(nRelatedPinIndex >= 0) 325 Array.Add(AtlFormatString(_T("Related %s"), I(nRelatedPinIndex))); 326 Array.Add(AtlFormatString(_T("Physical Type %s"), I(FormatPhysicalConnectorType((PhysicalConnectorType) nPhysicalType)))); 327 sText += AtlFormatString(_T(" * ") _T("Input Pin %s: %s") _T("\r\n"), I(nInputPinIndex), _StringHelper::Join(Array, _T("; "))); 328 } 329 _ATLCATCHALL() 330 { 331 _Z_EXCEPTION(); 332 } 333 #pragma endregion 334 #pragma region Output 335 for(LONG nOutputPinIndex = 0; nOutputPinIndex < nOutputPinCount; nOutputPinIndex++) 336 _ATLTRY 337 { 338 CRoArrayT<CString> Array; 339 LONG nRelatedPinIndex = -1; 340 LONG nPhysicalType = 0; // PhysicalConnectorType 341 __C(pAmCrossbar->get_CrossbarPinInfo(FALSE, nOutputPinIndex, &nRelatedPinIndex, &nPhysicalType)); 342 if(nRelatedPinIndex >= 0) 343 Array.Add(AtlFormatString(_T("Related %s"), I(nRelatedPinIndex))); 344 if(nPhysicalType > 0) 345 Array.Add(AtlFormatString(_T("Physical Type %s"), I(FormatPhysicalConnectorType((PhysicalConnectorType) nPhysicalType)))); 346 LONG nRoutedInputPinIndex = -1; 347 const HRESULT nGetIsRoutedToResult = pAmCrossbar->get_IsRoutedTo(nOutputPinIndex, &nRoutedInputPinIndex); 348 _A(nGetIsRoutedToResult == S_OK || nRoutedInputPinIndex == -1); 349 if(nRoutedInputPinIndex >= 0) 350 Array.Add(AtlFormatString(_T("Routed to Input Pin %s"), I(nRoutedInputPinIndex))); 351 CRoArrayT<CString> PinArray; 352 for(LONG nInputPinIndex = 0; nInputPinIndex < nInputPinCount; nInputPinIndex++) 353 { 354 const HRESULT nCanRouteResult = pAmCrossbar->CanRoute(nOutputPinIndex, nInputPinIndex); 355 if(nCanRouteResult == S_OK) 356 PinArray.Add(I(nInputPinIndex)); 357 } 358 if(!PinArray.IsEmpty()) 359 Array.Add(AtlFormatString(_T("Routeable to Input Pins %s"), _StringHelper::Join(PinArray, _T(", ")))); 360 sText += AtlFormatString(_T(" * ") _T("Output Pin %s: %s") _T("\r\n"), I(nOutputPinIndex), _StringHelper::Join(Array, _T("; "))); 361 } 362 _ATLCATCHALL() 363 { 364 _Z_EXCEPTION(); 365 } 366 #pragma endregion 367 } 368 _ATLCATCHALL() 369 { 370 _Z_EXCEPTION(); 371 } 255 372 #pragma endregion 256 373 }
Note: See TracChangeset
for help on using the changeset viewer.