IAMCopyCaptureFileProgress 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 IAMCopyCaptureFileProgress
interface is a callback interface used by the ICaptureGraphBuilder2::CopyCaptureFile method.
Because the CopyCaptureFile method can take a long time to complete, an application can implement this interface to receive periodic notifications about the progress of the copy operation. If the application does not need to receive this information, there is no need to implement the interface.
Inheritance
The IAMCopyCaptureFileProgress interface inherits from the IUnknown interface. IAMCopyCaptureFileProgress also has these types of members:
Methods
The IAMCopyCaptureFileProgress interface has these methods.
IAMCopyCaptureFileProgress::Progress The Progress method is called periodically by the ICaptureGraphBuilder2::CopyCaptureFile method while it copies the file. |
Remarks
To use this interface, implement a class that inherits the interface and implements all of its methods, including the methods in IUnknown. In your application, create an instance of the class and pass it to the CopyCaptureFile method. You do not have to implement COM reference counting in your class, as long as the object is guaranteed not to be deleted before the CopyCaptureFile method returns.
The following example shows a class that implements the interface:
C++ |
---|
|
C++ | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
// Scope for CProgress object { CProgress Prog; // Assume pBuilder is an initialized ICaptureGraphBuilder2 pointer. hr = pBuilder->CopyCaptureFile(szCaptureFile, szDestFile, TRUE, static_cast
See also |