MFOffset structure (mfobjects.h)

Specifies an offset as a fixed-point real number.

Syntax

typedef struct _MFOffset {
  WORD  fract;
  short value;
} MFOffset;

Members

fract

The fractional part of the number.

value

The integer part of the number.

Remarks

The value of the number is value + (fract / 65536.0f).

Examples

MFOffset MakeOffset(float v)
{
    MFOffset offset;
    offset.value = short(v);
    offset.fract = WORD(65536 * (v-offset.value));
    return offset;
}

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Header mfobjects.h (include Mfidl.h)

See also

Media Foundation Structures