DVM_STREAM_ALLOCBUFFER

The DVM_STREAM_ALLOCBUFFER message requests a user-mode video capture driver to allocate a buffer from a device's local, non-system memory.

Parameters

dwDriverID

Video channel identifier. One of VIDEO_EXTERNALIN, VIDEO_IN, VIDEO_OUT, VIDEO_EXTERNALOUT. (For details, see Opening Video Channels.)

hDriver

Driver handle.

uMsg

DVM_STREAM_ALLOCBUFFER

lParam1

Pointer to a location to receive the address of the returned buffer.

lParam2

Requested buffer size, in bytes.

Return Value

The driver should return DV_ERR_OK if the operation succeeds. Otherwise, it should return one of the DV_ERR error codes defined in msvideo.h. Custom error codes are also allowed (see DVM_GETERRORTEXT).

Comments

A client sends the DVM_STREAM_ALLOCBUFFER message by calling the driver's DriverProc entry point, passing the specified parameter values. Applications can send this message by calling the videoMessage function, which is described in the Video for Windows Development Kit.

If the hardware provides on-board memory that can be used as buffer space to receive captured video data, the driver should allocate a buffer using the size specified by lParam2, return the buffer's address in the location pointed to by lParam1, and provide a return value of DV_ERR_OK. If no buffer space is available, the driver should return NULL in the location pointed to by lParam1. If the hardware does not provide on-board memory, the driver should return DV_ERR_NOTSUPPORTED.

Note: The video capture driver libraries, VCUser.lib and VCKernel.lib, do not support this message. Therefore, the sample video capture drivers do not support the message either.

See Also

DVM_STREAM_ADDBUFFER

DVM_STREAM_FREEBUFFER