Compartilhar via


IMSVidGraphSegmentContainer::get_Graph

 
Microsoft DirectShow 9.0

IMSVidGraphSegmentContainer::get_Graph

This topic applies to Windows XP or later.

The get_Graph method returns a pointer to the Filter Graph Manager.

Syntax

  HRESULT get_Graph(
  
  );

Parameters

  ppGraph

[in]  Address of a variable that receives an IGraphBuilder interface pointer.

Return Values

Returns S_OK if successful, or an HRESULT error code otherwise.

Remarks

Objects can use this method to find a specific DirectShow filter in the filter graph. It is not recommended that applications use this method. Applications should always control the filter graph using the Video Control. 

The returned IGraphBuilder interface has an outstanding reference count. The caller must release the interface.

Example Code

CComQIPtr<IMSVidGraphSegmentContainer> pSeg(m_pVideoControl);
if (pSeg)
{
    CComPtr<IGraphBuilder> pGraph;
    hr = pSeg->get_Graph(&pGraph);
    if (SUCCEEDED(hr))
    {
        // Use IGraphBuilder::EnumFilters to enumerate the filters.
    }
}

Requirements

  Header: Dshow.h.

  Library: Quartz.dll.

See Also