IMediaSample interface (strmif.h)
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.
The IMediaSample interface inherits from the IUnknown interface. IMediaSample also has these types of members:
The IMediaSample interface has these methods.
The GetActualDataLength method retrieves the length of the valid data in the buffer.
The GetMediaTime method retrieves the media times for this sample.
The GetMediaType method retrieves the media type, if the media type differs from the previous sample.
The GetPointer method retrieves a read/write pointer to the media sample's buffer.
The GetSize method retrieves the size of the buffer.
The GetTime method retrieves the stream times at which this sample should begin and finish.
The IsDiscontinuity method determines if this sample represents a break in the data stream.
The IsPreroll method determines if this sample is a preroll sample. A preroll sample should not be displayed.
The IsSyncPoint method determines if the beginning of this sample is a synchronization point.
The SetActualDataLength method sets the length of the valid data in the buffer.
The SetDiscontinuity method specifies whether this sample represents a break in the data stream.
The SetMediaTime method sets the media times for this sample.
The SetMediaType method sets the media type for the sample.
The SetPreroll method specifies whether this sample is a preroll sample.
The SetSyncPoint method specifies whether the beginning of this sample is a synchronization point.
The SetTime method sets the stream times when this sample should begin and finish.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||strmif.h (include Dshow.h)|