IMF2DBuffer::GetScanline0AndPitch method

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

Syntax


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

Parameters

pbScanline0 [out]

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

plPitch [out]

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 codeDescription
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

Minimum supported client

Windows Vista [desktop apps | UWP apps]

Minimum supported server

Windows Server 2008 [desktop apps | UWP apps]

Header

Mfobjects.h (include Mfidl.h)

Library

Mfuuid.lib

See also

IMF2DBuffer
Media Buffers
Uncompressed Video Buffers

 

 

Show: