IMPEG2PIDMap::MapPID method (bdaiface.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The MapPID method maps one or more PIDs to the pin.

Syntax

HRESULT MapPID(
  [in] ULONG                culPID,
  [in] ULONG                *pulPID,
  [in] MEDIA_SAMPLE_CONTENT MediaSampleContent
);

Parameters

[in] culPID

The number of elements in the pulPID array.

[in] pulPID

Pointer to an array of size culPID, allocated by the caller. Each element in the array contains a PID to be mapped.

[in] MediaSampleContent

Variable of type MEDIA_SAMPLE_CONTENT that specifies the contents of the stream.

Return value

Returns S_OK if successful. If the method fails, it returns an HRESULT error code.

Remarks

There may be no more than 255 distinct PIDs mapped at any given time. This includes the PIDs that the Demux maps internally for its own use; this number varies depending on the transport stream. This limitation should not present a problem in practice, because applications will typically map no more than a dozen PIDs on any given transport stream.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header bdaiface.h
Library Strmiids.lib

See also

Error and Success Codes

IMPEG2PIDMap Interface