LEADTOOLS Media Foundation Help > LEADTOOLS Media Foundation Features > Media Foundation Function References > IltmfPlay Interface > IltmfPlay::GetPreferredMediaSourceHandler |
#include "ltmf.h"
C Syntax |
HRESULT IltmfPlay_GetPreferredMediaSourceHandler(pPlay, MediaSourceHandlerType, pVal) |
C++ Syntax |
HRESULT GetPreferredMediaSourceHandler(MediaSourceHandlerType, pVal) |
IltmfPlay *pPlay; |
/* pointer to an interface */ |
long MediaSourceHandlerType |
/* value to a media source handler type */ |
BSTR *pVal; |
/* pointer to a string */ |
Retrieves the preferred media source handler's GUID set using IltmfPlay::SetPreferredMediaSourceHandler.
Parameter |
Description |
pPlay |
Pointer to an IltmfPlay interface. |
MediaSourceHandlerType |
Value that indicates the media source handler type. For a list of possible values, refer to ltmfPlay_PreferredMediaSourceHandler Constants. |
pVal |
Pointer to a string to be updated with the media source handler's GUID. For a list of possible values, refer to ltmfMediaSourceHandler Constants. |
Returns
S_OK |
The function was successful. |
<> S_OK |
An error occurred. Refer to the Error Codes or the HRESULT error codes in the MediaFoundation documentation. |
Comments
This method can be used to determine whether a preferred media source handler has been set by IltmfPlay::SetPreferredMediaSourceHandler. It will return NULL (if no preferred filter has been set) or a GUID indicating the preferred media source handler.
This GUID uniquely identifies the media source handler. Every media format has a registered media source handler(s) who are responsible of creating a media source for this media type.
For example, the GUID for the LEAD MPEG2 Transport Media Source Handler is:
EFE626C3-0A2C-49FA-8A01-3768B559B6DA
If the method succeeds, the caller must free the returned string by calling the SysFreeString function.
A list of display names for common LEAD filters can be found in ltmfMediaSourceHandler Constants.
Please see IltmfPlay::SetPreferredMediaSourceHandler for more information on media source handler GUID.
Required DLLs and Libraries
LTMF For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64
See Also
Elements: |
|
Topics: |
|
|
Example
For a C++ example, refer to IltmfPlay::SetPreferredMediaSourceHandler Example for C++.