Changeset 98 for trunk/DirectShowSpy


Ignore:
Timestamp:
Aug 21, 2012, 3:09:45 PM (11 years ago)
Author:
roman
Message:
  • logs IMediaEvent, IMediaEventEx, IMediaEventSink calls
  • logs call stack for IMediaEventSink::Notify with EC_ERRORABORT
Location:
trunk/DirectShowSpy
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/DirectShowSpy/BdaHooks/BdaHooks.rc

    r97 r98  
    6363
    6464VS_VERSION_INFO VERSIONINFO
    65  FILEVERSION  1, 0, 0, 73
     65 FILEVERSION  1, 0, 0, 76
    6666 PRODUCTVERSION 1,0,0,1
    6767 FILEFLAGSMASK 0x3fL
     
    8282            VALUE "CompanyName", "Roman Ryltsov"
    8383            VALUE "FileDescription", "Alax.Info DirectShow Filter Graph Spy Module"
    84             VALUE "FileVersion",  "1, 0, 0, 73\0"
     84            VALUE "FileVersion",  "1, 0, 0, 76\0"
    8585            VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2009"
    8686            VALUE "OLESelfRegister", "Yes"
  • trunk/DirectShowSpy/BdaHooks/BdaHooks.vcproj

    r95 r98  
    2222                <Configuration
    2323                        Name="Debug|Win32"
    24                         OutputDirectory="$(SolutionDir)_Bin\$(ConfigurationName)\$(PlatformName)"
    25                         IntermediateDirectory="$(SolutionDir)_Bin\$(ConfigurationName)\$(PlatformName)\$(ProjectName)"
     24                        OutputDirectory="$(SolutionDir)_Bin\$(PlatformName)\$(ConfigurationName)\"
     25                        IntermediateDirectory="$(SolutionDir)_Bin\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
    2626                        ConfigurationType="2"
    2727                        UseOfATL="2"
     
    111111                <Configuration
    112112                        Name="Debug|x64"
    113                         OutputDirectory="$(SolutionDir)_Bin\$(ConfigurationName)\$(PlatformName)"
    114                         IntermediateDirectory="$(SolutionDir)_Bin\$(ConfigurationName)\$(PlatformName)\$(ProjectName)"
     113                        OutputDirectory="$(SolutionDir)_Bin\$(PlatformName)\$(ConfigurationName)\"
     114                        IntermediateDirectory="$(SolutionDir)_Bin\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
    115115                        ConfigurationType="2"
    116116                        UseOfATL="2"
     
    199199                <Configuration
    200200                        Name="Release|Win32"
    201                         OutputDirectory="$(SolutionDir)_Bin\$(ConfigurationName)\$(PlatformName)"
    202                         IntermediateDirectory="$(SolutionDir)_Bin\$(ConfigurationName)\$(PlatformName)\$(ProjectName)"
     201                        OutputDirectory="$(SolutionDir)_Bin\$(PlatformName)\$(ConfigurationName)\"
     202                        IntermediateDirectory="$(SolutionDir)_Bin\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
    203203                        ConfigurationType="2"
    204204                        UseOfATL="2"
     
    288288                <Configuration
    289289                        Name="Release|x64"
    290                         OutputDirectory="$(SolutionDir)_Bin\$(ConfigurationName)\$(PlatformName)"
    291                         IntermediateDirectory="$(SolutionDir)_Bin\$(ConfigurationName)\$(PlatformName)\$(ProjectName)"
     290                        OutputDirectory="$(SolutionDir)_Bin\$(PlatformName)\$(ConfigurationName)\"
     291                        IntermediateDirectory="$(SolutionDir)_Bin\$(PlatformName)\$(ConfigurationName)\$(ProjectName)\"
    292292                        ConfigurationType="2"
    293293                        UseOfATL="2"
  • trunk/DirectShowSpy/BdaHooks/BdaHooks_i.c

    r97 r98  
    77
    88 /* File created by MIDL compiler version 7.00.0500 */
    9 /* at Mon Aug 20 14:01:37 2012
     9/* at Mon Aug 20 23:06:17 2012
    1010 */
    1111/* Compiler settings for .\BdaHooks.idl:
  • trunk/DirectShowSpy/BdaHooks/BdaHooks_i.h

    r97 r98  
    55
    66 /* File created by MIDL compiler version 7.00.0500 */
    7 /* at Mon Aug 20 14:01:37 2012
     7/* at Mon Aug 20 23:06:17 2012
    88 */
    99/* Compiler settings for .\BdaHooks.idl:
  • trunk/DirectShowSpy/BdaHooks/BdaHooks_p.c

    r97 r98  
    55
    66 /* File created by MIDL compiler version 7.00.0500 */
    7 /* at Mon Aug 20 14:01:37 2012
     7/* at Mon Aug 20 23:06:17 2012
    88 */
    99/* Compiler settings for .\BdaHooks.idl:
  • trunk/DirectShowSpy/DirectShowSpy.rc

    r97 r98  
    6262
    6363VS_VERSION_INFO VERSIONINFO
    64  FILEVERSION  1, 0, 0, 620
     64 FILEVERSION  1, 0, 0, 647
    6565 PRODUCTVERSION 1,0,0,1
    6666 FILEFLAGSMASK 0x3fL
     
    8181            VALUE "CompanyName", "Roman Ryltsov"
    8282            VALUE "FileDescription", "Alax.Info DirectShow Spy Module"
    83             VALUE "FileVersion",  "1, 0, 0, 620\0"
     83            VALUE "FileVersion",  "1, 0, 0, 647\0"
    8484            VALUE "InternalName", "DirectShowSpy.dll"
    8585            VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2011"
  • trunk/DirectShowSpy/DirectShowSpy_i.c

    r97 r98  
    77
    88 /* File created by MIDL compiler version 7.00.0500 */
    9 /* at Mon Aug 20 17:35:23 2012
     9/* at Wed Aug 22 01:07:15 2012
    1010 */
    1111/* Compiler settings for .\DirectShowSpy.idl:
    12     Oicf, W1, Zp8, env=Win64 (32b run)
     12    Oicf, W1, Zp8, env=Win32 (32b run)
    1313    protocol : dce , ms_ext, c_ext, robust
    14     error checks: allocation ref bounds_check enum stub_data
     14    error checks: stub_data
    1515    VC __declspec() decoration level:
    1616         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
  • trunk/DirectShowSpy/DirectShowSpy_i.h

    r97 r98  
    55
    66 /* File created by MIDL compiler version 7.00.0500 */
    7 /* at Mon Aug 20 17:35:23 2012
     7/* at Wed Aug 22 01:07:15 2012
    88 */
    99/* Compiler settings for .\DirectShowSpy.idl:
    10     Oicf, W1, Zp8, env=Win64 (32b run)
     10    Oicf, W1, Zp8, env=Win32 (32b run)
    1111    protocol : dce , ms_ext, c_ext, robust
    12     error checks: allocation ref bounds_check enum stub_data
     12    error checks: stub_data
    1313    VC __declspec() decoration level:
    1414         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
  • trunk/DirectShowSpy/DirectShowSpy_p.c

    r97 r98  
    55
    66 /* File created by MIDL compiler version 7.00.0500 */
    7 /* at Mon Aug 20 17:35:23 2012
     7/* at Wed Aug 22 01:07:15 2012
    88 */
    99/* Compiler settings for .\DirectShowSpy.idl:
    10     Oicf, W1, Zp8, env=Win64 (32b run)
     10    Oicf, W1, Zp8, env=Win32 (32b run)
    1111    protocol : dce , ms_ext, c_ext, robust
    12     error checks: allocation ref bounds_check enum stub_data
     12    error checks: stub_data
    1313    VC __declspec() decoration level:
    1414         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
     
    1717//@@MIDL_FILE_HEADING(  )
    1818
    19 #if defined(_M_AMD64)
     19#if !defined(_M_IA64) && !defined(_M_AMD64)
    2020
    2121
     
    2929#pragma warning( disable: 4024 )  /* array to pointer mapping*/
    3030#pragma warning( disable: 4152 )  /* function/data pointer conversion in expression */
     31#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */
     32
     33#pragma optimize("", off )
    3134
    3235#define USE_STUBLESS_PROXY
     
    9699
    97100
    98 #if !defined(__RPC_WIN64__)
     101#if !defined(__RPC_WIN32__)
    99102#error  Invalid build platform for this stub.
    100103#endif
     104
     105#if !(TARGET_IS_NT50_OR_LATER)
     106#error You need a Windows 2000 or later to run this stub because it uses these features:
     107#error   /robust command line switch.
     108#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
     109#error This app will fail with the RPC_X_WRONG_STUB_VERSION error.
     110#endif
     111
    101112
    102113static const DirectShowSpy_MIDL_PROC_FORMAT_STRING DirectShowSpy__MIDL_ProcFormatString =
     
    270281    0,
    271282    DirectShowSpy__MIDL_TypeFormatString.Format,
    272     1, /* -error bounds_check flag */
     283    0, /* -error bounds_check flag */
    273284    0x50002, /* Ndr library version */
    274285    0,
     
    337348    0  /* Filler3 */
    338349};
     350#pragma optimize("", on )
    339351#if _MSC_VER >= 1200
    340352#pragma warning(pop)
     
    342354
    343355
    344 #endif /* defined(_M_AMD64)*/
    345 
     356#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/
     357
  • trunk/DirectShowSpy/FilterGraphSpy.h

    r97 r98  
    506506                return FALSE;
    507507        }
     508        static BOOL LookupEventCodeName(LONG nEventCode, LPCSTR& pszName) throw()
     509        {
     510                // NOTE: See Windows SDK evcode.h
     511                static const struct { LONG nEventCode; LPCSTR pszName; } g_pMap[] =
     512                {
     513                        #define A(x) { x, #x },
     514                        A(EC_COMPLETE)
     515                        A(EC_USERABORT)
     516                        A(EC_ERRORABORT)
     517                        A(EC_TIME)
     518                        A(EC_REPAINT)
     519                        A(EC_STREAM_ERROR_STOPPED)
     520                        A(EC_STREAM_ERROR_STILLPLAYING)
     521                        A(EC_ERROR_STILLPLAYING)
     522                        A(EC_PALETTE_CHANGED)
     523                        A(EC_VIDEO_SIZE_CHANGED)
     524                        A(EC_QUALITY_CHANGE)
     525                        A(EC_SHUTTING_DOWN)
     526                        A(EC_CLOCK_CHANGED)
     527                        A(EC_PAUSED)
     528                        A(EC_OPENING_FILE)
     529                        A(EC_BUFFERING_DATA)
     530                        A(EC_FULLSCREEN_LOST)
     531                        A(EC_ACTIVATE)
     532                        A(EC_NEED_RESTART)
     533                        A(EC_WINDOW_DESTROYED)
     534                        A(EC_DISPLAY_CHANGED)
     535                        A(EC_STARVATION)
     536                        A(EC_OLE_EVENT)
     537                        A(EC_NOTIFY_WINDOW)
     538                        A(EC_STREAM_CONTROL_STOPPED)
     539                        A(EC_STREAM_CONTROL_STARTED)
     540                        A(EC_END_OF_SEGMENT)
     541                        A(EC_SEGMENT_STARTED)
     542                        A(EC_LENGTH_CHANGED)
     543                        A(EC_DEVICE_LOST)
     544                        A(EC_SAMPLE_NEEDED)
     545                        A(EC_PROCESSING_LATENCY)
     546                        A(EC_SAMPLE_LATENCY)
     547                        A(EC_SCRUB_TIME)
     548                        A(EC_STEP_COMPLETE)
     549                        #undef A
     550                };
     551                for(SIZE_T nIndex = 0; nIndex < DIM(g_pMap); nIndex++)
     552                        if(g_pMap[nIndex].nEventCode == nEventCode)
     553                        {
     554                                pszName = g_pMap[nIndex].pszName;
     555                                return TRUE;
     556                        }
     557                return FALSE;
     558        }
    508559
    509560// ISpy
     
    793844    STDMETHOD(Notify)(LONG nEventCode, LONG_PTR nParameter1, LONG_PTR nParameter2) throw()
    794845        {
     846                #if TRUE
     847                        LPCSTR pszEventName = NULL;
     848                        if(LookupEventCodeName(nEventCode, pszEventName))
     849                        {
     850                                _Z4(atlTraceCOM, 4, _T("nEventCode %hs (0x%02X), nParameter1 0x%p, nParameter2 0x%p\n"), pszEventName, nEventCode, nParameter1, nParameter2);
     851                        } else
     852                #endif
    795853                _Z4(atlTraceCOM, 4, _T("nEventCode 0x%02X, nParameter1 0x%p, nParameter2 0x%p\n"), nEventCode, nParameter1, nParameter2);
    796854                #if defined(_M_IX86)
    797855                        // WARN: Guarding section around might be preventing from walknig frame up the stack
    798                         if(nEventCode == EC_ERRORABORT)
     856                        if(nEventCode == EC_ERRORABORT) // || nEventCode == EC_VIDEO_SIZE_CHANGED)
    799857                        {
    800858                                CONTEXT ThreadContext = { CONTEXT_FULL };
    801859                                GetCurrentThreadContext(&ThreadContext);
    802                                 CDebugTraceCallStack::TraceCallStack(ThreadContext, (nEventCode == EC_ERRORABORT) ? 32 : 8);
     860                                CDebugTraceCallStack::TraceCallStack(ThreadContext, 32); //(nEventCode == EC_ERRORABORT) ? 32 : 8);
    803861                        }
    804862                #endif // defined(_M_IX86)
     863                if(!m_pInnerMediaEventSink)
     864                        return S_FALSE;
    805865                return m_pInnerMediaEventSink->Notify(nEventCode, nParameter1, nParameter2);
    806866        }
     
    830890        STDMETHOD(CancelDefaultHandling)(LONG nEventCode) throw()
    831891        {
     892                #if TRUE
     893                        LPCSTR pszEventName = NULL;
     894                        if(LookupEventCodeName(nEventCode, pszEventName))
     895                        {
     896                                _Z4(atlTraceCOM, 4, _T("nEventCode %hs (0x%02X)\n"), pszEventName, nEventCode);
     897                        } else
     898                #endif
    832899                _Z4(atlTraceCOM, 4, _T("nEventCode 0x%02X\n"), nEventCode);
    833900                return m_pInnerMediaEventEx->CancelDefaultHandling(nEventCode);
     
    835902        STDMETHOD(RestoreDefaultHandling)(LONG nEventCode) throw()
    836903        {
     904                #if TRUE
     905                        LPCSTR pszEventName = NULL;
     906                        if(LookupEventCodeName(nEventCode, pszEventName))
     907                        {
     908                                _Z4(atlTraceCOM, 4, _T("nEventCode %hs (0x%02X)\n"), pszEventName, nEventCode);
     909                        } else
     910                #endif
    837911                _Z4(atlTraceCOM, 4, _T("nEventCode 0x%02X\n"), nEventCode);
    838912                return m_pInnerMediaEventEx->RestoreDefaultHandling(nEventCode);
Note: See TracChangeset for help on using the changeset viewer.