ID3D11VideoContext::VideoProcessorSetStreamPixelAspectRatio Method

Sets the pixel aspect ratio for an input stream on the video processor.

Syntax

public:
void VideoProcessorSetStreamPixelAspectRatio(
         ID3D11VideoProcessor *pVideoProcessor,
         UINT StreamIndex,
         BOOL Enable,
         const DXGI_RATIONAL *pSourceAspectRatio,
         const DXGI_RATIONAL *pDestinationAspectRatio
)  

Parameters

pVideoProcessor
Type: ID3D11VideoProcessor *

[in] A pointer to the ID3D11VideoProcessor interface. To get this pointer, call ID3D11VideoDevice::CreateVideoProcessor.

StreamIndex
Type: UINT 

[in] The zero-based index of the input stream. To get the maximum number of streams, call ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps and check the MaxStreamStates structure member.

Enable
Type: BOOL 

[in] Specifies whether the pSourceAspectRatio and pDestinationAspectRatio parameters contain valid values. Otherwise, the pixel aspect ratios are unspecified.

pSourceAspectRatio
Type: DXGI_RATIONAL *

[in, optional] A pointer to a DXGI_RATIONAL structure that contains the pixel aspect ratio of the source rectangle. If Enable is FALSE, this parameter can be NULL.

pDestinationAspectRatio
Type: DXGI_RATIONAL *

[in, optional] A pointer to a DXGI_RATIONAL structure that contains the pixel aspect ratio of the destination rectangle. If Enable is FALSE, this parameter can be NULL.

Return value

None.

Remarks

This function can only be called if the driver reports the D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_PIXEL_ASPECT_RATIO capability. If this capability is not set, this function will have no effect.

Pixel aspect ratios of the form 0/n and n/0 are not valid.

The default pixel aspect ratio is 1:1 (square pixels).

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).