Skip to content

Latest commit

 

History

History
109 lines (89 loc) · 3.85 KB

nf-mfidl-imftrackedsample-setallocator.md

File metadata and controls

109 lines (89 loc) · 3.85 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:mfidl.IMFTrackedSample.SetAllocator
IMFTrackedSample::SetAllocator (mfidl.h)
Sets the owner for the sample.
IMFTrackedSample interface [Media Foundation]
SetAllocator method
IMFTrackedSample.SetAllocator
IMFTrackedSample::SetAllocator
SetAllocator
SetAllocator method [Media Foundation]
SetAllocator method [Media Foundation]
IMFTrackedSample interface
eb9ffeb3-60af-4cef-bbbc-f4be53d48df0
mf.imftrackedsample_setallocator
mfidl/IMFTrackedSample::SetAllocator
mf\imftrackedsample_setallocator.htm
mf
eb9ffeb3-60af-4cef-bbbc-f4be53d48df0
12/05/2018
IMFTrackedSample interface [Media Foundation],SetAllocator method, IMFTrackedSample.SetAllocator, IMFTrackedSample::SetAllocator, SetAllocator, SetAllocator method [Media Foundation], SetAllocator method [Media Foundation],IMFTrackedSample interface, eb9ffeb3-60af-4cef-bbbc-f4be53d48df0, mf.imftrackedsample_setallocator, mfidl/IMFTrackedSample::SetAllocator
mfidl.h
Windows
Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 [desktop apps \| UWP apps]
Strmiids.lib
Windows
19H1
IMFTrackedSample::SetAllocator
mfidl/IMFTrackedSample::SetAllocator
c++
APIRef
kbSyntax
COM
strmiids.lib
strmiids.dll
IMFTrackedSample.SetAllocator

IMFTrackedSample::SetAllocator

-description

Sets the owner for the sample.

-parameters

-param pSampleAllocator [in]

Pointer to the IMFAsyncCallback interface of a callback object. The caller must implement this interface.

-param pUnkState [in]

Pointer to the IUnknown interface of a state object, defined by the caller. This parameter can be NULL. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.

-returns

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
MF_E_NOTACCEPTING
The owner was already set. This method cannot be called twice on the sample.

-remarks

When this method is called, the sample holds an additional reference count on itself. When every other object releases its reference counts on the sample, the sample invokes the pSampleAllocator callback method. To get a pointer to the sample, call IMFAsyncResult::GetObject on the asynchronous result object given to the callback's IMFAsyncCallback::Invoke method.

After the callback is invoked, the sample clears the callback. To reinstate the callback, you must call SetAllocator again.

It is safe to pass in the sample's IMFSample interface pointer as the state object (pUnkState) for the callback. If pUnkState points to the sample, the SetAllocator method accounts for the additional reference count on pUnkState.

-see-also

IMFTrackedSample