Skip to main content

Windows Dev Center

IMFMediaEngine::GetCurrentSource method

Gets the URL of the current media resource, or an empty string if no media resource is present.

Syntax


HRESULT GetCurrentSource(
  [out] BSTR *ppUrl
);

Parameters

ppUrl [out]

Receives a BSTR that contains the URL of the current media resource. If there is no media resource, ppUrl receives an empty string. The caller must free the BSTR by calling SysFreeString.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This method corresponds to the currentSrc attribute of the HTMLMediaElement interface in HTML5.

Initially, the current media resource is empty. It is updated when the Media Engine performs the resource selection algorithm.

Windows Phone 8: This API is supported.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

Mfmediaengine.h

See also

IMFMediaEngine