ID3D11VideoContext::VideoProcessorSetStreamSourceRect method

Sets the source rectangle for an input stream on the video processor.


void VideoProcessorSetStreamSourceRect(
  [in]       ID3D11VideoProcessor *pVideoProcessor,
  [in]       UINT                 StreamIndex,
  [in]       BOOL                 Enable,
  [inconst RECT                 *pRect


pVideoProcessor [in]

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

StreamIndex [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 [in]

Specifies whether to apply the source rectangle.

pRect [in]

A pointer to a RECT structure that specifies the source rectangle. If Enable is FALSE, this parameter is ignored.

Return value

This method does not return a value.


The source rectangle is the portion of the input surface that is blitted to the destination surface. The source rectangle is given in pixel coordinates, relative to the input surface.

If this method is never called, or if the Enable parameter is FALSE, the video processor reads from the entire input surface.


Minimum supported client

Windows 8 [desktop apps | UWP apps]

Minimum supported server

Windows Server 2012 [desktop apps | UWP apps]

Minimum supported phone

Windows Phone 8



See also