IFileCutListElement Interface


IFileCutListElement supports a cutlist element for a file stream.

See IStandardCutList for information about other cutlist interfaces.

When to Implement

Implement this interface in your application if you implement your own ICutListElement interface. Normally you don't need to implement either interface because DirectShow provides the CLSID_VideoFileClip and CLSID_AudioFileClip objects which 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 ICutListElement to determine if the element is file-based.

Methods in Vtable Order
IUnknown methods Description
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IFileCutListElement methods Description
GetFileName Retrieves the complete file name of the cutlist element.
GetTrimInPosition Retrieves the media time of the trim in point, based on the timeline of the source file of the cut.
GetTrimOutPosition Retrieves the media time of the trim out point, based on the timeline of the source file of the cut.
GetOriginPosition Retrieves the media time of the origin of the file or clip.
GetTrimLength Retrieves the actual 'time' length between the in and out points specified by GetTrimInPosition and GetTrimOutPosition.
GetElementSplitOffset Retrieves the media time of the number of frames between the actual trim in point and the start of this element in output time.


IFileCutListElement::GetFileName

Retrieves the complete file name of the cutlist element.

HRESULT GetFileName(
  LPWSTR *ppwstrFileName
  );

Parameters
ppwstrFileName
[out] Pointer to receive the file name (must be freed afterwards).
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.


IFileCutListElement::GetTrimInPosition

Retrieves the media time of the trim in point, based on the timeline of the source file of the cut.

HRESULT GetTrimInPosition(
  REFERENCE_TIME *pmtTrimIn
  );

Parameters
pmtTrimIn
[out] Pointer to receive the trim in 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.


IFileCutListElement::GetTrimOutPosition

Retrieves the media time of the trim out point, based on the timeline of the source file of the cut.

HRESULT GetTrimOutPosition(
  REFERENCE_TIME *pmtTrimOut
  );

Parameters
pmtTrimOut
[out] Pointer to receive the trim out 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.

Remarks

The media time does not include the trim out point.


IFileCutListElement::GetOriginPosition

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

HRESULT GetOriginPosition(
  REFERENCE_TIME *pmtOrigin
  );

Parameters
mtOrigin
[out] Pointer to receive the origin 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 (0) origin. Clips with non-zero start times are not supported.


IFileCutListElement::GetTrimLength

Retrieves the actual 'time' length between the in and out points specified by GetTrimInPosition and GetTrimOutPosition.

HRESULT GetTrimLength(
  REFERENCE_TIME *pmtLength
  );

Parameters
pmtLength
[out] Pointer to 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

The value GetTrimLength retrieves equals the value GetElementDuration retrieves (trim out minus trim in). Other lengths are not supported.


IFileCutListElement::GetElementSplitOffset

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

HRESULT GetElementSplitOffset(
  REFERENCE_TIME *pmtOffset
  );

Parameters
pmtOffset
[out] Pointer to 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
0 (zero) Element is not split.
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 (0) offset. Other offsets are not supported.

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