DirectShow Animated Header -- IAMCutListElement Interface DirectShow Animated Header -- IAMCutListElement Interface* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: IAMCrossbar Interface
*Next Topic: IAMDevMemoryAllocator Interface

IAMCutListElement Interface


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.


IAMCutListElement::ElementStatus

IAMCutListElement Interface

Determines the status of the element.

HRESULT ElementStatus(
  DWORD *pdwStatus,
  DWORD dwTimeoutMs
  );

Parameters
pdwStatus
[in/out] Status. On input, if this parameter contains CL_WAIT_FOR_STATE and an additional state value from the CL_ELEM_STATUS enumerated data type, this method waits dwTimeoutMs milliseconds until the element is in that state before returning. On output, this is a logical combination of flags from the CL_ELEM_STATUS enumerated data type.
dwTimeoutMs
[in] Timeout value, in milliseconds.
Return Values

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.


IAMCutListElement::GetElementDuration

IAMCutListElement Interface

Retrieves the duration of the cutlist element.

HRESULT GetElementDuration(
  REFERENCE_TIME *pmtDuration
  );

Parameters
pmtDuration
[out] Duration of the element in REFERENCE_TIME.
Return Values

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.

Remarks

When you call the IFileClip::CreateCut method to create the element, the difference between its mtTrimOut and mtTrimIn parameters determines the duration.


IAMCutListElement::GetElementStartPosition

IAMCutListElement Interface

Retrieves the media time of the element's start in the time scale of the cutlist.

HRESULT GetElementStartPosition(
  REFERENCE_TIME *pmtStart
  );

Parameters
pmtStart
[out] Pointer to the media time for the start of the element.
Return Values

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.

Remarks

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.


IAMCutListElement::IsFirstElement

IAMCutListElement Interface

Determines if the element is the first in the cutlist.

HRESULT IsFirstElement(void);

Return Values

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.


IAMCutListElement::IsLastElement

IAMCutListElement Interface

Determines if the element is the last in the cutlist.

HRESULT IsLastElement(void);

Return Values

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.


IAMCutListElement::IsNull

IAMCutListElement Interface

Determines if the element is null.

HRESULT IsNull(void);

Return Values

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.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page