Sets a list of media sources.
HRESULT SetSourceElements( [in] IMFMediaEngineSrcElements *pSrcElements );
- pSrcElements [in]
A pointer to the IMFMediaEngineSrcElements interface. The caller must implement this interface.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
This method corresponds to adding a list of source elements to a media element in HTML5.
The Media Engine tries to load each item in the pSrcElements list, until it finds one that loads successfully. After this method is called, the application can use the IMFMediaEngineSrcElements interface to update the list at any time. To reload the list, call IMFMediaEngine::Load.
This method completes asynchronously. When the 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 a URL, it sends an MF_MEDIA_ENGINE_EVENT_ERROR event.
For more information about event handling in the Media Engine, see IMFMediaEngineNotify.
If the application also calls IMFMediaEngine::SetSource, the URL passed to SetSource takes precedence over the list given to SetSourceElements.
Minimum supported client
Windows 8 [desktop apps | Windows Store apps]
Minimum supported server
Windows Server 2012 [desktop apps | Windows Store apps]