Microsoft DirectX 8.0

IDirectDrawMediaSample Interface

The IDirectDrawMediaSample interface is supported by objects that also support IMediaSample. The "buffer" for this type of sample is a Microsoft® DirectDraw® surface. This type of sample is allocated by the IDirectDrawMediaSampleAllocator for connections between the Overlay Mixer and upstream decoder filters. It enables the decoder filter to unlock the surface but still hold on to it, so that other components can access it.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IDirectDrawMediaSample methodsDescription
GetSurfaceAndReleaseLock Retrieves and unlocks the surface that the sample represents.
LockMediaSamplePointer Locks the surface that the sample represents.

IDirectDrawMediaSample::GetSurfaceAndReleaseLock

IDirectDrawMediaSample Interface

Retrieves and unlocks the surface that the sample represents.

Syntax

HRESULT GetSurfaceAndReleaseLock(
    IDirectDrawSurface **ppDirectDrawSurface
    RECT *pRect
);

Parameters

ppDirectDrawSurface
[out] Address of a pointer to the sample's IDirectDrawSurface interface.
pRect
[out] Pointer to a variable that receives the address of the rectangle defining the part of the surface that the sample represents.

Return Value

Returns an HRESULT value.

Remarks

The caller should release the returned surface pointer, except when calling the Overlay Mixer filter's implementation of this interface.

IDirectDrawMediaSample::LockMediaSamplePointer

IDirectDrawMediaSample Interface

Locks the surface that the sample represents.

Syntax

HRESULT LockMediaSamplePointer(void);

Return Value

Returns an HRESULT value.

Remarks

Call this method only after calling GetSurfaceAndReleaseLock.