Export (0) Print
Expand All
Expand Minimize

MFCreateMediaSession function

Creates the Media Session in the application's process.

Syntax


HRESULT MFCreateMediaSession(
  IMFAttributes *pConfiguration,
  IMFMediaSession **ppMS
);

Parameters

pConfiguration

Pointer to the IMFAttributes interface. This parameter can be NULL. See Remarks.

ppMS

Receives a pointer to the 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.

Return value

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

Return codeDescription
S_OK

The function succeeded.

 

Remarks

If your application does not play protected content, you can use this function to create the Media Session in the application's process. To use the Media Session for protected content, you must call MFCreatePMPMediaSession.

You can use the pConfiguration parameter to specify any of the following attributes:

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Mfidl.h

Library

Mf.lib

DLL

Mf.dll

See also

About the Media Session
Media Foundation Functions
Media Session
MFCreatePMPMediaSession

 

 

Community Additions

ADD
Show:
© 2014 Microsoft