Retrieves the preferred media source handler's GUID set using IltmfConvert::SetPreferredMediaSourceHandler.
#include "ltmf.h"
Language | Syntax |
---|---|
C | HRESULT IltmfConvert_GetPreferredMediaSourceHandler(pConvert, MediaSourceHandlerType, pVal) |
C++ | HRESULT GetPreferredMediaSourceHandler(MediaSourceHandlerType, pVal) |
Pointer to an IltmfConvert interface.
Value that indicates the media source handler type. For a list of possible values, refer to ltmfConvert_PreferredMediaSourceHandler Constants.
Pointer to a string to be updated with the media source handler's GUID. For a list of possible values, refer to ltmfMediaSourceHandler Constants.
Value | Meaning |
---|---|
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. |
This function can be used to determine whether a preferred media source handler has been set by IltmfConvert::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 function 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 IltmfConvert::SetPreferredMediaSourceHandler for more information on media source handler GUID.
Win32, x64.
For a C++ example, refer to .IltmfConvert::SetPreferredMediaSourceHandler Example for C++
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document