Export (0) Print
Expand All

WMT_VIDEOIMAGE_SAMPLE2 structure

The WMT_VIDEOIMAGE_SAMPLE2 structure describes a sample for a Video Image stream. This structure must be used, either alone or with an accompanying image, in each sample passed to the writer for a Video Image stream. For more information, see Writing Video Image Samples.

Syntax


typedef struct __WMT_VIDEOIMAGE_SAMPLE2 {
  DWORD dwMagic;
  DWORD dwStructSize;
  DWORD dwControlFlags;
  DWORD dwViewportWidth;
  DWORD dwViewportHeight;
  DWORD dwCurrImageWidth;
  DWORD dwCurrImageHeight;
  FLOAT fCurrRegionX0;
  FLOAT fCurrRegionY0;
  FLOAT fCurrRegionWidth;
  FLOAT fCurrRegionHeight;
  FLOAT fCurrBlendCoef;
  DWORD dwPrevImageWidth;
  DWORD dwPrevImageHeight;
  FLOAT fPrevRegionX0;
  FLOAT fPrevRegionY0;
  FLOAT fPrevRegionWidth;
  FLOAT fPrevRegionHeight;
  FLOAT fPrevBlendCoef;
  DWORD dwEffectType;
  DWORD dwNumEffectParas;
  FLOAT fEffectPara0;
  FLOAT fEffectPara1;
  FLOAT fEffectPara2;
  FLOAT fEffectPara3;
  FLOAT fEffectPara4;
  BOOL  bKeepPrevImage;
} WMT_VIDEOIMAGE_SAMPLE2;

Members

dwMagic

Reserved. You must set this member to WMT_VIDEOIMAGE_MAGIC_NUMBER_2.

dwStructSize

Size of the structure. Set to sizeof(WMT_VIDEOIMAGE_SAMPLE2).

dwControlFlags

Specifies the type of sample. Use one or more of the flags in the following table, combined with the bitwise OR operator (|):

FlagDescription
WMT_VIDEOIMAGE_SAMPLE_INPUT_FRAMEIndicates that the sample contains an input image. The image data must be included in the sample immediately following the structure. The format of the image must conform to the values set in the input properties for the stream.
WMT_VIDEOIMAGE_SAMPLE_OUTPUT_FRAMEIndicates that the sample should result in a unique output frame in the stream. If this flag is not set, the remainder of the members of the structure are ignored and the frame in the stream will be a duplicate of the previous frame.
WMT_VIDEOIMAGE_SAMPLE_USES_CURRENT_INPUT_FRAMEIndicates that the sample is based, either solely or in part, on the current image. If this flag is set, the first set of value members will be used (those with names containing the string "Curr"). This flag is not valid unless used in combination with WMT_VIDEOIMAGE_SAMPLE_OUTPUT_FRAME.
WMT_VIDEOIMAGE_SAMPLE_USES_PREVIOUS_INPUT_FRAMEIndicates that the sample is based, either solely or in part, on the previous image. If this flag is set, the second set of value members will be used (those with names containing the string "Prev"). This flag is not valid unless used in combination with WMT_VIDEOIMAGE_SAMPLE_OUTPUT_FRAME.

 

dwViewportWidth

Width of the output frame.

dwViewportHeight

Height of the output frame.

dwCurrImageWidth

Width of the current image.

dwCurrImageHeight

Height of the current image.

fCurrRegionX0

X component of the origin point of the region of interest in the current image.

fCurrRegionY0

Y component of the origin point of the region of interest in the current image.

fCurrRegionWidth

Width of the region of interest in the current image. The specified region of interest will be sized to match the size of the output frame.

fCurrRegionHeight

Height of the region of interest in the current image. The specified region of interest will be sized to match the size of the output frame.

fCurrBlendCoef

Blending coefficient for the current image. This value specifies the transparency of the current image relative to the previous image. The blending coefficients of the two images must total 1.0.

dwPrevImageWidth

Width of the previous image.

dwPrevImageHeight

Height of the previous image.

fPrevRegionX0

X component of the origin point of the region of interest in the previous image.

fPrevRegionY0

Y component of the origin point of the region of interest in the previous image.

fPrevRegionWidth

Width of the region of interest in the previous image. The specified region of interest will be sized to match the size of the output frame.

fPrevRegionHeight

Height of the region of interest in the previous image. The specified region of interest will be sized to match the size of the output frame.

fPrevBlendCoef

Blending coefficient for the previous image. This value specifies the transparency of the previous image relative to the current image. The blending coefficients of the two images must total 1.0.

dwEffectType

The effect identifier of the transition between the previous image and the current image. For more information, see Video Image Transitions.

dwNumEffectParas

The number of effect parameters relevant to the current effect. The final five members of this structure contain the values of effect parameters. This member specifies how many of those parameters contain valid information.

fEffectPara0

Effect parameter. The uses of this parameter and the other four parameters in this structure are determined by the effect used, as specified by the value of the dwEffectType member.

fEffectPara1

Effect parameter. The uses of this parameter and the other four parameters in this structure are determined by the effect used, as specified by the value of the dwEffectType member.

fEffectPara2

Effect parameter. The uses of this parameter and the other four parameters in this structure are determined by the effect used, as specified by the value of the dwEffectType member.

fEffectPara3

Effect parameter. The uses of this parameter and the other four parameters in this structure are determined by the effect used, as specified by the value of the dwEffectType member.

fEffectPara4

Effect parameter. The uses of this parameter and the other four parameters in this structure are determined by the effect used, as specified by the value of the dwEffectType member.

bKeepPrevImage

For input samples, TRUE indicates that the new image should replace the current image and that the current image should be discarded. The default behavior, indicated by setting this member to FALSE, is for the current image to become the previous image and the new image to become the current image.

Remarks

When creating an input Video Image sample, the values for the current image describe the image attached to the sample. The values for the previous image describe the image that was the current image in the previous sample. Normally, the previous image is discarded when you pass in a new image. (The old current image becomes the new previous image and the image passed in with the sample becomes the new current image.) If, when passing a new image, you want to discard the old current image and keep the old previous image, you can set the bKeepPrevImage member to TRUE.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Version

Windows Media Format 9.5 SDK

Header

Wmsdkidl.h (include Wmsdk.h)

See also

Structures

 

 

Community Additions

ADD
Show:
© 2015 Microsoft