Partager via


CTransformFilter::Transform

 
Microsoft DirectShow 9.0

CTransformFilter::Transform

The Transform method transforms an input sample to produce an output sample.

Syntax

  virtual HRESULT Transform(
    IMediaSample *pIn,
    IMediaSample *pOut
);

Parameters

pIn

Pointer to the input sample's IMediaSample interface.

pOut

Pointer to the output sample's IMediaSample interface.

Return Value

The base class returns E_UNEXPECTED.

The derived class should return an HRESULT value, indicating success or failure. Possible values include those shown in the following table.

Value Description
S_FALSE Do not deliver this sample.
S_OK Success.

Remarks

Override this method to produce output data. Read the input data from the sample specified by the pIn parameter, and write the new data into the sample specified by the pOut parameter.

Before the filter calls this method, it copies the properties from the input sample to the output sample. The Transform method should set any properties that differ between the two samples, using IMediaSample methods or the IMediaSample2 interface (if available).

If the filter should not deliver this sample (for example, to support quality control), the method should return S_FALSE.

Requirements

**  Header:** Declared in Transfrm.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also