XieGetStream(3X) — Subroutines
Digital
NAME
XieGetStream − This routine transports a plane of image data as a byte stream from a server source image to a client XieImage data buffer.
C Format
status = XieGetStream(pho_id, plane, ptr_ptr, getbytes, retbytes)
C Argument Information
unsigned char status;
XiePhoto pho_id;
unsigned long plane;
unsigned char ∗∗ptr_ptr;
unsigned long getbytes;
unsigned long ∗retbytes;
RETURN VALUES
The routine returns the image data transport status in the status argument. The returned status values are as follows:
•XieK_StreamFinal -- all data has been transported
•XieK_StreamEmpty -- no data currently available
•XieK_StreamMore -- more data available
PARAMETERS
pho_idThe pho_id argument specifies the identifier of the source image. If the source image is an unbound photomap, the data is transported immediately. Otherwise, a processing element is appended to the specified photoflo and executed when the photoflo generates image data. The photoflo is specified explicitly if the source image is a photoflo, or implicitly if the source image is a phototap or a photomap bound to the photoflo.
planeThe plane argument specifies the image data plane you want to transport.
ptr_ptrThe ptr_ptr argument specifies the address of the pointer to the XieImage data buffer in which to store the image data. If the pointer is null, the routine allocates a data buffer, the size of which is determined by the retbytes argument. The routine returns the address of the allocated data buffer in ptr_ptr. You can deallocate this buffer using the XieFree routine.
getbytesThe getbytes argument specifies the maximum number of data bytes you want to transport.
retbytesThe retbytes argument specifies a pointer to the location where the routine returns the number of bytes actually transported.
DESCRIPTION
This routine transports a plane of image data as a byte stream from a server source image to a client XieImage data buffer. The routine always executes immediately even if the pho_id argument specifies a photoflo.
You must set up the transport parameters using the XieSetStream routine prior to calling this routine. If you are transporting multiple data planes, use the XieSetStream and XieGetStream routines in combination for each plane. You can abort stream transport prior to completion using the XieAbortStream routine.
XIE Events and Error Messages
Protocol Messages: X_ieGetStream for each plane
XIE event returned: None
XieLib errors: Reply error, BadLength
XieServer errors: BadIDChoice -- Invalid identifier
BadAlloc -- Insufficient server resources
BadAccess -- Stream transport not set or the specified photoflo has been aborted
BadMatch -- The plane was not specified during set transport or the attempted transport direction is not the same as specified during set transport