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.

For more information, see About Cutlists and Using Cutlists.

Usually, you don't need to implement this interface because Microsoft® 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.

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 methodsDescription
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IAMCutListElement methodsDescription
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.

Syntax

HRESULT ElementStatus(
  DWORD *pdwStatus,
  DWORD dwTimeoutMs
  );

Parameters

pdwStatus
[in, out] Pointer to the 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 Value

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

Syntax

HRESULT GetElementDuration(
  REFERENCE_TIME *pmtDuration
  );

Parameters

pmtDuration
[out] Pointer to the duration of the element in REFERENCE_TIME.

Return Value

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

Syntax

HRESULT GetElementStartPosition(
  REFERENCE_TIME *pmtStart
  );

Parameters

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

Return Value

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

Syntax

HRESULT IsFirstElement(void);

Return Value

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

Syntax

HRESULT IsLastElement(void);

Return Value

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

Syntax

HRESULT IsNull(void);

Return Value

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


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.