xil_cis_put_bits(3)
NAME
xil_cis_put_bits, xil_cis_put_bits_ptr − put compressed data into a compressed image sequence
SYNOPSIS
#include <xil/xil.h>
void xil_cis_put_bits (XilCis cis,
int nbytes,
int nframes,
void ∗data);
void xil_cis_put_bits_ptr (XilCis cis,
int nbytes,
int nframes,
void ∗data,
XIL_FUNCPTR_DONE_WITH_DATA done_with_data);
typedef void (∗XIL_FUNCPTR_DONE_WITH_DATA)(void ∗);
DESCRIPTION
xil_cis_put_bits() copies nbytes of compressed data representing nframes frames of uncompressed data into the compressed image sequence cis. Parameter data is a generic pointer to the data being copied into the compressed image sequence (CIS).
xil_cis_put_bits_ptr() puts nbytes of compressed data representing nframes frames of uncompressed data into the compressed image sequence cis. Parameter data is a generic pointer to the data being put into the CIS.
Unlike xil_cis_put_bits(), xil_cis_put_bits_ptr() does not copy data into the CIS; instead, the CIS directly references the data pointed to by data. In this case, the application is responsible for ensuring that the data remains valid. The application may supply a routine done_with_data() that is called when the particular buffer is no longer needed by the CIS. The done_with_data() routine will also be called if the CIS is destroyed explicitly with xil_cis_destroy(3) or implicitly with xil_close(3). The application may supply NULL for the callback; in this case, the application is responsible for determining when particular buffers are no longer needed.
The nframes parameter is used to specify how many frames of uncompressed data the nbytes of compressed data represents. Used in this way, nframes must be an integer greater than zero. If the exact number of complete frames is not known, then nframes should be set to -1. This informs the CIS that the data being placed into it contains one or more complete frames.
If the data being put into the CIS may not represent an integer number of frames, then nframes should be set to 0. This informs the CIS that the data being placed into it may contain 0 or more frames, and that the last frame and/or the first frame represented in this data may not be complete.
ERRORS
For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide.
EXAMPLES
Copy bitstream data that contains frame_count frames into an XilCis:
XilCis cis;
xil_cis_put_bits(cis, bytes, frame_count, data);
Copy bitstream data that contains an unknown number of complete frames (greater than or equal to 1 frame) into an XilCis:
XilCis cis;
xil_cis_put_bits(cis, bytes, -1, data);
Insert into an XilCis bitstream data that contains some number of frames in which the last and/or the first frame may or may not be complete:
XilCis cis;
xil_cis_put_bits_ptr(cis, bytes, 0, data, NULL);
NOTES
If error messages indicate that there is no more available free memory, try increasing swap space.
SEE ALSO
SunOS 5.6 — Last change: 13 August 1993