3 x12_vi_getdmadata – Sensoray 512 DOS User Manual

Page 20

Advertising
background image

20

Example:

regs.x.ax = X12_VI_STOP;
regs.x.si = X12_SENDCOMMAND + CARD0; //Select the driver function
int86(X12INT,&regs,&regs); //Call the driver

Note: In addition to the above mentioned parameters, any changes to the X12PARAM members DO0,
DO1, DO2
or DDIR0, DDIR1, DDIR2 take effect when this command is called. Upon return VQSize, DI0,
DI1, DI2, DroppedFrames, and FrameCount are updated.

6.4.3 X12_VI_GETDMADATA


This command gets raw compressed video data from the video DMA buffer (video queue). The data is ES
(elementary stream) MPEG encoded.

Entry:
Parameter Type Value

Buffer far pointer Pointer to a buffer allocated by the user

application for video data.

Length long Number of bytes of MPEG data desired

Exit:
Parameter Type Value

Status short SUCCESS or FAIL. SUCCESS is returned when there
are more than zero bytes of MPEG data available.
Length long Number of bytes of data actually read from the queue
FrameCount unsigned long Number of video frames compressed since the start of
compression.

Example:

BYTE _far Buffer[VIDEO_BUFFER_SIZE];

Param->Buffer = Buffer;
Param->Length = VIDEO_BUFFER_SIZE;
regs.x.ax = X12_VI_GETDMADATA;
regs.x.si = X12_SENDCOMMAND + CARD0; //Select the driver function
int86(X12INT,&regs,&regs); //Call the driver

if(Param->Status == SUCCESS) //if successful, write the data of length Param->Length
{ //to a file
write(fhandle, Buffer, Param->Length);
}


Note:
In addition to the above mentioned parameters, any changes to the X12PARAM members DO0,
DO1, DO2
or DDIR0, DDIR1, DDIR2 take effect when this command is called. Upon return VQSize, DI0,
DI1, DI2, DroppedFrames, and FrameCount are updated.

Advertising