Поделиться через


IMPEG2StreamIdMap::MapStreamId

 
Microsoft DirectShow 9.0

IMPEG2StreamIdMap::MapStreamId

The MapStreamId method maps the Stream ID of an elementary stream within an MPEG-2 program stream to a media content type and substream filtering information.

Syntax

  HRESULT MapStreamId(
  ULONG ulStreamId,
  DWORD MediaSampleContent,
  ULONG ulSubstreamFilterValue,
  int iDataOffset
);

Parameters

ulStreamId

[in] Variable of type ULONG that specifies the stream ID of the PES stream.

MediaSampleContent

[in] Variable of type ULONG that specifies the contents of the stream. Currently the only value supported is MPEG2_PROGRAM_ELEMENTARY_STREAM (defined as 0x00000001 in axextend.idl).

ulSubstreamFilterValue

[in] Variable of type ULONG that specifies which substream within this elementary stream to pass on to the downstream decoder. Only the low-order byte can contain a valid filter value. If iDataOffset = 0, this parameter is ignored.

iDataOffset

[in] Variable of type int that specifies the byte offset into the payload at which the substream begins.

Return Value

Returns S_OK if successful. If the method fails, an error code is returned. If a Stream ID of MEDIA_PROGRAM_STREAM_MAP, MEDIA_PROGRAM_DIRECTORY_PES_PACKET or MEDIA_PROGRAM_PACK_HEADER is attempted, this method returns E_NOTIMPL.

Remarks

The Stream ID mapped by this method is the stream ID in the PES header. Substream filtering is most commonly used to provide multiple channels on a single audio stream.

Requirements

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

Library: Use Strmiids.lib.

See Also