Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method notifies the DMO of the optimizations in effect.

Syntax

HRESULT SetOperationMode(
  ULONG 
ulOutputStreamIndex,
  DWORD 
dwEnabledFeatures
);

Parameters

ulOutputStreamIndex

Zero-based index of an output stream on the DMO.

dwEnabledFeatures

Bitwise combination of zero or more flags from the DMO_VIDEO_OUTPUT_STREAM_FLAGSenumeration.

Return Value

Returns an HRESULTvalue. Possible values include the following.

Value Description

S_OK

Success

DMO_E_INVALIDSTREAMINDEX

Invalid stream index

E_INVALIDARG

Invalid argument

Remarks

Before calling this method, call the IDMOVideoOutputOptimizations::QueryOperationModePreferencesmethod to determine which optimizations the DMO requests. Then call this method to inform the DMO about which optimization you are providing.

If you are not providing an optimization, it is not necessary to call this method. The DMO does not assume that any optimization will be provided.

The application must provide all optimizations it has agreed to. However, for some optimizations the DMO might not require the optimization on every sample.

To determine if the DMO can dispense with optimizations on the next sample, call the IDMOVideoOutputOptimizations::GetCurrentSampleRequirementsmethod. In effect, this enables the DMO to waive an agreed-on optimization for one sample.

Before streaming begins, subsequent calls to this method override earlier calls. To set multiple optimizations, you must do so in a single method call. Once streaming begins, this method returns an error. Streaming begins when the applications calls IMediaObject::ProcessInputon at least one input stream.

When streaming ends, the application can renegotiate the optimizations. Streaming ends if the application calls the IMediaObject::Flushmethod or if the application calls IMediaObject::Discontinuityon all the input streams and then processes all of the remaining output.

Requirements

Header dmo.h
Library Dmoguid.lib
Windows Embedded CE Windows CE .NET 4.1 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also