IAMTimelineGroup::SetSmartRecompressFormat method
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
Note
[Deprecated. This API may be removed from future releases of Windows.]
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
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
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.
Note
The header file Qedit.h is not compatible with Direct3D headers later than version 7.
Note
To obtain Qedit.h, download the Microsoft Windows SDK Update for Windows Vista and .NET Framework 3.0. Qedit.h is not available in the Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also