IMFPMediaItem::GetStartStopPosition method (mfplay.h)

Important  Deprecated. This API may be removed from future releases of Windows. Applications should use the Media Session for playback.
 

Gets the start and stop times for the media item.

Syntax

HRESULT GetStartStopPosition(
  [out] GUID        *pguidStartPositionType,
  [out] PROPVARIANT *pvStartValue,
  [out] GUID        *pguidStopPositionType,
  [out] PROPVARIANT *pvStopValue
);

Parameters

[out] pguidStartPositionType

Receives the unit of time for the start position. See Remarks. This parameter can be NULL.

[out] pvStartValue

Receives the start position. The meaning and data type of this parameter are indicated by the pguidStartPositionType parameter. The pvStartValue parameter must be NULL if pguidStartPositionType is NULL, and cannot be NULL otherwise.

[out] pguidStopPositionType

Receives the unit of time for the stop position. See Remarks. This parameter can be NULL.

[out] pvStopValue

Stop position. The meaning and data type of this parameter are indicated by the pguidStopPositionType parameter. The pvStopValue parameter must be NULL if pguidStopPositionType is NULL, and cannot be NULL otherwise.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The pguidStartPositionType and pguidStopPositionType parameters receive the units of time that are used. Currently, the only supported value is MFP_POSITIONTYPE_100NS.

Value Description
MFP_POSITIONTYPE_100NS 100-nanosecond units. The time parameter (pvStartValue or pvStopValue) uses the following data type:
  • Variant type (vt): VT_I8
  • Variant member: hVal

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header mfplay.h

See also

How to Play a File Clip

IMFPMediaItem

Using MFPlay for Audio/Video Playback