Loads the current media source.
This method has no parameters.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
The main purpose of this method is to reload a list of source elements after updating the list. For more information, see SetSourceElements. Otherwise, calling this method is generally not required. To load a new media source, call IMFMediaEngine::SetSource or IMFMediaEngine::SetSourceElements.
The Load method explictly invokes the Media Engine's media resource loading algorithm. Before calling this method, you must set the media resource by calling IMFMediaEngine::SetSource or IMFMediaEngine::SetSourceElements.
This method completes asynchronously. When the Load operation starts, the Media Engine sends an MF_MEDIA_ENGINE_EVENT_LOADSTART event. If no errors occur during the Load operation, several other events are generated, including the following.
If the Media Engine is unable to load the file, the Media Engine sends an MF_MEDIA_ENGINE_EVENT_ERROR event.
For more information about event handling in the Media Engine, see IMFMediaEngineNotify.
This method corresponds to the load method of the HTMLMediaElement interface in HTML5.
Minimum supported client
|Windows 8 [desktop apps | Windows Store apps]|
Minimum supported server
|Windows Server 2012 [desktop apps | Windows Store apps]|