Bewerken

Delen via


IKsDataTypeCompletion::KsCompleteMediaType method (ksproxy.h)

The KsCompleteMediaType method completes a partially-specified media type that was first presented to the IAMStreamConfig::SetFormat method.

Syntax

HRESULT KsCompleteMediaType(
  [in]      HANDLE        FilterHandle,
  [in]      ULONG         PinFactoryId,
  [in, out] AM_MEDIA_TYPE *AmMediaType
);

Parameters

[in] FilterHandle

Handle to the underlying KS filter.

[in] PinFactoryId

Identifier of the pin factory against which the media type is being completed.

[in, out] AmMediaType

Pointer to a AM_MEDIA_TYPE structure that describes the format of the media samples. KsCompleteMediaType receives partially specified media samples, completes the specification, and returns.

Return value

Returns NOERROR if successful and the media type was completed; otherwise, returns an error code.

Remarks

The KsCompleteMediaType method is primarily used for video media types, in which the biSizeImage member of the KS_BITMAPINFOHEADER structure is known only to the driver, because of the private compression formats supported. If required, the data type handler can query the underlying KS filter in order to complete the given media type.

When the proxy creates an instance of the data type handler for purposes of completing a media type, the proxy passes the media type to the IKsDataTypeHandler::KsSetMediaType method to first initialize this data type handler to the particular media type.

For more information about IAMStreamConfig::SetFormat and AM_MEDIA_TYPE, see the Microsoft Windows SDK documentation.

Requirements

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

See also

IKsDataTypeHandler::KsSetMediaType

KS_BITMAPINFOHEADER