Microsoft DirectX 8.1 (C++)

IAMMultiMediaStream::Initialize

The Initialize method sets the stream type. If the pFilterGraph parameter is non-NULL, the filter graph passed in is used for the stream.

Syntax

HRESULT Initialize(
    STREAM_TYPE StreamType,
    DWORD dwFlags,
    IGraphBuilder *pFilterGraph
    );

Parameters

StreamType

[in] STREAM_TYPE enumeration value that specifies the new filter graph's stream type.

dwFlags

[in] Either contains the AMMSF_NOGRAPHTHREAD flag, which creates a filter graph object on the current thread, or zero.

pFilterGraph

[in] [optional] Pointer to an IGraphBuilder interface that will point to the new filter graph. This parameter is optional; only pass in a valid pointer if you must access the filter graph at a later time.

Return Value

Returns S_OK if successful or E_POINTER if one or more of the required parameters are NULL.

Remarks

Using the AMMSF_NOGRAPHTHREAD flag is safe provided the current thread does not exit before the stream object is released by the application and the current thread processes window messages.

See Also