IMediaSample Interface (Compact 2013)
3/26/2014
This interface provides shared memory buffer functionality, holds some properties about the data, and holds a pointer to the data itself. It is used by connected pins to transport media samples from one pin to another.
The IMediaSample2 interface extends the functionality of this interface to allow you to set and to retrieve media sample properties.
When to Implement
Implement this interface if you are providing an allocator (buffer) to be used for transporting media samples between filters. This interface is implemented by the CMediaSample class in the DirectShow class library.
When to Use
Filters use methods on this interface to set properties and pass data to another filter. Downstream filters use methods on this interface to read the media sample's data and properties. Filters can modify the data in a media sample in place or can make a copy of the sample, modify the copy, and pass it on.
Methods in Vtable Order
The following table shows the methods that appear in the Vtable beneath the standard COM methods inherited from IUnknown.
Method |
Description |
---|---|
Retrieves a read/write pointer to this buffer's memory. |
|
Returns the size, in bytes, of the buffer data area. |
|
Retrieves the stream times at which this sample should begin and finish. |
|
Sets the stream times at which this sample should begin and finish. |
|
Determines if the beginning of a sample is a synchronization point. |
|
Sets the synchronization point. |
|
Indicates a preroll property. If TRUE, this sample is for preroll only and should not be displayed. |
|
Sets the preroll property. If TRUE, this sample is for preroll only and should not be displayed. |
|
Retrieves the data length of the sample. |
|
Sets the data length of the sample. |
|
Retrieves the media type of the sample. |
|
Sets the media type of the sample. |
|
Indicates a discontinuity property. If S_OK is returned, sample is not contiguous with previous sample. |
|
Sets the discontinuity property. Set to TRUE if sample is new after a seek or dropped sample. |
|
Retrieves the media time stamps for the sample. |
|
Sets the media time stamps for the sample. |
Requirements
Header |
dshow.h |
Library |
Strmiids.lib |