Bewerken

Delen via


IKsDataTypeHandler::KsPrepareIoOperation method (ksproxy.h)

The KsPrepareIoOperation method initializes the extended header and prepares the media sample for an I/O operation.

Syntax

HRESULT KsPrepareIoOperation(
  [in, out] IMediaSample  *Sample,
  [in, out] PVOID         StreamHeader,
  [in]      KSIOOPERATION IoOperation
);

Parameters

[in, out] Sample

Pointer to the IMediaSample interface for the associated media sample.

[in, out] StreamHeader

Pointer to a buffer that contains the extended header information.

[in] IoOperation

Value that specifies the type of I/O operation. This value can be one of the following values from the KSIOOPERATION enumerated type:

Value Description
KsIoOperation_Write Write data to stream.
KsIoOperation_Read Read data from stream.

Return value

Returns NOERROR if successful; otherwise, returns an error code. If the stream's major type is KSDATAFORMAT_TYPE_AUDIO, a KsPrepareIoOperation call is inapplicable, so KsPrepareIoOperation automatically returns NOERROR.

Remarks

The client only calls KsPrepareIoOperation if the data type handler indicated to the client the existence of extended header information in a call to the IKsDataTypeHandler::KsQueryExtendedSize method.

For more information about IMediaSample, see the Microsoft Windows SDK documentation.

Requirements

Requirement Value
Target Platform Desktop
Header ksproxy.h (include Ksproxy.h)

See also

IKsDataTypeHandler::KsQueryExtendedSize