IMediaTransform::InitBufferManager

The InitBufferManager method passes a Direct3D device to your transform and enables your transform to perform any initialization it requires. This method is called when the object is first instantiated, as well as whenever the device is changed by Windows Movie Maker.

Syntax

HRESULT InitBufferManager(
  IBufferManager*  pManager
);

Parameters

pManager

[in]  Pointer to an IBufferManager interface.

Return Values

The method returns an HRESULT of S_OK for success, or a standard COM error code for failure.

Remarks

Your transform should use this method to create global objects that your transform might require or Direct3D device resources such as meshes or extra textures. Note that any handles to Direct3D objects that are stored as global members might need to be changed if Windows Movie Maker loses access to the device. Loss of device can occur if the user locks the desktop or if another application takes exclusive control of the video card, as some games do. When Windows Movie Maker gets access to a new device, it calls this method again, and the transform should reinitialize any stored Direct3D objects. When a device is lost for any reason, this method is called with a NULL pointer for pManager.

Requirements

Client: Windows Vista

Header: Include gputransformplugin.h and GPUPipelineTime.h.

Library: Use GPUPipelineVC7.lib (for Visual Studio .NET) or GPUPipelineVC8.lib (for Visual Studio 2005).

See Also