The IAMStreamSelect interface controls which logical streams are played and retrieves information about them.
When to Implement
Implement this interface on your filter when you want to enable selection of logical streams and provide information about them. An example of logical stream selection is selection from a set of audio streams that encode different national languages. Perhaps you could choose English from among a set of audio streams that include English, German, and French. The MPEG splitter implements this interface.
When to Use
Use this interface when you want to select between available streams; for example, when you want to select the streams for a particular locale.
Methods in Vtable Order
| IUnknown methods | Description |
| QueryInterface | Retrieves pointers to supported interfaces. |
| AddRef | Increments the reference count. |
| Release | Decrements the reference count. |
| IAMStreamSelect methods | Description |
| Count | Retrieves the total count of available streams. |
| Info | Retrieves information about a given stream. |
| Enable | Enables or disables a given stream. |
Retrieves the total count of available streams.
HRESULT Count(
DWORD *pcStreams
);
Returns an HRESULT value that depends on the implementation of the interface. The current DirectShow implementation returns S_OK.
Enables or disables a given stream.
HRESULT Enable(
long lIndex,
DWORD dwFlags
);
| Value | Meaning |
| 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. |
Returns an HRESULT value that depends on the implementation of the interface. The current DirectShow implementation returns E_NOTIMPL if support for the specified flag has not been implemented, E_INVALIDARG if the stream ID is invalid, or S_OK otherwise.
Retrieves information about a given stream.
HRESULT Info(
long lIndex,
AM_MEDIA_TYPE **ppmt,
DWORD *pdwFlags,
LCID *plcid,
DWORD *pdwGroup,
WCHAR **ppszName,
IUnknown **ppObject,
IUnknown **ppUnk
);
| Value | Meaning |
| Zero | Disable this stream. |
| AMSTREAMSELECTINFO_ENABLED | Enable the stream. |
| AMSTREAMSELECTINFO_EXCLUSIVE | Turns off the other streams in the group when enabling this one. |
Returns an HRESULT value that depends on the implementation of the interface. The current DirectShow implementation returns S_FALSE if lIndex is out of range, or S_OK otherwise.
The first stream in each group is the default.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.