IMediaSample interface

The IMediaSample interface sets and retrieves properties on media samples. A media sample is a COM object that contains a block of media data. Media samples support the use of shared memory buffers among filters.

Typically, applications do not call methods on this interface. Filters use this interface to set properties on samples, and deliver the samples to a downstream filter. The downstream filter uses the interface to retrieve the properties and read the data. The filter can modify the data in place, or it can copy the sample, modify the copy, and pass the copy downstream.

The IMediaSample2 interface inherits this interface.

Methods

The IMediaSample interface has these methods.

Method Description
IMediaSample::GetActualDataLength The GetActualDataLength method retrieves the length of the valid data in the buffer.
IMediaSample::GetMediaTime The GetMediaTime method retrieves the media times for this sample.
IMediaSample::GetMediaType The GetMediaType method retrieves the media type, if the media type differs from the previous sample.
IMediaSample::GetPointer The GetPointer method retrieves a read/write pointer to the media sample's buffer.
IMediaSample::GetSize The GetSize method retrieves the size of the buffer.
IMediaSample::GetTime The GetTime method retrieves the stream times at which this sample should begin and finish.
IMediaSample::IsDiscontinuity The IsDiscontinuity method determines if this sample represents a break in the data stream.
IMediaSample::IsPreroll The IsPreroll method determines if this sample is a preroll sample. A preroll sample should not be displayed.
IMediaSample::IsSyncPoint The IsSyncPoint method determines if the beginning of this sample is a synchronization point.
IMediaSample::SetActualDataLength The SetActualDataLength method sets the length of the valid data in the buffer.
IMediaSample::SetDiscontinuity The SetDiscontinuity method specifies whether this sample represents a break in the data stream.
IMediaSample::SetMediaTime The SetMediaTime method sets the media times for this sample.
IMediaSample::SetMediaType The SetMediaType method sets the media type for the sample.
IMediaSample::SetPreroll The SetPreroll method specifies whether this sample is a preroll sample.
IMediaSample::SetSyncPoint The SetSyncPoint method specifies whether the beginning of this sample is a synchronization point.
IMediaSample::SetTime The SetTime method sets the stream times when this sample should begin and finish.

Requirements

   
Windows version Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)