The IAMCutListElement interface describes a base object, which represents an element in a cutlist. For a simpler interface that provides basic cutlist functionality, applications can use IFileClip to create an object that supports this interface.
See About Cutlists and Using Cutlists for more information.
When to Implement
Usually, you don't need to implement this interface because DirectShow provides the CLSID_VideoFileClip and CLSID_AudioFileClip objects, which can create an object that implements it for you. However, you can implement this interface in your application when you need to change this interface's default behavior.
When to Use
Use this interface in your filter when you need to get specific elements of a cutlist.
When compiling a cutlist application you must explicitly include the cutlist header file as follows:
#include <cutlist.h>
Methods in Vtable Order
| IUnknown methods | Description |
| QueryInterface | Retrieves pointers to supported interfaces. |
| AddRef | Increments the reference count. |
| Release | Decrements the reference count. |
| IAMCutListElement methods | Description |
| GetElementStartPosition | Retrieves the media time of the element's start in the time scale of the cutlist. |
| GetElementDuration | Retrieves the duration of the cutlist element. |
| IsFirstElement | Determines if the element is the first in the cutlist. |
| IsLastElement | Determines if the element is the last in the cutlist. |
| IsNull | Determines if the element is null. |
| ElementStatus | Determines the status of the element. |
Determines the status of the element.
HRESULT ElementStatus(
DWORD *pdwStatus,
DWORD dwTimeoutMs
);
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. |
| S_OK | Success. The element is null. |
Retrieves the duration of the cutlist element.
HRESULT GetElementDuration(
REFERENCE_TIME *pmtDuration
);
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_POINTER | Null pointer argument. |
| S_OK | Success. |
When you call the IFileClip::CreateCut method to create the element, the difference between its mtTrimOut and mtTrimIn parameters determines the duration.
Retrieves the media time of the element's start in the time scale of the cutlist.
HRESULT GetElementStartPosition(
REFERENCE_TIME *pmtStart
);
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_POINTER | Null pointer argument. |
| S_OK | Success. |
Times retrieved by this method are relative to the time within the cutlist. For example, the first element in the cutlist starts at time zero.
Determines if the element is the first in the cutlist.
HRESULT IsFirstElement(void);
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. |
| S_OK | Success. This is the first element in the cutlist. |
Determines if the element is the last in the cutlist.
HRESULT IsLastElement(void);
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. |
| S_OK | Success. This is the last element in the cutlist. |
Determines if the element is null.
HRESULT IsNull(void);
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. |
| S_FALSE | Element is not null. |
| S_OK | Success. The element is null. |
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.