MFCreatePMPMediaSession function
Creates an instance of the Media Session inside a Protected Media Path (PMP) process.
Syntax
HRESULT MFCreatePMPMediaSession( DWORD dwCreationFlags, IMFAttributes *pConfiguration, IMFMediaSession **ppMediaSession, IMFActivate **ppEnablerActivate );
Parameters
- dwCreationFlags
-
A member of the MFPMPSESSION_CREATION_FLAGS enumeration that specifies how to create the session object.
- pConfiguration
-
A pointer to the IMFAttributes interface. This parameter can be NULL. See Remarks.
- ppMediaSession
-
Receives a pointer to the PMP Media Session's IMFMediaSession interface. The caller must release the interface. Before releasing the last reference to the IMFMediaSession pointer, the application must call the IMFMediaSession::Shutdown method.
- ppEnablerActivate
-
Receives a pointer to the IMFActivate interface or the value NULL. If non-NULL, the caller must release the interface. See Remarks.
Return value
The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
|
The function succeeded. |
Remarks
You can use the pConfiguration parameter to set any of the following attributes:
- MF_SESSION_CONTENT_PROTECTION_MANAGER
- MF_SESSION_GLOBAL_TIME
- MF_SESSION_QUALITY_MANAGER
- MF_SESSION_REMOTE_SOURCE_MODE
- MF_SESSION_SERVER_CONTEXT
- MF_SESSION_TOPOLOADER
If this function cannot create the PMP Media Session because a trusted binary was revoked, the ppEnablerActivate parameter receives an IMFActivate interface pointer. The application can use this pointer to create a content enabler object, which can then be used to download an updated binary:
- Call IMFActivate::ActivateObject with the interface identifier IID_IMFContentEnabler to get an IMFContentEnabler interface pointer.
- Use that interface to download the updated binary.
- Call MFCreatePMPMediaSession again.
If the function successfully creates the PMP Media Session, the ppEnablerActivate parameter receives the value NULL.
Do not make calls to the PMP Media Session from a thread that is processing a window message sent from another thread. To test whether the current thread falls into this category, call InSendMessage.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also