IDMOVideoOutputOptimizations

This interface supports video optimizations on a Microsoft DirectX Media Object (DMO).

The following table shows the methods for IDMOVideoOutputOptimizations in the order the compiler calls them.

Method Description
QueryOperationModePreferences Retrieves the DMO's preferred optimization features.
SetOperationMode Notifies the DMO of the optimization features in effect.
GetCurrentOperationMode Retrieves the optimization features in effect.
GetCurrentSampleRequirements Retrieves the optimization features required to process the next sample, given the features already agreed to by the application.

The IDMOVideoOutputOptimizations interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

Remarks

This interface enables an application to negotiate with a DMO about video output optimizations. A DMO exposes this interface when it can perform optimizations that require support from the application. The application can query the DMO for its preferred features and then agree (or not agree) to provide them. The DMO must process output even if the application rejects the optimizations.

For example, a video decoder might generate an output frame by applying deltas to the previous output frame. When queried, it requests that the application supply the previous frame in the output buffer. The application can agree to this request or not.

Video optimizations are negotiated separately for each output stream.

The following pseudocode shows how an application might negotiate with the DMO.

IDMOVideoOutputOptimizations *pVidOpt;
 // Query the DMO for IDMOVideoOutputOptimizations (not shown).
 
BOOL  bWantsPreviousBuffer = FALSE;
 DWORD wFlags;
 pVidOpt->QueryOperationModePreferences(0,&dwFlags);
 
if (dwFlags & DMO_VOSF_NEEDS_PREVIOUS_SAMPLE) 
{
    // Agree to the request.      
    pVidOpt->SetOperationMode(0, DMO_VOSF_NEEDS_PREVIOUS_SAMPLE);
    bWantsPreviousBuffer = TRUE;
 }

// Processing loop
while (there is input)
 {
    ProcessInput(0, ...);
    if (bWantsPreviousBuffer)
        pDMO->ProcessOutput(0, ...) // Use the same buffer as last time.
    else
        pDMO->ProcessOutput(0, ...) // OK to use a new buffer.
 }   

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Dmo.h.
Link Library: Dmoguid.lib.

See Also

DMO Interfaces

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.