Muokkaa

Jaa


Custom File Formats

[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.]

If you have a custom mux or file-writer filter that supports your own file format, you can specify the CLSID as the first parameter of the ICaptureGraphBuilder2::SetOutputFileName method:

IBaseFilter *pMux = 0;
IFileSinkFilter *pSink = 0;
hr = pBuild->SetOutputFileName(&CLSID_MyCustomMuxFilter, 
    L"C:\\VidCap.avi", &pMux, &pSink);

For more information about this usage, see ICaptureGraphBuilder2::SetOutputFileName.

Capturing Video to a File