IltmmPlay::GetPreferredFilter

Summary

Retrieves the preferred filter display name set using IltmmPlay::SetPreferredFilter.

Syntax

#include "ltmm.h"

Language Syntax
C HRESULT IltmmPlay_GetPreferredFilter(pPlay, FilterType, pVal)
C++ HRESULT GetPreferredFilter(FilterType, pVal)

Parameters

IltmmPlay *pPlay

Pointer to an IltmmPlay interface.

long FilterType

Value that indicate the filter type. For a list of possible values, refer to lltmmPlay_PreferredFilter Constants.

BSTR *pVal

Pointer to a string to be updated with the filter display name.

Returns

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 DirectShow documentation.

Comments

This method can be used to determine whether a preferred filter has been set by IltmmPlay::SetPreferredFilter. It returns either NULL (if no preferred filter has been set), or a display name indicating the preferred filter.

A display name uniquely identifies the filter. Display names have the following format:

@device:sw:GUID\GUID

For example, the display name for the LEAD MPEG2 Transport Demultiplexer is:

@device:sw:{083863F1-70DE-11D0-BD40-00A0C911CE86}\{E2B7DF1A-38C5-11D5-91F6-00104BDB8FF9}

Note that there is a single backslash between the two GUIDs. But if you enter this as a C/C++ string, you would need to use two backslashes since '\' is an escape character in C/C++ strings.

If the method succeeds, the caller must free the returned string by calling the SysFreeString function.

A list of display names for common filters can be found in ltmmFilter Constants.

Refer to IltmmPlay::SetPreferredFilter for more information on filter display names.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

Language Example
C++ IltmmPlay::SetPreferredFilter
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Multimedia C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.