Share via


IMediaObjectInPlace::Process

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method processes a block of data. The application supplies a pointer to a block of input data, and the DMO processes the data in place.

Syntax

HRESULT Process(
  ULONG ulSize,
  BYTE* pData
  REFERENCE_TIME refTimeStart,
  DWORD dwFlags
);

Parameters

  • ulSize
    [in] Size of the data, in bytes.
  • pData
    [in, out] Pointer to a buffer of size ulSize. On input, the buffer holds the input data. If the method returns successfully, the buffer contains the output data.
  • refTimeStart
    [in] Start time of the data.
  • dwFlags
    [in] Either DMO_INPLACE_NORMAL or DMO_INPLACE_ZERO. See the Remarks section for more information.

Return Value

Returns an HRESULT value. Possible values include the following.

Value Description

S_FALSE

Success. There is still data to process.

S_TRUE

No output to process

E_FAIL

Failure

Remarks

If the method fails, the buffer might contain garbage. The application should not use the contents of the buffer.

The DMO might produce output data beyond the length of the input data. This is called an effect tail. For example, a reverb effect continues after the input reaches silence. If the DMO has an effect tail, this method returns S_FALSE.

While the application has input data for processing, call the Process method with the dwFlags parameter set to DMO_INPLACE_NORMAL.

If the last such call returns S_FALSE, call Process again, this time with a zeroed input buffer and the DMO_INPLACE_ZERO flag. The DMO will fill the zeroed buffer with the effect tail. Continue calling Process in this way until the return value is S_TRUE, indicating that the DMO has finished processing the effect tail.

If the DMO has no effect tail, this method always returns S_TRUE or an error code.

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

Reference

IMediaObjectInPlace