How Windows Movie Maker Interacts with Your Transform

All transforms must implement the IMediaTransform interface, which is the main communication channel between Windows Movie Maker and the transform. In addition, transforms can optionally implement the INotifySeek interface to receive seek notifications from Windows Movie Maker, and the IControlOutputSize interface to enable Windows Movie Maker to alternate output buffer sizes when producing output frames.

On startup, Windows Movie Maker looks in specially designated folders for all third-party XML initialization files, and then loads them. Each XML file specifies one or more effects or transitions loaded from one or more registered DLLs, and specifies a name, image, and zero or more parameters for each. These images and names are shown in the lists of available effects and transitions in Windows Movie Maker's user interface. The transform DLL is not actually loaded at this time. For more information on the contents of the XML initialization files, see Creating Custom Transforms Using XML.

When a user chooses a transform in the Windows Movie Maker user interface and then previews or renders video, Windows Movie Maker loads the appropriate DLL and makes the following calls on the transform:

  1. Windows Movie Maker calls the transform's constructor. If the transform needs to get any parameters from an initialization XML file, it should call the CreateTransformProperties function with the ITransformProperties member it implements.
  2. Windows Movie Maker calls IMediaTransform::get_InputCount and IMediaTransform::get_MediaType to get the number of input streams and the media types that will be accepted by the transform. A transform can have either one or two input streams, but only one output stream.
  3. Windows Movie Maker calls IMediaTransform::QueryBufferRequirements to get the transform's requirements for the input and output buffers that Windows Movie Maker will send to it.
  4. Windows Movie Maker calls IMediaTransform::InitBufferManager to let the transform perform any setup it needs to on a device.
  5. Windows Movie Maker calls IMediaTransform::Process repeatedly. This method passes in the data from the input streams and waits for the transform to modify and send out the new data. A transform receives either one or two streams, depending on the type, and returns only one stream. All input and output buffers are allocated by Windows Movie Maker. For more information on this method, see the reference page for IMediaTransform::Process.
  6. If the device changes, for some reason (for example, if the user locks the desktop or if system resources are taken away), Windows Movie Maker will call IMediaTransform::InitBufferManager again with the new device.

See Also

Show: