|Microsoft DirectX 9.0|
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.
In addition to the methods inherited from IUnknown, the IMediaSample interface exposes the following methods.
|GetActualDataLength||Retrieves the length of the valid data in the buffer.|
|GetMediaTime||Retrieves the media times for this sample.|
|GetMediaType||Retrieves the media type, if the media type differs from the previous sample.|
|GetPointer||Retrieves a read/write pointer to this buffer's memory.|
|GetSize||Retrieves the size of the buffer.|
|IsDiscontinuity||Determines if this sample represents a break in the data stream.|
|IsPreroll||Determines if this sample is a preroll sample.|
|IsSyncPoint||Determines if the beginning of this sample is a synchronization point.|
|SetActualDataLength||Sets the length of the valid data in the buffer.|
|SetDiscontinuity||Specifies whether this sample represents a break in the data stream.|
|SetMediaTime||Sets the media times for this sample.|
|SetMediaType||Sets the media type for the sample.|
|SetPreroll||Specifies whether this sample is a preroll sample.|
|SetSyncPoint||Specifies whether the beginning of this sample is a synchronization point.|
|SetTime||Sets the stream time when this sample should begin and finish.|