IMF2DBuffer::GetScanline0AndPitch method (mfobjects.h)

Retrieves a pointer to the buffer memory and the surface stride.

Syntax

HRESULT GetScanline0AndPitch(
  [out] BYTE **pbScanline0,
  [out] LONG *plPitch
);

Parameters

[out] pbScanline0

Receives a pointer to the first byte of the top row of pixels in the image.

[out] plPitch

Receives the stride, in bytes. For more information, see Image Stride.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
ERROR_INVALID_FUNCTION
You must lock the buffer before calling this method.

Remarks

Before calling this method, you must lock the buffer by calling IMF2DBuffer::Lock2D. The pointer returned in plPitch is valid only while the buffer remains locked.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header mfobjects.h (include Mfidl.h)
Library Mfuuid.lib

See also

IMF2DBuffer

Media Buffers

Uncompressed Video Buffers