IStreamSample interface (mmstream.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Note  This interface is deprecated. New applications should not use it.
 
The IStreamSample interface provides control over the behavior of stream samples. You can retrieve the media stream that created the sample, set or retrieve sample start and stop times, check the sample's completion status, and perform a developer-specified function on the sample itself.

Implement this interface when you implement a media stream for a new media type. The interface is exposed on sample objects created by media streams.

Use this interface when you want to control data samples created by IMediaStream or its derived interfaces.

In addition to the methods inherited from IUnknown, the IStreamSample interface exposes the following methods.

Inheritance

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

Methods

The IStreamSample interface has these methods.

 
IStreamSample::CompletionStatus

Note  This interface is deprecated. New applications should not use it. Retrieves the status of the current sample's latest asynchronous update. If the update isn't complete, you can force it to complete.
IStreamSample::GetMediaStream

Note  This interface is deprecated. New applications should not use it. Retrieves a pointer to the media stream object that created the current sample.
IStreamSample::GetSampleTimes

Note  This interface is deprecated. New applications should not use it. Retrieves the current sample's start and end times. If the sample is updating, this method returns the times after the update completes.
IStreamSample::SetSampleTimes

Note  This interface is deprecated. New applications should not use it. Sets the current sample's start and end times. You can call this method prior to updating the sample.
IStreamSample::Update

Note  This interface is deprecated. New applications should not use it. Performs a synchronous or an asynchronous update on the current sample.

Requirements

Requirement Value
Target Platform Windows
Header mmstream.h