Export (0) Print
Expand All

IMediaSample interface

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.

Members

The IMediaSample interface inherits from the IUnknown interface. IMediaSample also has these types of members:

Methods

The IMediaSample interface has these methods.

MethodDescription
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.

GetTime

Retrieves the stream times at which this sample should begin and finish.

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.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Strmif.h (include Dshow.h)

Library

Strmiids.lib

 

 

Community Additions

ADD
Show:
© 2014 Microsoft