DirectShow Animated Header -- IAMFileCutListElement Interface DirectShow Animated Header -- IAMFileCutListElement Interface* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: IFileClip Interface
*Next Topic: IFileSinkFilter Interface

IAMFileCutListElement Interface


The IAMFileCutListElement interface provides support for a cutlist element for a file stream.

See About Cutlists and Using Cutlists for more information.

When to Implement

Implement this interface in your application when you implement your own IAMCutListElement interface. Usually, you don't need to implement either interface because DirectShow provides the CLSID_VideoFileClip and CLSID_AudioFileClip objects that implement it for you. However, you can implement this interface in your application when you need to change the default behavior of this interface.

When to Use

Use this interface in your filter when you specify a media clip stored in a file. Call QueryInterface on IAMCutListElement to determine if the element is file-based.

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.
IAMFileCutListElement methods Description
GetFileName Retrieves the file name of the cutlist element.
GetTrimInPosition Retrieves the media time of the trimin point, based on the timeline of the cut's source file.
GetTrimOutPosition Retrieves the media time of the trimout point, based on the timeline of the cut's source file.
GetOriginPosition Retrieves the media time of the origin of the file or clip.
GetTrimLength Retrieves the length of time between the trimin and trimout points.
GetElementSplitOffset Retrieves the media time of the number of frames between the trimin point and the start of this element in output time.


IAMFileCutListElement::GetElementSplitOffset

IAMFileCutListElement Interface

Retrieves the media time of the number of frames between the trimin point and the start of this element in output time.

HRESULT GetElementSplitOffset(
  REFERENCE_TIME *pmtOffset
  );

Parameters
pmtOffset
[out] Pointer that will receive the offset in the element's length.
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

This method must retrieve a zero offset. Other offsets are not supported.


IAMFileCutListElement::GetFileName

IAMFileCutListElement Interface

Retrieves the file name of the cutlist element.

HRESULT GetFileName(
  LPWSTR *ppwstrFileName
  );

Parameters
ppwstrFileName
[out] Pointer that will receive the file name (must be freed when no longer needed).
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.


IAMFileCutListElement::GetOriginPosition

IAMFileCutListElement Interface

Retrieves the media time of the origin of the file or clip.

HRESULT GetOriginPosition(
  REFERENCE_TIME *pmtOrigin
  );

Parameters
mtOrigin
[out] Pointer that will receive the origin. The origin is in media 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

This method must return a zero origin. Clips with nonzero start times are not supported.


IAMFileCutListElement::GetTrimInPosition

IAMFileCutListElement Interface

Retrieves the media time of the trimin point, based on the timeline of the cut's source file.

HRESULT GetTrimInPosition(
  REFERENCE_TIME *pmtTrimIn
  );

Parameters
pmtTrimIn
[out] Pointer that will receive the trimin point.
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.


IAMFileCutListElement::GetTrimLength

IAMFileCutListElement Interface

Retrieves the length of time between the trimin and trimout points.

HRESULT GetTrimLength(
  REFERENCE_TIME *pmtLength
  );

Parameters
pmtLength
[out] Pointer that will receive the length in media 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

This method retrieves the length of time between the in and out points specified by GetTrimInPosition and GetTrimOutPosition.

The value that GetTrimLength retrieves equals the value that GetElementDuration retrieves (trimout minus trimin). Other lengths are not supported.


IAMFileCutListElement::GetTrimOutPosition

IAMFileCutListElement Interface

Retrieves the media time of the trimout point, based on the timeline of the cut's source file.

HRESULT GetTrimOutPosition(
  REFERENCE_TIME *pmtTrimOut
  );

Parameters
pmtTrimOut
[out] Pointer that will receive the trimout point, 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

The media time does not include the trimout point.

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

*Top of Page