다음을 통해 공유


IMpeg2Stream::Initialize method (mpeg2data.h)

[The feature associated with this page, Microsoft TV Technologies, is a legacy feature. Microsoft strongly recommends that new code does not use this feature.]

The Initialize method initializes the MPEG2Stream object. This method should be called once, immediately after creating the object. The IMpeg2Data::GetStreamOfSections method calls this method internally, so typically an application will not call it.

Syntax

HRESULT Initialize(
  [in] MPEG_REQUEST_TYPE requestType,
  [in] IMpeg2Data        *pMpeg2Data,
  [in] PMPEG_CONTEXT     pContext,
  [in] PID               pid,
  [in] TID               tid,
  [in] PMPEG2_FILTER     pFilter,
  [in] HANDLE            hDataReadyEvent
);

Parameters

[in] requestType

Specifies the request type, as an MPEG_REQUEST_TYPE value.

[in] pMpeg2Data

Pointer to the IMpeg2Data interface of the MPEG-2 Sections and Tables filter.

[in] pContext

Pointer to an MPEG_CONTEXT structure. This structure indicates the MPEG-2 source.

[in] pid

Specifies a packet identifier (PID), indicating which packets in the transport stream are requested.

[in] tid

Specifies a table identifier (TID), indicating which table sections to retrieve.

[in] pFilter

Optional pointer to an MPEG2_FILTER structure. The caller can use this parameter to exclude packets based on additional MPEG-2 header fields. This parameter can be NULL.

[in] hDataReadyEvent

Handle to an event. The filter signals this event whenever it receives new data.

Return value

The method returns an HRESULT. Possible values include those in the following table.

Return code Description
E_INVALIDARG
Invalid or NULL pointer argument.
E_OUTOFMEMORY
Insufficient memory.
MPEG2_E_ALREADY_INITIALIZED
The method has been called on this object already.
S_OK
The method succeeded.

Requirements

Requirement Value
Target Platform Windows
Header mpeg2data.h

See also

IMpeg2Stream Interface