ICaptureGraphBuilder2 interface (strmif.h)
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The ICaptureGraphBuilder2
interface builds capture graphs and other custom filter graphs. The Capture Graph Builder object implements this interface.
ICaptureGraphBuilder2
interface does not use the Video Mixing Renderer (VMR), Enhanced Video Renderer (EVR) or Video Port Manager filters.Inheritance
The ICaptureGraphBuilder2 interface inherits from the IUnknown interface. ICaptureGraphBuilder2 also has these types of members:
Methods
The ICaptureGraphBuilder2 interface has these methods.
ICaptureGraphBuilder2::AllocCapFile The AllocCapFile method preallocates a capture file to a specified size. For best results, always capture to a defragmented, preallocated capture file that is larger than the size of the capture data. |
ICaptureGraphBuilder2::ControlStream The ControlStream method sets the start and stop times for one or more streams of captured data. |
ICaptureGraphBuilder2::CopyCaptureFile The CopyCaptureFile method copies the valid media data from a capture file. |
ICaptureGraphBuilder2::FindInterface The FindInterface method searches the graph for a specified interface, starting from a specified filter. |
ICaptureGraphBuilder2::FindPin The FindPin method retrieves a particular pin on a filter, or determines whether a given pin matches the specified criteria. |
ICaptureGraphBuilder2::GetFiltergraph The GetFiltergraph method retrieves the filter graph that the capture graph builder is using. |
ICaptureGraphBuilder2::RenderStream The RenderStream method connects an output pin on a source filter to a sink filter, optionally through an intermediate filter. |
ICaptureGraphBuilder2::SetFiltergraph The SetFiltergraph method specifies a filter graph for the capture graph builder to use. |
ICaptureGraphBuilder2::SetOutputFileName The SetOutputFileName method creates the file writing section of the filter graph. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | strmif.h (include Dshow.h) |