IAMTimelineGroup::SetSmartRecompressFormat

 
Microsoft DirectShow 9.0

IAMTimelineGroup::SetSmartRecompressFormat

The SetSmartRecompressFormat method specifies a video compression format to use for smart recompression .

Smart recompression is not supported for audio groups.

Syntax

  HRESULT SetSmartRecompressFormat(
    long *pFormat
);

Parameters

pFormat

Pointer to a structure describing the compression format. Currently, only the SCompFmt0 structure is valid. You must cast this parameter to a pointer of type long.

Return Value

Returns one of the following HRESULT values:

Return code Description
S_OK Success.
E_POINTER NULL pointer argument.
E_INVALIDARG Invalid argument.

Remarks

Before calling this method, call the IAMTimelineGroup::SetMediaType method on the same group, to specify an uncompressed format.

If the SetSmartRecompressFormat method succeeds, you can use the Smart Render Engine to output a compressed video stream. The compressed video will have the width, height, and frame rate that was specified in the pFormat parameter. These values will override those given for the uncompressed format in the SetMediaType method. However, to get the benefits of smart recompression, the two formats should match. In other words, the compressed and uncompressed formats should have the same height, width, and frame rate.

If the Smart Render Engine is unable to produce the compressed format, it will produce an uncompressed video stream instead. If that occurs, the Smart Render Engine reports a DEX_IDS_CANT_FIND_COMPRESSOR rendering error during the IRenderEngine::ConnectFrontEnd method. The application can catch this error through the IAMErrorLog::LogError method. (For more information, see Logging Errors and Rendering Errors.)

The smart recompression format is not persistent. If an application uses smart recompression, it must set the recompression format whenever it loads a project file.

Requirements

Header: Include Qedit.h. This header file is not compatible with Microsoft® Direct3D® headers later than version 7.

Library: Use strmiids.lib.

See Also