Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
[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.]
The InitializeOutputSample method retrieves a new output sample and initializes it.
Syntax
HRESULT InitializeOutputSample(
IMediaSample *pSample,
IMediaSample **ppOutSample
);
Parameters
-
pSample
-
Pointer to the input sample's IMediaSample interface.
-
ppOutSample
-
Receives a pointer to the output sample's IMediaSample interface.
Return value
Returns S_OK or another HRESULT value.
Remarks
This method is called by the CTransformFilter::Receive method to prepare the output sample. Generally you do not have to call this method in your derived class, unless you override the Receive method.
This method retrieves a new sample from the output pin's allocator. Then it copies the sample properties from the input sample to the output sample. The sample properties are defined in the AM_SAMPLE2_PROPERTIES structure.
Requirements
| Requirement | Value |
|---|---|
| Header |
|
| Library |
|