Changeset 840
- Timestamp:
- Apr 1, 2018, 4:23:36 AM (6 years ago)
- Location:
- trunk/DirectShowSpy
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DirectShowSpy/DirectShowSpy.sln
r831 r840 1 1 2 2 Microsoft Visual Studio Solution File, Format Version 12.00 3 # Visual Studio 20174 VisualStudioVersion = 1 2.0.40629.03 # Visual Studio 15 4 VisualStudioVersion = 15.0.27428.2015 5 5 MinimumVisualStudioVersion = 10.0.40219.1 6 6 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DirectShowSpy", "DirectShowSpy.vcxproj", "{1A5DA4E5-ED09-476A-9A42-538D0DDA3FB9}" … … 42 42 {02A667BA-1492-4BDD-88A4-819AB1CA351B}.Debug|Win32.Build.0 = Debug|Win32 43 43 {02A667BA-1492-4BDD-88A4-819AB1CA351B}.Debug|x64.ActiveCfg = Debug|x64 44 {02A667BA-1492-4BDD-88A4-819AB1CA351B}.Debug|x64.Build.0 = Debug|x64 44 45 {02A667BA-1492-4BDD-88A4-819AB1CA351B}.Release Trace|Win32.ActiveCfg = Release|Win32 45 46 {02A667BA-1492-4BDD-88A4-819AB1CA351B}.Release Trace|Win32.Build.0 = Release|Win32 … … 54 55 HideSolutionNode = FALSE 55 56 EndGlobalSection 57 GlobalSection(ExtensibilityGlobals) = postSolution 58 SolutionGuid = {EE6AC9B4-2FBF-422B-993B-A4F343656F9B} 59 EndGlobalSection 56 60 EndGlobal -
trunk/DirectShowSpy/FilterGraphHelper.h
r624 r840 3079 3079 sText += AtlFormatString(_T(" * ") _T("As `VIDEOINFOHEADER`:") _T("\r\n")); 3080 3080 const VIDEOINFOHEADER* pVideoInfoHeader = (const VIDEOINFOHEADER*) pMediaType->pbFormat; 3081 #define J(x) I(pVideoInfoHeader->x) 3082 #define K1(x) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), J(x)) 3083 sText += AtlFormatString(_T(" * ") _T("`rcSource`: (%s, %s) - (%s, %s)") _T("\r\n"), J(rcSource.left), J(rcSource.top), J(rcSource.right), J(rcSource.bottom)); 3084 sText += AtlFormatString(_T(" * ") _T("`rcTarget`: (%s, %s) - (%s, %s)") _T("\r\n"), J(rcTarget.left), J(rcTarget.top), J(rcTarget.right), J(rcTarget.bottom)); 3085 K1(dwBitRate); 3086 K1(dwBitErrorRate); 3087 sText += AtlFormatString(_T(" * ") _T("`AvgTimePerFrame`: %s units") _T("\r\n"), I(_FilterGraphHelper::FormatReferenceTime(pVideoInfoHeader->AvgTimePerFrame))); 3088 K1(bmiHeader.biSize); 3089 K1(bmiHeader.biWidth); 3090 K1(bmiHeader.biHeight); 3091 K1(bmiHeader.biPlanes); 3092 K1(bmiHeader.biBitCount); 3093 sText += AtlFormatString(_T(" * ") _T("`bmiHeader.biCompression`: %s") _T("\r\n"), I(_FilterGraphHelper::GetFourccCodeString(pVideoInfoHeader->bmiHeader.biCompression))); 3094 K1(bmiHeader.biSizeImage); 3095 K1(bmiHeader.biXPelsPerMeter); 3096 K1(bmiHeader.biYPelsPerMeter); 3097 K1(bmiHeader.biClrUsed); 3098 K1(bmiHeader.biClrImportant); 3099 #undef J 3100 #undef K1 3101 nExtraDataSize = pMediaType->cbFormat - sizeof *pVideoInfoHeader; 3081 if(pVideoInfoHeader && pMediaType->cbFormat >= sizeof *pVideoInfoHeader) 3082 { 3083 #define J(x) I(pVideoInfoHeader->x) 3084 #define K1(x) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), J(x)) 3085 sText += AtlFormatString(_T(" * ") _T("`rcSource`: (%s, %s) - (%s, %s)") _T("\r\n"), J(rcSource.left), J(rcSource.top), J(rcSource.right), J(rcSource.bottom)); 3086 sText += AtlFormatString(_T(" * ") _T("`rcTarget`: (%s, %s) - (%s, %s)") _T("\r\n"), J(rcTarget.left), J(rcTarget.top), J(rcTarget.right), J(rcTarget.bottom)); 3087 K1(dwBitRate); 3088 K1(dwBitErrorRate); 3089 sText += AtlFormatString(_T(" * ") _T("`AvgTimePerFrame`: %s units") _T("\r\n"), I(_FilterGraphHelper::FormatReferenceTime(pVideoInfoHeader->AvgTimePerFrame))); 3090 K1(bmiHeader.biSize); 3091 K1(bmiHeader.biWidth); 3092 K1(bmiHeader.biHeight); 3093 K1(bmiHeader.biPlanes); 3094 K1(bmiHeader.biBitCount); 3095 sText += AtlFormatString(_T(" * ") _T("`bmiHeader.biCompression`: %s") _T("\r\n"), I(_FilterGraphHelper::GetFourccCodeString(pVideoInfoHeader->bmiHeader.biCompression))); 3096 K1(bmiHeader.biSizeImage); 3097 K1(bmiHeader.biXPelsPerMeter); 3098 K1(bmiHeader.biYPelsPerMeter); 3099 K1(bmiHeader.biClrUsed); 3100 K1(bmiHeader.biClrImportant); 3101 #undef J 3102 #undef K1 3103 nExtraDataSize = pMediaType->cbFormat - sizeof *pVideoInfoHeader; 3104 } 3102 3105 } else 3103 3106 #pragma endregion … … 3107 3110 sText += AtlFormatString(_T(" * ") _T("As `VIDEOINFOHEADER2`:") _T("\r\n")); 3108 3111 const VIDEOINFOHEADER2* pVideoInfoHeader2 = (const VIDEOINFOHEADER2*) pMediaType->pbFormat; 3109 #define J(x) I(pVideoInfoHeader2->x) 3110 #define K1(x) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), J(x)) 3111 #define K2(x, y) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), I(pVideoInfoHeader2->x, y)) 3112 sText += AtlFormatString(_T(" * ") _T("rcSource: (%s, %s) - (%s, %s)") _T("\r\n"), J(rcSource.left), J(rcSource.top), J(rcSource.right), J(rcSource.bottom)); 3113 sText += AtlFormatString(_T(" * ") _T("rcTarget: (%s, %s) - (%s, %s)") _T("\r\n"), J(rcTarget.left), J(rcTarget.top), J(rcTarget.right), J(rcTarget.bottom)); 3114 K1(dwBitRate); 3115 K1(dwBitErrorRate); 3116 sText += AtlFormatString(_T(" * ") _T("`AvgTimePerFrame`: %s units") _T("\r\n"), I(_FilterGraphHelper::FormatReferenceTime(pVideoInfoHeader2->AvgTimePerFrame))); 3117 K2(dwInterlaceFlags, _T("0x%X")); 3118 K2(dwCopyProtectFlags, _T("0x%X")); 3119 K1(dwPictAspectRatioX); 3120 K1(dwPictAspectRatioY); 3121 K2(dwControlFlags, _T("0x%X")); 3122 K1(bmiHeader.biSize); 3123 K1(bmiHeader.biWidth); 3124 K1(bmiHeader.biHeight); 3125 K1(bmiHeader.biPlanes); 3126 K1(bmiHeader.biBitCount); 3127 sText += AtlFormatString(_T(" * ") _T("`bmiHeader.biCompression`: %s") _T("\r\n"), I(_FilterGraphHelper::GetFourccCodeString(pVideoInfoHeader2->bmiHeader.biCompression))); 3128 K1(bmiHeader.biSizeImage); 3129 K1(bmiHeader.biXPelsPerMeter); 3130 K1(bmiHeader.biYPelsPerMeter); 3131 K1(bmiHeader.biClrUsed); 3132 K1(bmiHeader.biClrImportant); 3133 #undef J 3134 #undef K1 3135 #undef K2 3136 nExtraDataSize = pMediaType->cbFormat - sizeof *pVideoInfoHeader2; 3137 if(nExtraDataSize) 3138 { 3139 sText += AtlFormatString(_T(" * ") _T("Extra Data: (%d bytes)") _T("\r\n"), nExtraDataSize); 3140 nExtraDataSize = 0; 3112 if(pVideoInfoHeader2 && pMediaType->cbFormat >= sizeof *pVideoInfoHeader2) 3113 { 3114 #define J(x) I(pVideoInfoHeader2->x) 3115 #define K1(x) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), J(x)) 3116 #define K2(x, y) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), I(pVideoInfoHeader2->x, y)) 3117 sText += AtlFormatString(_T(" * ") _T("rcSource: (%s, %s) - (%s, %s)") _T("\r\n"), J(rcSource.left), J(rcSource.top), J(rcSource.right), J(rcSource.bottom)); 3118 sText += AtlFormatString(_T(" * ") _T("rcTarget: (%s, %s) - (%s, %s)") _T("\r\n"), J(rcTarget.left), J(rcTarget.top), J(rcTarget.right), J(rcTarget.bottom)); 3119 K1(dwBitRate); 3120 K1(dwBitErrorRate); 3121 sText += AtlFormatString(_T(" * ") _T("`AvgTimePerFrame`: %s units") _T("\r\n"), I(_FilterGraphHelper::FormatReferenceTime(pVideoInfoHeader2->AvgTimePerFrame))); 3122 K2(dwInterlaceFlags, _T("0x%X")); 3123 K2(dwCopyProtectFlags, _T("0x%X")); 3124 K1(dwPictAspectRatioX); 3125 K1(dwPictAspectRatioY); 3126 K2(dwControlFlags, _T("0x%X")); 3127 K1(bmiHeader.biSize); 3128 K1(bmiHeader.biWidth); 3129 K1(bmiHeader.biHeight); 3130 K1(bmiHeader.biPlanes); 3131 K1(bmiHeader.biBitCount); 3132 sText += AtlFormatString(_T(" * ") _T("`bmiHeader.biCompression`: %s") _T("\r\n"), I(_FilterGraphHelper::GetFourccCodeString(pVideoInfoHeader2->bmiHeader.biCompression))); 3133 K1(bmiHeader.biSizeImage); 3134 K1(bmiHeader.biXPelsPerMeter); 3135 K1(bmiHeader.biYPelsPerMeter); 3136 K1(bmiHeader.biClrUsed); 3137 K1(bmiHeader.biClrImportant); 3138 #undef J 3139 #undef K1 3140 #undef K2 3141 nExtraDataSize = pMediaType->cbFormat - sizeof *pVideoInfoHeader2; 3142 if(nExtraDataSize) 3143 { 3144 sText += AtlFormatString(_T(" * ") _T("Extra Data: (%d bytes)") _T("\r\n"), nExtraDataSize); 3145 nExtraDataSize = 0; 3146 } 3141 3147 } 3142 3148 } else … … 3147 3153 sText += AtlFormatString(_T(" * ") _T("As `MPEG2VIDEOINFO`:") _T("\r\n")); 3148 3154 const MPEG2VIDEOINFO* pMpeg2VideoInfo = (const MPEG2VIDEOINFO*) pMediaType->pbFormat; 3149 #define J(x) I(pMpeg2VideoInfo->x) 3150 #define K1(x) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), J(x)) 3151 #define K2(x, y) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), I(pMpeg2VideoInfo->x, y)) 3152 sText += AtlFormatString(_T(" * ") _T("`hdr.rcSource`: (%s, %s) - (%s, %s)") _T("\r\n"), J(hdr.rcSource.left), J(hdr.rcSource.top), J(hdr.rcSource.right), J(hdr.rcSource.bottom)); 3153 sText += AtlFormatString(_T(" * ") _T("`hdr.rcTarget`: (%s, %s) - (%s, %s)") _T("\r\n"), J(hdr.rcTarget.left), J(hdr.rcTarget.top), J(hdr.rcTarget.right), J(hdr.rcTarget.bottom)); 3154 K1(hdr.dwBitRate); 3155 K1(hdr.dwBitErrorRate); 3156 sText += AtlFormatString(_T(" * ") _T("`hdr.AvgTimePerFrame`: %s") _T("\r\n"), I(_FilterGraphHelper::FormatReferenceTime(pMpeg2VideoInfo->hdr.AvgTimePerFrame))); 3157 K2(hdr.dwInterlaceFlags, _T("0x%X")); 3158 K2(hdr.dwCopyProtectFlags, _T("0x%X")); 3159 K1(hdr.dwPictAspectRatioX); 3160 K1(hdr.dwPictAspectRatioY); 3161 K2(hdr.dwControlFlags, _T("0x%X")); 3162 K1(hdr.bmiHeader.biSize); 3163 K1(hdr.bmiHeader.biWidth); 3164 K1(hdr.bmiHeader.biHeight); 3165 K1(hdr.bmiHeader.biPlanes); 3166 K1(hdr.bmiHeader.biBitCount); 3167 sText += AtlFormatString(_T(" * ") _T("`hdr.bmiHeader.biCompression`: %s") _T("\r\n"), I(_FilterGraphHelper::GetFourccCodeString(pMpeg2VideoInfo->hdr.bmiHeader.biCompression))); 3168 K1(hdr.bmiHeader.biSizeImage); 3169 K1(hdr.bmiHeader.biXPelsPerMeter); 3170 K1(hdr.bmiHeader.biYPelsPerMeter); 3171 K1(hdr.bmiHeader.biClrUsed); 3172 K1(hdr.bmiHeader.biClrImportant); 3173 K2(dwStartTimeCode, _T("0x%08X")); 3174 K1(cbSequenceHeader); 3175 K1(dwProfile); 3176 K1(dwLevel); 3177 K2(dwFlags, _T("0x%08X")); 3178 #undef J 3179 #undef K1 3180 #undef K2 3181 #undef J 3182 nExtraDataSize = pMediaType->cbFormat - (sizeof *pMpeg2VideoInfo - sizeof pMpeg2VideoInfo->dwSequenceHeader); 3155 if(pMpeg2VideoInfo && pMediaType->cbFormat >= offsetof(MPEG2VIDEOINFO, dwSequenceHeader)) //sizeof *pMpeg2VideoInfo) 3156 { 3157 #define J(x) I(pMpeg2VideoInfo->x) 3158 #define K1(x) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), J(x)) 3159 #define K2(x, y) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), I(pMpeg2VideoInfo->x, y)) 3160 sText += AtlFormatString(_T(" * ") _T("`hdr.rcSource`: (%s, %s) - (%s, %s)") _T("\r\n"), J(hdr.rcSource.left), J(hdr.rcSource.top), J(hdr.rcSource.right), J(hdr.rcSource.bottom)); 3161 sText += AtlFormatString(_T(" * ") _T("`hdr.rcTarget`: (%s, %s) - (%s, %s)") _T("\r\n"), J(hdr.rcTarget.left), J(hdr.rcTarget.top), J(hdr.rcTarget.right), J(hdr.rcTarget.bottom)); 3162 K1(hdr.dwBitRate); 3163 K1(hdr.dwBitErrorRate); 3164 sText += AtlFormatString(_T(" * ") _T("`hdr.AvgTimePerFrame`: %s") _T("\r\n"), I(_FilterGraphHelper::FormatReferenceTime(pMpeg2VideoInfo->hdr.AvgTimePerFrame))); 3165 K2(hdr.dwInterlaceFlags, _T("0x%X")); 3166 K2(hdr.dwCopyProtectFlags, _T("0x%X")); 3167 K1(hdr.dwPictAspectRatioX); 3168 K1(hdr.dwPictAspectRatioY); 3169 K2(hdr.dwControlFlags, _T("0x%X")); 3170 K1(hdr.bmiHeader.biSize); 3171 K1(hdr.bmiHeader.biWidth); 3172 K1(hdr.bmiHeader.biHeight); 3173 K1(hdr.bmiHeader.biPlanes); 3174 K1(hdr.bmiHeader.biBitCount); 3175 sText += AtlFormatString(_T(" * ") _T("`hdr.bmiHeader.biCompression`: %s") _T("\r\n"), I(_FilterGraphHelper::GetFourccCodeString(pMpeg2VideoInfo->hdr.bmiHeader.biCompression))); 3176 K1(hdr.bmiHeader.biSizeImage); 3177 K1(hdr.bmiHeader.biXPelsPerMeter); 3178 K1(hdr.bmiHeader.biYPelsPerMeter); 3179 K1(hdr.bmiHeader.biClrUsed); 3180 K1(hdr.bmiHeader.biClrImportant); 3181 K2(dwStartTimeCode, _T("0x%08X")); 3182 K1(cbSequenceHeader); 3183 K1(dwProfile); 3184 K1(dwLevel); 3185 K2(dwFlags, _T("0x%08X")); 3186 #undef J 3187 #undef K1 3188 #undef K2 3189 #undef J 3190 nExtraDataSize = pMediaType->cbFormat - (offsetof(MPEG2VIDEOINFO, dwSequenceHeader) //sizeof *pMpeg2VideoInfo 3191 - sizeof pMpeg2VideoInfo->dwSequenceHeader); 3192 } 3183 3193 } else 3184 3194 #pragma endregion … … 3187 3197 { 3188 3198 const WAVEFORMATEX* pWaveFormatEx = (const WAVEFORMATEX*) pMediaType->pbFormat; 3189 if(pWaveFormatEx->wFormatTag == WAVE_FORMAT_EXTENSIBLE) 3190 { 3191 const WAVEFORMATEXTENSIBLE* pWaveFormatExtensible = (const WAVEFORMATEXTENSIBLE*) pMediaType->pbFormat; 3192 #define J(x) I(pWaveFormatExtensible->x) 3193 #define K1(x) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), J(x)) 3194 #define K2(x, y) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), I(pWaveFormatExtensible->x, y)) 3195 sText += AtlFormatString(_T(" * ") _T("As `WAVEFORMATEXTENSIBLE`:") _T("\r\n")); 3196 K2(Format.wFormatTag, _T("0x%02X")); 3197 K1(Format.nChannels); 3198 K1(Format.nSamplesPerSec); 3199 K1(Format.nAvgBytesPerSec); 3200 K1(Format.nBlockAlign); 3201 K1(Format.wBitsPerSample); 3202 K1(Format.cbSize); 3203 K1(Samples.wValidBitsPerSample); 3204 K2(dwChannelMask, _T("0x%02X")); 3205 sText += AtlFormatString(_T(" * ") _T("`SubFormat`: %s") _T("\r\n"), I(_PersistHelper::StringFromIdentifier(pWaveFormatExtensible->SubFormat))); 3206 #undef J 3207 #undef K1 3208 #undef K2 3209 nExtraDataSize = pWaveFormatEx->cbSize - (sizeof *pWaveFormatExtensible - sizeof *pWaveFormatEx); 3210 } else 3211 { 3212 #define J(x) I(pWaveFormatEx->x) 3213 #define K1(x) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), J(x)) 3214 #define K2(x, y) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), I(pWaveFormatEx->x, y)) 3215 K2(wFormatTag, _T("0x%02X")); 3216 K1(nChannels); 3217 K1(nSamplesPerSec); 3218 K1(nAvgBytesPerSec); 3219 K1(nBlockAlign); 3220 K1(wBitsPerSample); 3221 K1(cbSize); 3222 #undef J 3223 #undef K1 3224 #undef K2 3225 nExtraDataSize = pWaveFormatEx->cbSize; 3199 if(pWaveFormatEx && pMediaType->cbFormat >= sizeof *pWaveFormatEx) 3200 { 3201 if(pWaveFormatEx->wFormatTag == WAVE_FORMAT_EXTENSIBLE) 3202 { 3203 // WARN: Check pMediaType->cbFormat 3204 const WAVEFORMATEXTENSIBLE* pWaveFormatExtensible = (const WAVEFORMATEXTENSIBLE*) pMediaType->pbFormat; 3205 #define J(x) I(pWaveFormatExtensible->x) 3206 #define K1(x) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), J(x)) 3207 #define K2(x, y) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), I(pWaveFormatExtensible->x, y)) 3208 sText += AtlFormatString(_T(" * ") _T("As `WAVEFORMATEXTENSIBLE`:") _T("\r\n")); 3209 K2(Format.wFormatTag, _T("0x%02X")); 3210 K1(Format.nChannels); 3211 K1(Format.nSamplesPerSec); 3212 K1(Format.nAvgBytesPerSec); 3213 K1(Format.nBlockAlign); 3214 K1(Format.wBitsPerSample); 3215 K1(Format.cbSize); 3216 K1(Samples.wValidBitsPerSample); 3217 K2(dwChannelMask, _T("0x%02X")); 3218 sText += AtlFormatString(_T(" * ") _T("`SubFormat`: %s") _T("\r\n"), I(_PersistHelper::StringFromIdentifier(pWaveFormatExtensible->SubFormat))); 3219 #undef J 3220 #undef K1 3221 #undef K2 3222 nExtraDataSize = pWaveFormatEx->cbSize - (sizeof *pWaveFormatExtensible - sizeof *pWaveFormatEx); 3223 } else 3224 { 3225 #define J(x) I(pWaveFormatEx->x) 3226 #define K1(x) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), J(x)) 3227 #define K2(x, y) sText += AtlFormatString(_T(" * `") _T(#x) _T("`: %s") _T("\r\n"), I(pWaveFormatEx->x, y)) 3228 K2(wFormatTag, _T("0x%02X")); 3229 K1(nChannels); 3230 K1(nSamplesPerSec); 3231 K1(nAvgBytesPerSec); 3232 K1(nBlockAlign); 3233 K1(wBitsPerSample); 3234 K1(cbSize); 3235 #undef J 3236 #undef K1 3237 #undef K2 3238 nExtraDataSize = pWaveFormatEx->cbSize; 3239 } 3226 3240 } 3227 3241 } -
trunk/DirectShowSpy/Module.ini
r839 r840 4 4 ;Language=133 ;MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US) 5 5 ;Version String Format=%d.%d.%d.%d 6 Current Build Number=21 386 Current Build Number=2142
Note: See TracChangeset
for help on using the changeset viewer.