Changeset 4


Ignore:
Timestamp:
Aug 16, 2011, 2:47:23 PM (10 years ago)
Author:
roman
Message:
 
Location:
trunk/DirectShowTools/Samples/FindLargestMediaSample
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DirectShowTools/Samples/FindLargestMediaSample/FindLargestMediaSample.cpp

    r3 r4  
    151151        CComPtr<IFilterGraph2> m_pFilterGraph;
    152152        CComObject<CInspectionFilterSite>* m_pInspectionFilterSite;
     153        CComPtr<IUnknown> m_pInspectionFilterSiteUnknown;
    153154        CComPtr<IMediaEventEx> m_pMediaEventEx;
    154155        CComPtr<IMediaControl> m_pMediaControl;
     
    216217                        pInspectionFilterSite->Initialize(this);
    217218                        ATLENSURE_SUCCEEDED(pInspectionFilter->SetSite(pInspectionFilterSite));
     219                        m_pInspectionFilterSiteUnknown = pInspectionFilterSite;
    218220                        m_pInspectionFilterSite = pInspectionFilterSite;
    219221                        #pragma endregion
     
    241243                }
    242244                #pragma region Remove Reference Clock
    243                 CComQIPtr<IMediaFilter> pMediaFilter = m_pFilterGraph;
    244                 ATLENSURE_THROW(pMediaFilter, E_NOINTERFACE);
    245                 ATLENSURE_SUCCEEDED(pMediaFilter->SetSyncSource(NULL));
     245                {
     246                        const CComQIPtr<IMediaFilter> pMediaFilter = m_pFilterGraph;
     247                        ATLENSURE_THROW(pMediaFilter, E_NOINTERFACE);
     248                        ATLENSURE_SUCCEEDED(pMediaFilter->SetSyncSource(NULL));
     249                }
    246250                #pragma endregion
    247251                _tprintf(_T("Running Filter Graph\n"));
     
    255259                m_pMediaEventEx = NULL;
    256260                m_pMediaControl = NULL;
     261                m_pFilterGraph = NULL;
    257262                m_pInspectionFilterSite->Terminate();
    258263                m_pInspectionFilterSite = NULL;
    259                 m_pFilterGraph = NULL;
     264                m_pInspectionFilterSiteUnknown = NULL;
    260265                #pragma endregion
    261266                return S_OK;
  • trunk/DirectShowTools/Samples/FindLargestMediaSample/FindLargestMediaSample.vcxproj

    r3 r4  
    6262      <WarningLevel>Level3</WarningLevel>
    6363      <PrecompiledHeader>Use</PrecompiledHeader>
    64       <Optimization>MaxSpeed</Optimization>
    65       <FunctionLevelLinking>true</FunctionLevelLinking>
     64      <Optimization>Full</Optimization>
    6665      <IntrinsicFunctions>true</IntrinsicFunctions>
    6766      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     67      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
     68      <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
     69      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
     70      <StringPooling>true</StringPooling>
     71      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
    6872    </ClCompile>
    6973    <Link>
Note: See TracChangeset for help on using the changeset viewer.