The IDirectDrawMediaSample interface is supported by objects that also support IMediaSample and allocate samples whose memory is represented by Microsoft® DirectDraw® surfaces. It enables access to the DirectDraw surface that the media sample represents. It also enables the application to unlock the surface but still hold on to it, so that other applications can access it.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IDirectDrawMediaSample methods Description GetSurfaceAndReleaseLock Retrieves and unlocks the surface that the sample represents. LockMediaSamplePointer Locks the surface that the sample represents.
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.
Locks the surface that the sample represents.
Syntax
HRESULT LockMediaSamplePointer(void);
Return Value
Returns an HRESULT value.
Remarks
This method should be called only after calling GetSurfaceAndReleaseLock.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.