typedef struct {
LPBYTE lpData;
DWORD dwBufferLength;
DWORD dwBytesUsed;
DWORD dwTimeCaptured;
DWORD dwUser;
DWORD dwFlags;
DWORD dwReserved[4];
} VIDEOHDR;
The VIDEOHDR structure describes a client-supplied buffer for receiving video capture data. Drivers receive this structure along with DVM_STREAM_ADDBUFFER, DVM_STREAM_PREPAREHEADER, and DVM_STREAM_UNPREPAREHEADER messages. The structure is defined in msvideo.h.
Members
lpData
Pointer to a buffer.
dwBufferLength
Length of the buffer.
dwBytesUsed
Number of bytes used in the buffer.
dwTimeCaptured
Capture time for the frame, in milliseconds, relative to the capture time of the stream’s first frame.
dwUser
Contains 32 bits of client-specified data.
dwFlags
Contains flags. The following flags are defined.
Flag | Definition |
VHDR_DONE | Set by the device driver to indicate it is finished with the data buffer and is returning the buffer to the client. |
VHDR_PREPARED | Indicates whether or not the buffer has been prepared for use. See DVM_STREAM_PREPAREHEADER. |
VHDR_INQUEUE | Set by the driver to indicate the buffer is in the driver’s buffer queue. |
VHDR_KEYFRAME | Set by the device driver to indicate a key frame. |
dwReserved[4]
Reserved for use by the device driver. Typically, drivers use this area to maintain a buffer queue.
Comments
The client supplies values for the lpData, dwBufferLength, and dwUser members. The driver fills in the dwBytesUsed, dwTimeCaptured, and dwFlags members. Drivers using VCUser.lib do not need to maintain the dwFlags member, because code within VCUser.lib handles the flags.