The DDVIDEOPORTCAPS structure describes the capabilities and alignment restrictions of a video port. This structure is used with the IDDVideoPortContainer::EnumVideoPorts method.
typedef struct _DDVIDEOPORTCAPS {
DWORD dwSize; // Size of the DDVIDEOPORTCAPS structure
DWORD dwFlags; // Indicates which fields contain data
DWORD dwMaxWidth; // Max width of the video port field
DWORD dwMaxVBIWidth; // Max width of the VBI data
DWORD dwMaxHeight; // Max height of the video port field
DWORD dwVideoPortID; // Video port ID (0 - (dwMaxVideoPorts -1))
DWORD dwCaps; // Video port capabilities
DWORD dwFX; // More video port capabilities
DWORD dwNumAutoFlipSurfaces; // Number of autoflippable surfaces
DWORD dwAlignVideoPortBoundary; // Byte restriction of placement within the surface
DWORD dwAlignVideoPortPrescaleWidth; // Byte restriction of width after prescaling
DWORD dwAlignVideoPortCropBoundary; // Byte restriction of left cropping
DWORD dwAlignVideoPortCropWidth; // Byte restriction of cropping width
DWORD dwPreshrinkXStep; // Width can be shrunk in steps of 1/x
DWORD dwPreshrinkYStep; // Height can be shrunk in steps of 1/x
DWORD dwNumVBIAutoFlipSurfaces; // Number of VBI autoflippable surfaces
DWORD dwReserved1; // Reserved for future use
DWORD dwReserved2; // Reserved for future use
} DDVIDEOPORTCAPS, *LPDDVIDEOPORTCAPS;
Members
dwSize
Size of the structure, in bytes. This must be initialized before use.
dwFlags
Flag values indicating the fields that contain valid data. The following flags are defined.
DDVPD_WIDTH | The dwMaxWidth member is valid. |
DDVPD_HEIGHT | The dwMaxHeight member is valid. |
DDVPD_ID | The dwVideoPortID member is valid. |
DDVPD_CAPS | The dwCaps member is valid. |
DDVPD_FX | The dwFX member is valid. |
DDVPD_AUTOFLIP | The dwNumAutoFlipSurfaces member is valid. |
DDVPD_ALIGN | The dwAlignVideoPortBoundary, dwAlignVideoPortPrescaleWidth, dwAlignVideoPortCropBoundary, and dwAlignVideoPortCropWidth are valid. |
dwMaxWidth
Maximum width of the video port field.
dwMaxVBIWidth
Maximum width of the VBI data.
dwMaxHeight
Maximum height of the video port field.
dwVideoPortID
Zero based index identifying the video port.
dwCaps
Video port capabilities.
DDVPCAPS_AUTOFLIP | Flip can be performed automatically to avoid tearing when a VREF occurs. If the data is being interleaved in memory, it will flip on every other VREF. |
DDVPCAPS_INTERLACED | Supports interlaced video. |
DDVPCAPS_NONINTERLACED | Supports non-interlaced video. |
DDVPCAPS_READBACKFIELD | Supports the IDirectDrawVideoPort::GetFieldPolarity method. |
DDVPCAPS_READBACKLINE | Supports the IDirectDrawVideoPort::GetVideoLine method. |
DDVPCAPS_SHAREABLE | Supports two genlocked video streams that share the video port, where one stream uses the even fields and the other uses the odd fields. Separate parameters (including address, scaling, cropping, etc.) are maintained for both fields. |
DDVPCAPS_SKIPEVENFIELDS | Even fields of video can be automatically discarded. |
DDVPCAPS_SKIPODDFIELDS | Odd fields of video can be automatically discarded. |
DDVPCAPS_SYNCMASTER | Can drive the graphics sync (refresh rate) based on the video port sync. |
DDVPCAPS_SYSTEMMEMORY | Capable of writing to surfaces created in system memory. |
DDVPCAPS_VBISURFACE | Data within the VBI can be written to a different surface. |
DDVPCAPS_COLORCONTROL | Can perform color control operations on incoming data before writing to the frame buffer. |
DDVPCAPS_OVERSAMPLEDVBI | Can accept VBI data in a different format or width than the regular video data. |
DDVPCAPS_VBIANDVIDEOINDEPENDENT | Indicates that the VBI and video portions of the video stream can be controlled by independent processes. |
dwFX
Additional video port capabilities.
DDVPFX_CROPTOPDATA | Limited cropping is available to crop VBI data. |
DDVPFX_CROPX | Incoming data can be cropped in the x direction before it is written to the surface. |
DDVPFX_CROPY | Incoming data can be cropped in the y direction before it is written to the surface. |
DDVPFX_INTERLEAVE | Supports interleaving interlaced fields in memory. |
DDVPFX_MIRRORLEFTRIGHT | Supports mirroring left to right as the video data is written into the frame buffer. |
DDVPFX_MIRRORUPDOWN | Supports mirroring top to bottom as the video data is written into the frame buffer. |
DDVPFX_PRESHRINKX | Data can be arbitrarily shrunk in the x direction before it is written to the surface. |
DDVPFX_PRESHRINKY | Data can be arbitrarily shrunk in the y direction before it is written to the surface. |
DDVPFX_PRESHRINKXB | Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the x direction before it is written to the surface. |
DDVPFX_PRESHRINKYB | Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the y direction before it is written to the surface. |
DDVPCAPS_PRESHRINKXS | Data can be shrunk in the x direction by increments of 1/x, where x is specified in the dwShrinkXStep member. |
DDVPCAPS_PRESHRINKYS | Data can be shrunk in the y direction by increments of 1/y, where y is specified in the dwShrinkYStep |
DDVPFX_PRESTRETCHX | Data can be arbitrarily stretched in the x direction before it is written to the surface. |
DDVPFX_PRESTRETCHY | Data can be arbitrarily stretched in the y direction before it is written to the surface. |
DDVPFX_PRESTRETCHXN | Data can be integer stretched in the x direction before it is written to the surface. (1x, 2x, 3x, etc.) |
DDVPFX_PRESTRETCHYN | Data can be integer stretched in the y direction before it is written to the surface. (1x, 2x, 3x, etc.) |
DDVPFX_VBICONVERT | Data within the VBI can be converted independently of the remaining video data. |
DDVPFX_VBINOINTERLEAVE | Interleaving can be disabled for data within the VBI. |
DDVPFX_VBINOSCALE | Scaling can be disabled for data within the VBI. |
DDVPFX_IGNOREVBIXCROP | The video port can ignore the left and right cropping coordinates when cropping oversampled VBI data. |
dwNumAutoFlipSurfaces
Number of autoflippable surfaces supported by the video port.
dwAlignVideoPortBoundary
Byte restriction of placement within the surface.
dwAlignVideoPortPrescaleWidth
Byte restriction of width after prescaling.
dwAlignVideoPortCropBoundary
Byte restriction of left cropping.
dwAlignVideoPortCropWidth
Byte restriction of cropping width.
dwPreshrinkXStep
Width can be shrunk in the x direction in steps of 1/dwPreshrinkXStep.
dwPreshrinkYStep
Height can be shrunk in the y direction in steps of 1/dwPreshrinkYStep.
dwNumVBIAutoFlipSurfaces
Number of autoflipping surfaces capable of receiving data transmitted during the vertical blanking interval (VBI) independent from the remainder of the video stream. When constructing the autoflip chain, the number of VBI surfaces must equal the number of surfaces receiving the remainder of the video data.
dwReserved1 and dwReserved2
Reserved; set to zero.
QuickInfo
Windows NT: Use version 5.0 or later.
Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in dvp.h.