4 x12_vi_putdmadata – Sensoray 512 DOS User Manual

Page 21

Advertising
background image

21

6.4.4 X12_VI_PUTDMADATA


This command puts ES (elementary stream) MPEG encoded video data into the video DMA buffer (video
queue).

Entry:
Parameter Type Value

Buffer far pointer Pointer to a buffer allocated by the user

application holding video data.

Length long Number of bytes of MPEG data to be decompressed

Exit:
Parameter Type Value

Status short SUCCESS or FAIL. FAIL is returned if data was not
Written.
Length long Number of bytes of MPEG data actually written.


Example:

BYTE _far Buffer[VIDEO_BUFFER_SIZE];

Param->Mode = DECODE;
regs.x.ax = X12_VI_START;
regs.x.si = X12_SENDCOMMAND + CARD0; //Select the driver function
int86(X12INT,&regs,&regs); //Call the driver

Param->Length = read(fhan,Buffer, VIDEO_BUFFER_SIZE);

while(!kbhit())
{
Param->Buffer = Buffer;
regs.x.ax = X12_VI_PUTDMADATA;
regs.x.si = X12_SENDCOMMAND + CARD0; //Select the "Send command' driver function
int86(X12INT,&regs,&regs); //Call the driver

if(Param->Status == SUCCESS)
if((Param->Length = read(fhan,Buffer, Param->Length)) == EOF)
break;
}

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