IMFSampleProtection::InitOutputProtection method
Retrieves initialization information for sample protection from the upstream component.
Syntax
HRESULT InitOutputProtection( [in] DWORD dwVersion, [in] DWORD dwOutputId, [in] BYTE *pbCert, [in] DWORD cbCert, [out] BYTE **ppbSeed, [out] DWORD *pcbSeed );
Parameters
- dwVersion [in]
-
Specifies the version number of the sample protection scheme. The version number is specified as a SAMPLE_PROTECTION_VERSION enumeration value.
- dwOutputId [in]
-
Identifier of the output stream. The identifier corresponds to the output stream identifier returned by the IMFTransform interface.
- pbCert [in]
-
Pointer to a certificate provided by the downstream component.
- cbCert [in]
-
Size of the certificate, in bytes.
- ppbSeed [out]
-
Receives a pointer to a buffer that contains the initialization information for downstream component. The caller must free the memory for the buffer by calling CoTaskMemFree.
- pcbSeed [out]
-
Receives the size of the ppbSeed buffer, in bytes.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
|
The method succeeded. |
|
Not implemented. |
Remarks
This method must be implemented by the upstream component. The method fails if the component does not support the requested sample protection version. Downstream components do not implement this method and should return E_NOTIMPL.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
See also