次の方法で共有


IWMVideoMediaProps::SetMaxKeyFrameSpacing method (wmsdkidl.h)

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The SetMaxKeyFrameSpacing method specifies the maximum interval between key frames.

Syntax

HRESULT SetMaxKeyFrameSpacing(
  [in] LONGLONG llTime
);

Parameters

[in] llTime

Maximum key-frame spacing in 100-nanosecond units.

Return value

This method always returns S_OK.

Remarks

A key frame is a video frame that can be rendered without any information being required from any previous frame. A delta frame is a frame that is dependent on a previous frame. The application can seek to a key frame, but not to a delta frame. The SDK does not enforce any limit on the time between key frames. In general, times longer than 30 seconds can adversely affect seek times both when the content is streamed over a network, and when it is played back locally. For recommended values, see Configuring Video Streams for Seeking Performance.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only],Windows Media Format 7 SDK, or later versions of the SDK
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wmsdkidl.h (include Wmsdk.h)
Library Wmvcore.lib

See also

IWMVideoMediaProps Interface

IWMVideoMediaProps::GetMaxKeyFrameSpacing