Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This class represents a buffer object that supports the IMediaSampleinterface. It represents a buffer in memory, together with some associated properties stored as protected data members.
The constructor is passed as a pointer to the buffer with its length in bytes; other properties are normally set and accessed through implemented IMediaSampleinterface methods.
These properties describe various attributes of the media sample, such as the sample's media type, start and end time, and options.
The options can include whether the media sample is a sync point, a preroll sample, or discontinuous with other samples.
All member functions in this class that return HRESULTand accept a pointer as a parameter return E_POINTER when passed a null pointer.
Protected Data Members
Member | Description |
---|---|
m_cbBuffer |
Size of the buffer. |
m_dwFlags |
Sample property flags as follows:
|
m_End |
Sample end time. |
m_lActual |
Actual length of data in this sample. |
m_MediaEnd |
Media end (offset from m_MediaStart). |
m_MediaStart |
Media start position. |
m_pAllocator |
Pointer to the IMemAllocatorobject associated with this object. |
m_pBuffer |
Pointer to the complete buffer. |
m_pMediaType |
Pointer to a structure containing the media type of the sample. |
m_pNext |
Pointer to the next CMediaSampleobject in the free list. |
m_Start |
Sample start time. |
Member Functions
Member function | Description |
---|---|
Constructs a CMediaSampleobject. |
|
Sets the buffer pointer and length. |
Implemented IUnknown Methods
Method | Description |
---|---|
Retrieves pointers to supported interfaces. |
|
Increments the reference count. |
|
Decrements the reference count. |
Implemented IMediaSample Methods
Method | Description |
---|---|
Retrieves the data length of the sample. |
|
Retrieves the media time extents of the sample. |
|
Retrieves the media type of the CMediaSampleobject. |
|
Retrieves a read/write pointer to the memory of this buffer. |
|
Returns the size, in bytes, of the buffer data area. |
|
Sets the media time extents for this sample. |
|
Determines if there is discontinuity in the data stream. |
|
Indicates a preroll property. If TRUE, this sample is for preroll only and should not be displayed. |
|
Determines if the beginning of a sample is a synchronization point. |
|
Sets the data length of the sample. |
|
Sets the discontinuity property. |
|
Sets the media time of the CMediaSampleobject. |
|
Sets the media type of the CMediaSampleobject. |
|
Sets preroll property. If TRUE, this sample is for preroll only and should not be displayed. |
|
Sets sync-point property. |
|
Sets the stream time at which this sample should start and finish. |
Implemented INonDelegatingUnknown Methods
Method | Description |
---|---|
Passes out pointers to any interfaces added to the derived filter class. |
Requirements
Windows Embedded CE | Windows CE 2.12 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
Note | Microsoft DirectShow applications and DirectShow filters have
different include file and Library requirements
For more information, see Setting Up the Build Environment |