Partager via


ICodecAPI Interface

 
Microsoft DirectShow 9.0

ICodecAPI Interface

The ICodecAPI interface sets and retrieves settings on an encoder or decoder filter.

  • Note   This interface supersedes the IEncoderAPI interface, which has been deprecated.

In addition to the methods inherited from IUnknown, the ICodecAPI interface exposes the following methods.

Method Description
GetAllSettings Saves the current encoder settings to a stream.
GetDefaultValue Retrieves the default value for a parameter, if one exists.
GetParameterRange Returns the valid range of values for a parameter.
GetParameterValues Returns the list of supported values for a given parameter.
GetValue Retrieves the current value of a specified parameter.
IsModifiable Queries whether a parameter can be changed.
IsSupported Queries whether a given parameter is supported.
RegisterForEvent Registers the application to receive a specified event from the encoder.
SetAllDefaults Returns all parameters to their default values.
SetAllDefaultsWithNotify Returns all parameters to their default values, and returns a list of the settings that have changed.
SetAllSettings Loads encoder settings from a stream and sets them on the encoder.
SetAllSettingsWithNotify Loads encoder settings from a stream, sets them on the encoder, and returns a list of the settings that have changed.
SetValue Sets the value of a parameter.
SetValueWithNotify Sets the value of a parameter, and returns a list of other settings that have changed as a result.
UnregisterForEvent Unregisters the application for a specified encoder event.

Remarks

The IEncoderAPI interface defined a set of GUIDs that identify various encoder parameters. The ICodecAPI interface will also support these GUIDs, but it is expected that a broader list of supported GUIDs will be defined for use with this interface. Please refer to the IEncoderAPI documentation for the list of the previously defined GUIDs.

It is expected that encoders will store profile and capability information in the system registry. This will enable applications to query the device during device enumeration. Default profiles are stored in HLKM\Software\Classes\CLSID\<category>\Profiles. Each profile is a registry key whose default string is a text description of the profile. Each value has a GUID name, followed by a string value containing the numeric GUID value. For example:

  HLKM\Software\Classes\CLSID\<category>\Profiles\DVD
    default "HQ DVD"
    REG_SZ {...} = "0"
    REG_SZ {...} = "1234"

where {...} is a property GUID that the application can map into its user interface. Microsoft is currently considering the definition of a set of standard profiles.

Default codec capabilities are stored under HLKM\Software\Classes\CLSID\<category>\Instance\<Filter CLSID>\Capabilities. Each value has a GUID name, followed by a string value containing the numeric GUID value. For example:

HLKM\Software\Classes\CLSID\<category>\Instance\<My DVD encoder>\Capabilities
     default "My DVD encoder"
     REG_SZ_MULTI {...}

where {...} is a property GUID that the application can map into its user interface.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also