共用方式為


IAMStreamSelect::Enable

 
Microsoft DirectShow 9.0

IAMStreamSelect::Enable

The Enable method enables or disables a given stream.

Syntax

  HRESULT Enable(
  long lIndex,
  DWORD dwFlags
);

Parameters

lIndex

[in] Zero-based index of the stream.

dwFlags

[in] Flag indicating whether to enable or disable the stream. Use one of the following values.

Value Description
Zero Disable all streams in the group containing this stream.
AMSTREAMSELECTENABLE_ENABLE Enable only this stream within the given group and disable all others.
AMSTREAMSELECTENABLE_ENABLEALL Enable all streams in the group containing this stream.

Return Values

Returns an HRESULT value. Possible values include the following.

Value Description
E_FAIL Failure.
E_INVALIDARG Invalid stream ID.
E_NOTIMPL The filter does not support the specified flag.
S_OK Success.
VFW_E_NOT_CONNECTED The pins are not connected.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also