共用方式為


IControlOutputSize::GetOutputSize method

The GetOutputSize method is called by Windows Movie Maker to let the transform evaluate (and modify) the output buffer size that Windows Movie Maker intends to allocate for the next call to IMediaTransform::Process. Windows Movie Maker calls this method before each call to IMediaTransform::Process.

Syntax

HRESULT GetOutputSize(
  [in]  PIPELINE_TIME timeGet,
  [in]  PIPELINE_TIME timeDuration,
  [in]  VIDEO_SIZE    *rgSizeIn,
  [in]  int           nSizeCount,
  [out] VIDEO_SIZE    *pOutSize
);

Parameters

timeGet [in]

The frame time when the next IMediaTransform::Process call will be made, on the absolute timeline (where 0 is the start of the video).

timeDuration [in]

The duration of the whole transform.

rgSizeIn [in]

An array of VIDEO_SIZE structures that describe the input buffers that Windows Movie Maker will send to its next call to IMediaTransform::Process. One structure will be sent for each input buffer. The number of structures is specified by nSizeCount.

nSizeCount [in]

The number of elements allocated by Windows Movie Maker in rgSizeIn.

pOutSize [out]

A single VIDEO_SIZE structure that the transform should use to specify the output buffer size it will require. If the transform does not need to specify a size, it should return a failure value for this method.

Return value

If the transform has specified a size for pOutSize, it should return S_OK; if it has not specified a size, it should return a failure code.

Remarks

This method is not needed by most transforms.

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
GPUPipelineTime.h
Library
GPUPipelineVC8.lib (Visual Studio 2005);
GPUPipelineVC7.lib (Visual Studio .NET)

See also

ISurface Interface