次の方法で共有


IWMWriterPostViewCallback::OnPostViewSample 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 OnPostViewSample method is called when new postview data is available. The application implements this method.

Syntax

HRESULT OnPostViewSample(
  [in] WORD       wStreamNumber,
  [in] QWORD      cnsSampleTime,
  [in] QWORD      cnsSampleDuration,
  [in] DWORD      dwFlags,
  [in] INSSBuffer *pSample,
  [in] void       *pvContext
);

Parameters

[in] wStreamNumber

WORD containing the stream number.

[in] cnsSampleTime

Sample time, in 100-nanosecond units.

[in] cnsSampleDuration

Sample duration, in 100-nanosecond units. This will usually be 10000 (1 millisecond).

[in] dwFlags

DWORD containing none, one, or more of the following flags.

Flag Description
No flag set None of the conditions for the other flags applies. For example, a delta frame in most cases would not have any flags set for it.
WM_SF_CLEANPOINT This is basically the same as a key frame. It indicates a good point to go to during a seek, for example.
WM_SF_DISCONTINUITY The data stream has a gap in it, which could be due to a seek, a network loss, or some other reason. This can be useful extra information for an application such as a codec or renderer. The flag is set on the first piece of data following the gap.
WM_SF_DATALOSS Some data has been lost between the previous sample and the sample with this flag set.

[in] pSample

Pointer to an INSSBuffer interface on an object that contains the sample.

[in] pvContext

Generic pointer, for use by the application.

Return value

This method is implemented by the application. It should return S_OK.

Remarks

Postview data is available only for video.

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)

See also

IWMReaderCallback::OnSample

IWMWriterPostViewCallback Interface