IMFSample Interface
Represents a media sample, which is a container object for media data. For video, a sample typically contains one video frame. For audio data, a sample typically contains multiple audio samples, rather than a single sample of audio.
A media sample contains zero or more buffers. Each buffer manages a block of memory, and is represented by the IMFMediaBuffer interface. A sample can have multiple buffers. The buffers are kept in an ordered list and accessed by index value. It is also valid to have an empty sample with no buffers.
Mitglieder
IMFSampleSchnittstelle erbt von IMFAttributes. IMFSample umfasst auch die folgenden Typen von Mitgliedern:
- Methoden
Methoden
IMFSampleSchnittstelle umfasst die folgenden Methoden.
Methode | Beschreibung |
---|---|
AddBuffer | Adds a buffer to the end of the list of buffers in the sample. |
ConvertToContiguousBuffer | Converts a sample with multiple buffers into a sample with a single buffer. |
CopyToBuffer | Copies the sample data to a buffer. |
GetBufferByIndex | Retrieves a buffer from the sample. |
GetBufferCount | Retrieves the number of buffers in the sample. |
GetSampleDuration | Retrieves the duration of the sample. |
GetSampleFlags | Retrieves flags associated with the sample. |
GetSampleTime | Retrieves the presentation time of the sample. |
GetTotalLength | Retrieves the total length of the valid data in all of the buffers in the sample. |
RemoveAllBuffers | Removes all buffers from the sample. |
RemoveBufferByIndex | Removes a buffer at a specified index from the sample. |
SetSampleDuration | Sets the duration of the sample. |
SetSampleFlags | Sets flags associated with the sample. |
SetSampleTime | Sets the presentation time of the sample. |
Hinweise
To create a new media sample, call MFCreateSample.
This interface is available on the following platforms if the Windows Media Format 11 SDK redistributable components are installed:
- Windows XP mit Service Pack 2 (SP2) und höher.
- Windows XP Media Center Edition 2005 with KB900325 (Windows XP Media Center Edition 2005) and KB925766 (Oktober 2006 Updaterollup für Windows XP Media Center Edition) installed.
Anforderungen
Mindestens unterstützter Client |
Windows Vista |
Mindestens unterstützter Server |
Windows Server 2008 |
Header |
Mfobjects.h (include Mfidl.h) |
Bibliothek |
Mfuuid.lib |