X12_get_port, X12_read, X12_write – Sensoray 512 User Manual
Page 17

17
Notes
Returns amount of data in video queue.
X12_get_port
int X12_get_port(int CardId);
Parameters
CardId
Card identifier. Must be between 0 and number of cards minus 1.
Return values
I/O base port address on the bus for given board.
Notes
Returns base I/O port address set during installation process. Actual address of the board must be set
manually (see Table 1).
X12_read
int X12_read(int CardId,char *buffer,int nbytes);
Parameters
CardId
Card identifier. Must be between 0 and number of cards minus 1.
buffer
Pointer to input video buffer.
nbytes
Number of bytes to input or -1 if any errors were detected.
Return values
None.
Notes
Attempts to read "nbytes" bytes of MPEG data from the SM2210 output FIFO. The actual amount read is
returned. If no data is available “0” is returned unless blocking has been enabled. In which case this
function will wait until at least one byte of data is made available. If this is the first read the encoder is
initialized and started.
X12_write
int X12_write(int CardId,char *buffer, int nbytes);
Parameters
CardId