IFileClip provides a simple way for an application to create one or more cuts from a single media file.
See IStandardCutList for more information about other cutlist interfaces typically used by applications.
When to Implement
Do not implement this interface. DirectShow implements it for you.
When to Use
Use this interface in your application when you want to provide cutlist functionality to the user.
Methods in Vtable Order
IUnknown methods | Description |
QueryInterface | Retrieves pointers to supported interfaces. |
AddRef | Increments the reference count. |
Release | Decrements the reference count. |
IFileClip methods | Description |
SetFileAndStream | Initializes the clip object with the specified media file and stream number. |
CreateCut | Creates a cutlist element. |
GetMediaType | Retrieves the clip's media type structure. |
Initializes the clip object with the specified media file and stream number.
HRESULT SetFileAndStream(
LPWSTR wstrFileName,
DWORD streamNum
);
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
Value | Meaning |
E_FAIL | Failure. |
E_INVALIDARG | Argument is invalid. |
E_NOTIMPL | Method is not supported. |
E_OUTOFMEMORY | Could not allocate required memory. |
S_OK | Success. |
This method opens the file to verify the format and media type (which can be queried by the IFileClip::GetMediaType method).
Creates a cutlist element.
HRESULT CreateCut(
ICutListElement **ppElement,
REFERENCE_TIME mtTrimIn,
REFERENCE_TIME mtTrimOut,
REFERENCE_TIME mtOrigin,
REFERENCE_TIME mtLength,
REFERENCE_TIME mtOffset
);
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
Value | Meaning |
E_FAIL | Failure. |
E_INVALIDARG | Argument is invalid. |
E_NOTIMPL | Method is not supported. |
E_OUTOFMEMORY | Could not allocate required memory. |
S_OK | Success. |
All of the times specified to this method are relative to the media clip rather than to the cutlist.
Retrieves the clip's media type structure.
HRESULT GetMediaType(
AM_MEDIA_TYPE *pmt
);
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
Value | Meaning |
E_FAIL | Failure. |
E_INVALIDARG | Argument is invalid. |
E_NOTIMPL | Method is not supported. |
E_OUTOFMEMORY | Could not allocate required memory. |
S_OK | Success. |
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.