다음을 통해 공유


IMFPMediaItem interface (mfplay.h)

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

Represents a media item. A media item is an abstraction for a source of media data, such as a video file. Use this interface to get information about the source, or to change certain playback settings, such as the start and stop times. To get a pointer to this interface, call one of the following methods:

Inheritance

The IMFPMediaItem interface inherits from the IUnknown interface. IMFPMediaItem also has these types of members:

Methods

The IMFPMediaItem interface has these methods.

 
IMFPMediaItem::GetCharacteristics

Gets various flags that describe the media item.
IMFPMediaItem::GetDuration

Gets the duration of the media item.
IMFPMediaItem::GetMediaPlayer

Gets a pointer to the MFPlay player object that created the media item.
IMFPMediaItem::GetMetadata

Gets a property store that contains metadata for the source, such as author or title.
IMFPMediaItem::GetNumberOfStreams

Gets the number of streams (audio, video, and other) in the media item.
IMFPMediaItem::GetObject

Gets the object that was used to create the media item.
IMFPMediaItem::GetPresentationAttribute

Queries the media item for a presentation attribute.
IMFPMediaItem::GetStartStopPosition

Gets the start and stop times for the media item.
IMFPMediaItem::GetStreamAttribute

Queries the media item for a stream attribute.
IMFPMediaItem::GetStreamSelection

Queries whether a stream is selected to play. (IMFPMediaItem.GetStreamSelection)
IMFPMediaItem::GetURL

Gets the URL that was used to create the media item.
IMFPMediaItem::GetUserData

Gets the application-defined value stored in the media item.
IMFPMediaItem::HasAudio

Queries whether the media item contains an audio stream.
IMFPMediaItem::HasVideo

Queries whether the media item contains a video stream.
IMFPMediaItem::IsProtected

Queries whether the media item contains protected content.
IMFPMediaItem::SetStartStopPosition

Sets the start and stop time for the media item.
IMFPMediaItem::SetStreamSelection

Selects or deselects a stream.
IMFPMediaItem::SetStreamSink

Sets a media sink for the media item.
IMFPMediaItem::SetUserData

Stores an application-defined value in the media item.

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

Media Foundation Interfaces

Using MFPlay for Audio/Video Playback