Compartilhar via


IDMOVideoOutputOptimizations (Compact 2013)

3/26/2014

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 optimizations.

SetOperationMode

Notifies the DMO of the optimization in effect.

GetCurrentOperationMode

Retrieves the optimizations that are in effect.

GetCurrentSampleRequirements

Retrieves the optimizations required to process the next sample, given the optimizations 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 optimizations 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

Header

dmo.h

Library

Dmoguid.lib

See Also

Reference

DMO Interfaces