IAMFileCutListElement Interface

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

For more information, see About Cutlists and Using Cutlists.

Implement this interface in your application when you implement your own IAMCutListElement interface. Usually, you don't need to implement either interface because Microsoft® 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.

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

Syntax

HRESULT GetElementSplitOffset(
    REFERENCE_TIME *pmtOffset
);

Parameters

pmtOffset
[out] Pointer that will receive the offset in the element's length.

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

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

IAMFileCutListElement::GetFileName

IAMFileCutListElement Interface

Retrieves the file name of the cutlist element.

Syntax

HRESULT GetFileName(
    LPWSTR *ppwstrFileName
);

Parameters

ppwstrFileName
[out] Address of a pointer to a variable that will receive the file name (must be freed when no longer needed).

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.

IAMFileCutListElement::GetOriginPosition

IAMFileCutListElement Interface

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

Syntax

HRESULT GetOriginPosition(
    REFERENCE_TIME *pmtOrigin
);

Parameters

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

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.

Syntax

HRESULT GetTrimInPosition(
    REFERENCE_TIME *pmtTrimIn
);

Parameters

pmtTrimIn
[out] Pointer that will receive the trimin point.

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.

IAMFileCutListElement::GetTrimLength

IAMFileCutListElement Interface

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

Syntax

HRESULT GetTrimLength(
    REFERENCE_TIME *pmtLength
);

Parameters

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

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.

Syntax

HRESULT GetTrimOutPosition(
    REFERENCE_TIME *pmtTrimOut
);

Parameters

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

The media time does not include the trimout point.


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