libpdv.c File Reference


Detailed Description

PCI DV Library, most subroutines.

Definition in file libpdv.c.

#include "edtinc.h"
#include <math.h>
#include <assert.h>

Go to the source code of this file.

Defines

#define DBG1   PDVLIB_MSG_INFO_1
#define DBG2   PDVLIB_MSG_INFO_2
#define PDV_DEPENDENT(pdv_p)   ((pdv_p)->dd_p)
#define PDVFATAL   PDVLIB_MSG_FATAL
#define PDVWARN   PDVLIB_MSG_WARNING
 libpdv.c

Functions

int edt_get_rtimeout (PdvDev *pdv_p)
 Gets the current read timeout value: the number of milliseconds to wait for DMA reads to complete before returning.
int pdv_access (char *fname, int perm)
 Determines file access independent of operating system.
uchar_t * pdv_alloc (int size)
 Convenience routine to allocate memory in a system-independent way.
void pdv_alloc_tmpbuf (PdvDev *pdv_p)
int pdv_auto_set_roi (PdvDev *pdv_p)
 set ROI to camera width/height; adjust ROI width to be a multiple of 4, and enable ROI
int pdv_auto_set_timeout (PdvDev *pdv_p)
 Sets a reasonable image timeout value based on image size and exposure time (if set) and pixel clock speed (also if set).
u_char ** pdv_buffer_addresses (PdvDev *pdv_p)
 Returns the addresses of the buffers allocated by the last call to pdv_multibuf or pdv_set_buffers.
int pdv_bytes_per_line (int width, int depth)
 Returns bytes per line based on width and bit depth, including depth < 8.
char * pdv_camera_type (PdvDev *pdv_p)
 Alias of pdv_get_cameratype.
void pdv_check (PdvDev *pdv_p)
void pdv_checkfrm (PdvDev *pdv_p, u_short *imagebuf, u_int imagesize, int verbose)
int pdv_cl_camera_connected (PdvDev *pdv_p)
 Checks whether a camera is connected and turned on.
int pdv_cl_get_fv_counter (PdvDev *pdv_p)
 Gets the number of frame valid transitions that have been seen by the board since the last time the board/channel was initialized or the last time pdv_cl_reset_fv_counter was called.
void pdv_cl_reset_fv_counter (PdvDev *pdv_p)
 Resets the frame valid counter to zero.
void pdv_cl_set_base_channels (PdvDev *pdv_p, int htaps, int vtaps)
int pdv_close (PdvDev *pdv_p)
 Closes the specified device and frees the device struct and image memory.
int pdv_dalsa_ls_set_expose (PdvDev *pdv_p, int hskip, int hactv)
int pdv_debug (int flag)
 Sets the debug level of the PCI DV library.
int pdv_debug_level ()
 Gets the debug level, as set by pdv_debug or outside environment variables.
void pdv_dmy_data (void *buf, int width, int height, int depth)
 Fills buffer buf with software generated data.
void pdv_enable_external_trigger (PdvDev *pdv_p, int flag)
 Enables external triggering.
int pdv_enable_lock (PdvDev *pdv_p, int flag)
 Convenience routine to enable/disable shutter lock on/off.
int pdv_enable_roi (PdvDev *pdv_p, int flag)
 Enables on-board region of interest.
int pdv_enable_strobe (PdvDev *pdv_p, int ena)
 enable/disable lh strobe.
int pdv_extra_headersize (PdvDev *pdv_p)
 Return the header space allocated but not used for DMA.
void pdv_flush_channel_fifo (PdvDev *pdv_p)
 OBSOLETE: just use pdv_flush_fifo(pdv_p) now.
void pdv_flush_fifo (PdvDev *pdv_p)
 Flushes the board's input FIFOs, to allow new data transfers to start from a known state.
int pdv_force_single (PdvDev *pdv_p)
 Returns the value of the force_single flag.
void pdv_free (uchar_t *ptr)
 Convenience routine to free the memory allocated with pdv_alloc.
int pdv_get_allocated_size (PdvDev *pdv_p)
 Returns the allocated size of the image, including any header and pad for page alignment.
int pdv_get_aperture (PdvDev *pdv_p)
 This method is obsolete and should not be used.
int pdv_get_baud (PdvDev *pdv_p)
 Get the baud rate, typically initialized by the serial_baud directive in the config file (default 9600).
int pdv_get_blacklevel (PdvDev *pdv_p)
 Gets the black level (offset) on the video device.
int pdv_get_bytes_per_image (PdvDev *pdv_p)
 Gets the number of bytes per image, based on the set width, height, and depth.
int pdv_get_cam_height (PdvDev *pdv_p)
 Returns the camera image height, in pixels, as set by the configuration file directive height, unaffected by changes made by setting a region of interest.
int pdv_get_cam_width (PdvDev *pdv_p)
 Returns the camera image width, in pixels, as set by the configuration file directive width.
char * pdv_get_camera_class (PdvDev *pdv_p)
 Gets the class of the camera (usually the manufacturer name), as set by initcam from the camera_config file camera_class directive.
char * pdv_get_camera_info (PdvDev *pdv_p)
 Gets the string set by the camera_info configuration file directive.
char * pdv_get_camera_model (PdvDev *pdv_p)
 Gets the model of the camera, as set by initcam from the camera_config file camera_model directive.
char * pdv_get_cameratype (PdvDev *pdv_p)
 Gets the type of the camera, as set by initcam from the camera configuration file's camera description directives.
int pdv_get_depth (PdvDev *pdv_p)
 Gets the depth of the image (number of bits per pixel), as set in the configuration file for the camera in use.
 pdv_get_dmasize (PdvDev *pdv_p)
 Returns the actual amount of image data for DMA Normally the "depth" value For some de-interleave and or color interpolation options, uses extdepth.
int pdv_get_dvc_state (PdvDev *pdv_p, DVCState *pState)
int pdv_get_exposure (PdvDev *pdv_p)
 Gets the exposure time on the digital video device.
int pdv_get_extdepth (PdvDev *pdv_p)
 Gets the extended depth of the camera.
int pdv_get_frame_height (PdvDev *pdv_p)
 Gets the camera image height.
int pdv_get_frame_period (PdvDev *pdv_p)
 Get the frame period.
int pdv_get_fulldma_size (PdvDev *pdv_p, int *extrasizep)
int pdv_get_fval_done (PdvDev *pdv_p)
int pdv_get_gain (PdvDev *pdv_p)
 Gets the gain on the device.
int pdv_get_header_dma (PdvDev *pdv_p)
 Returns the current setting for flag which determines whether the header size is to be added to the DMA size.
int pdv_get_header_offset (PdvDev *pdv_p)
 Returns the byte offset of the header in the buffer.
int pdv_get_header_position (PdvDev *pdv_p)
 Returns the header position value.
int pdv_get_header_size (PdvDev *pdv_p)
 Returns the currently defined header size.
int pdv_get_height (PdvDev *pdv_p)
 Gets the height of the image (number of lines), based on the camera in use.
int pdv_get_imagesize (PdvDev *pdv_p)
 Returns the size of the image, absent any padding or header data.
u_short pdv_get_interlaced (PdvDev *pdv_p)
 Obsolete, included for backwards compatability only -- see pdv_interlace_method.
u_char * pdv_get_interleave_data (PdvDev *pdv_p, u_char *buf)
u_char * pdv_get_last_image (PdvDev *pdv_p)
 Returns a pointer to the last image that was acquired (non-blocking).
u_char * pdv_get_last_raw (PdvDev *pdv_p)
 get last raw image.
int pdv_get_lines_xferred (PdvDev *pdv_p)
 Gets the number of lines transferred during the last acquire.
int pdv_get_max_gain (PdvDev *pdv_p)
 Gets the maximum allowable gain value for this camera, as set by initcam from the camera configuration file gain_max directive.
int pdv_get_max_offset (PdvDev *pdv_p)
 Gets the maximum allowable offset (black level) value for this camera, as set by initcam from the camera configuration file offset_max directive.
int pdv_get_max_shutter (PdvDev *pdv_p)
 Gets the maximum allowable exposure value for this camera, as set by initcam from the camera_config file shutter_speed_max directive.
int pdv_get_min_gain (PdvDev *pdv_p)
 Gets the minimum allowable gain value for this camera, as set by initcam from the camera configuration file gain_min directive.
int pdv_get_min_offset (PdvDev *pdv_p)
 Gets the minimum allowable offset (black level) value for this camera, as set by initcam from the camera configuration file offset_min directive.
int pdv_get_min_shutter (PdvDev *pdv_p)
 Gets the minimum allowable exposure value for this camera, as set by initcam from the camera_config file shutter_speed_min directive.
int pdv_get_pitch (PdvDev *pdv_p)
 Gets the number of bytes per line (pitch).
int pdv_get_serial_block_size ()
 Returns the block size for serial writes.
int pdv_get_timeout (PdvDev *pdv_p)
 Gets the length of time to wait for data on acquisition before timing out.
int pdv_get_waitchar (PdvDev *pdv_p, u_char *waitc)
 Get serial wait character, or byte.
int pdv_get_width (PdvDev *pdv_p)
 Gets the width of the image (number of pixels per line), based on the camera in use.
int pdv_get_width_xferred (PdvDev *pdv_p)
 Gets the number of pixels transferred during the last line transferred.
unsigned char * pdv_image (PdvDev *pdv_p)
 Start image acquisition if not already started, then wait for and return the address of the next available image.
unsigned char * pdv_image_raw (PdvDev *pdv_p)
 Start image acquisition if not already started, then wait for and return the address of the next available image (unprocessed).
int pdv_image_size (PdvDev *pdv_p)
 Returns the size of the image buffer in bytes, based on its width, height, and depth.
int pdv_in_continuous (PdvDev *pdv_p)
 Gets the status of the continuous flag.
 pdv_interlace_method (PdvDev *pdv_p)
 Returns the interlace method, as set from the method_interlace directive in the configuration file [from pdv_initcam].
void pdv_invert (PdvDev *pdv_p, int val)
 Tell the PCI DV hardware to invert each pixel before transferring it to the host computer's memory.
void pdv_invert_fval_interrupt (PdvDev *pdv_p)
 Set the Frame Valid interrupt to occur on the rising instead of falling edge of frame valid.
int pdv_is_atmel (PdvDev *pdv_p)
 Infers that this device is connected to is an Atmel camera, from settings from the loaded camera config file.
int pdv_is_cameralink (PdvDev *pdv_p)
 Infers that this device is connected to is a Camera Link camera (as opposed to RS-422 or LVDS parallel), based on settings from the loaded camera config file.
int pdv_is_dvc (PdvDev *pdv_p)
 Infers that this device is connected to is a DVC camera, from settings from the loaded camera config file.
int pdv_is_hamamatsu (PdvDev *pdv_p)
 Infers that this device is connected to is a Hamamatsu camera, from settings from the loaded camera config file.
int pdv_is_kodak_i (PdvDev *pdv_p)
 Infer if it's a Redlake (formerly Roper, formerly Kodak) 'i' camera from the serial settings.
int pdv_is_simulator (PdvDev *pdv_p)
 Infers that this device is a simulator -- either a PCI DV CLS board, or a PCIe DV C-Link with simulator FPGA loaded.
unsigned char * pdv_last_image_timed (PdvDev *pdv_p, u_int *timep)
 Identical to pdv_wait_last_image_timed; included for backwards compatability only.
unsigned char * pdv_last_image_timed_raw (PdvDev *pdv_p, u_int *timep, int doRaw)
 Identical to pdv_wait_last_image_timed_raw; included for backwards compatability only.
void pdv_mark_bin (u_char *addr, int n, int width, int height, int x, int y)
void pdv_mark_ras (u_char *addr, int n, int width, int height, int x, int y)
int pdv_multibuf (PdvDev *pdv_p, int numbufs)
 Sets the number of multiple buffers to use in ring buffer continuous mode, and allocates them.
int pdv_multibuf_block (PdvDev *pdv_p, int numbufs, u_char *block, int blocksize)
int pdv_multibuf_separate (PdvDev *pdv_p, int numbufs, u_char **buffers)
void pdv_new_debug (int val)
PdvDevpdv_open (char *dev_name, int unit)
 Opens the PCI DV for application access.
PdvDevpdv_open_channel (char *dev_name, int unit, int channel)
 Opens the PCI DV for application access.
int pdv_overrun (PdvDev *pdv_p)
 Determines whether data overran on the last aquire.
int pdv_pause_for_serial (PdvDev *pdv_p)
void pdv_perror (char *err)
 Formats and prints a system error.
int pdv_picture_timeout (PdvDev *pdv_p, int value)
 Sets the length of time to wait for data on acquisition before timing out.
 pdv_process_inplace (PdvDev *pdv_p)
int pdv_query_serial (PdvDev *pdv_p, char *cmd, char **resp)
 Send a serial command, get the response in a multiline string, one line per string pointer.
int pdv_read (PdvDev *pdv_p, unsigned char *buf, unsigned long size)
 Triggers the camera and reads image data from the PCI DV.
int pdv_read_basler_frame (PdvDev *pdv_p, u_char *frame, int len)
 Read a Basler binary frame command.
int pdv_read_duncan_frame (PdvDev *pdv_p, u_char *frame)
 Read response (binary serial) from a Duncantech MS and DT series camera -- checks for STX and size, then waits for size+1 more bytes.
 pdv_read_response (PdvDev *pdv_p, char *buf)
 Read serial response, wait for timeout (or serial_term if specified), max is 2048 (arbitrary).
void pdv_reset_serial (PdvDev *pdv_p)
 Resets the serial interface.
int pdv_send_basler_command (PdvDev *pdv_p, int cmd, int rwflag, int len, int data)
 Send a basler binary command -- do the framing and BCC.
int pdv_send_basler_frame (PdvDev *pdv_p, u_char *cmd, int len)
 Send a Basler formatted serial frame.
void pdv_send_break (PdvDev *pdv_p)
 send serial break (only aiag and related xilinx files)
int pdv_send_duncan_frame (PdvDev *pdv_p, u_char *cmdbuf, int size)
 Send a Duncantech MS / DT series camera frame -- adds the framing and checksum, then sends the command.
int pdv_send_msg (PdvDev *ed, int chan, char *buf, int size)
 wrapper for edt_send_msg, but added pause between bytes if indicated by pause_for_serial (done initially for imperx cam)
int pdv_serial_binary_command (PdvDev *pdv_p, char *cmd, int len)
 Sends binary serial command(s) to the camera.
int pdv_serial_binary_command_flagged (PdvDev *pdv_p, char *cmd, int len, u_int flag)
 Sends a binary serial command.
int pdv_serial_command (PdvDev *pdv_p, char *cmd)
 Sends an ASCII serial command to the camera, with ASCII camera command formatting.
int pdv_serial_command_flagged (PdvDev *pdv_p, char *cmd, u_int flag)
 Bottom level serial_command that takes a flag for different options.
int pdv_serial_command_hex (PdvDev *pdv_p, char *str, int length)
 Send hex byte command (formatted ascii "0xNN") as binary.
char * pdv_serial_prefix (PdvDev *pdv_p)
 Get the serial prefix.
int pdv_serial_read (PdvDev *pdv_p, char *buf, int count)
 Performs a serial read over the serial control lines.
int pdv_serial_read_blocking (PdvDev *pdv_p, char *buf, int size)
 Performs a serial read over the serial control lines, blocks until all requested serial is read.
int pdv_serial_read_enable (PdvDev *pdv_p)
int pdv_serial_read_nullterm (PdvDev *pdv_p, char *buf, int size, int nullterm)
 Preforms a serial read over the RS-422 or RS-232 lines if EDT has provided a special cable to accommodate RS-422 or RS-232 serial control.
char * pdv_serial_term (PdvDev *pdv_p)
 Get the serial terminator.
void pdv_serial_txrx (PdvDev *pdv_p, char *txbuf, int txcount, char *rxbuf, int rxcount, int timeout, u_char *wchar)
 Serial send AND recieve -- send a command and wait for the response.
int pdv_serial_wait (PdvDev *pdv_p, int msecs, int count)
 Waits for response from the camera as a result of a pdv_serial_write or pdv_serial_command.
int pdv_serial_wait_next (EdtDev *pdv_p, int msecs, int count)
 Wait for next serial to come in -- ignore any previous if 0, just wait for the next thing, however many it is.
int pdv_serial_write (PdvDev *pdv_p, char *buf, int size)
 Performs a serial write over the serial lines.
int pdv_serial_write_available (PdvDev *pdv_p)
 pdv_serial_write_avail Get the number of bytes available in the driver's serial write buffer.
int pdv_serial_write_single_block (PdvDev *pdv_p, char *buf, int size)
 Writes a serial command buffer to a serial aia (Kodak type) device.
int pdv_set_aperture (PdvDev *pdv_p, int value)
 This method is obsolete and should not be used.
 pdv_set_baud (PdvDev *pdv_p, int baud)
 Sets the baud rate on the serial lines; applies only to cameras with serial control.
int pdv_set_binning (PdvDev *pdv_p, int xval, int yval)
 Set binning on the camera to the specified values, and recalculate the values that will be returned by pdv_get_width, pdv_get_height, and pdv_get_imagesize.
int pdv_set_binning_dvc (PdvDev *pdv_p, int xval, int yval)
 DVC 1312 binning.
int pdv_set_blacklevel (PdvDev *pdv_p, int value)
 Sets the black level (offset) on the input device.
int pdv_set_buffers (PdvDev *pdv_p, int numbufs, unsigned char **bufarray)
 Used to set up user-allocated buffers to be used in ring buffer mode, an alternative to pdv_multibuf which allocates the buffers internally.
int pdv_set_buffers_x (PdvDev *pdv_p, int numbufs, int size, unsigned char **bufs)
int pdv_set_cam_height (PdvDev *pdv_p, int value)
 Sets placeholder for original full camera frame height, unaffected by ROI changes and usually only called by pdv_initcam.
int pdv_set_cam_width (PdvDev *pdv_p, int value)
 Sets placeholder for original full camera frame width, unaffected by ROI changes and usually only called by pdv_initcam.
int pdv_set_cameratype (PdvDev *pdv_p, char *model)
 Sets the camera's type (model) string in the dependent structure.
void pdv_set_defaults (PdvDev *pdv_p)
int pdv_set_depth (PdvDev *pdv_p, int value)
 Sets the bit depth.
int pdv_set_exposure (PdvDev *pdv_p, int value)
 Sets the exposure time on the digital video device.
int pdv_set_exposure_basler202k (PdvDev *pdv_p, int value)
 set exposure (,gain, blacklevel) on basler A202K -- ref BASLER A202K Camera Manual Document ID number DA044003.
int pdv_set_exposure_duncan_ch (PdvDev *pdv_p, int value, int ch)
 Set exposure for Redlake (formerly Duncantech) DT and MS series cameras.
int pdv_set_exposure_mcl (PdvDev *pdv_p, int value)
 Set the exposure when in pulse-width mode (also known as level trigger mode).
int pdv_set_extdepth (PdvDev *pdv_p, int value)
 Sets the bit depth coming from the camera.
int pdv_set_frame_period (PdvDev *pdv_p, int period, int method)
 Set the frame period counter and enable/disable frame timing.
void pdv_set_fval_done (PdvDev *pdv_p, int enable)
 Enables frame valid done functionality on the board.
int pdv_set_gain (PdvDev *pdv_p, int value)
 Sets the gain on the input device.
int pdv_set_gain_basler202k (PdvDev *pdv_p, int valuea, int valueb)
int pdv_set_gain_ch (PdvDev *pdv_p, int value, int chan)
 This method is obsolete and should not be used.
int pdv_set_gain_duncan_ch (PdvDev *pdv_p, int value, int ch)
 Set gain for Redlake (formerly Duncantech) DT and MS series cameras.
void pdv_set_header_dma (PdvDev *pdv_p, int header_dma)
 Sets the boolean value for whether the image header is included in the DMA from the camera.
void pdv_set_header_offset (PdvDev *pdv_p, int header_offset)
 Sets the byte offset of the header data in the allocated buffer.
void pdv_set_header_position (PdvDev *pdv_p, int header_position)
 Sets the header position.
void pdv_set_header_size (PdvDev *pdv_p, int header_size)
 Sets the header size (in bytes) for the pdv.
int pdv_set_height (PdvDev *pdv_p, int value)
 Sets height and reallocates buffers accordingly.
void pdv_set_interlace (PdvDev *pdv_p, int interlace)
 Set the interlace flag.
int pdv_set_mode (PdvDev *pdv_p, char *mode, int mcl)
 This method is obsolete and should not be used.
int pdv_set_mode_dvc (PdvDev *pdv_p, char *mode)
int pdv_set_mode_kodak (PdvDev *pdv_p, char *mode)
 Obsolete.
int pdv_set_offset_basler202k (PdvDev *pdv_p, int valuea, int valueb)
int pdv_set_roi (PdvDev *pdv_p, int hskip, int hactv, int vskip, int vactv)
 Sets a rectangular region of interest, supporting cropping.
void pdv_set_serial_block_size (int newsize)
 Sets the block size for serial writes if the default of 512 is not adequate.
void pdv_set_serial_delimiters (PdvDev *pdv_p, char *prefix, char *term)
 Get the serial prefix.
int pdv_set_serial_parity (PdvDev *pdv_p, char parity)
 Sets parity to even, odd, or none.
int pdv_set_slop (PdvDev *pdv_p, int slop)
int pdv_set_strobe_counters (PdvDev *pdv_p, int count, int delay, int period)
 pdv_set_strobe_counters.
 pdv_set_strobe_dac (PdvDev *pdv_p, u_int value)
 Sets the strobe DAC level.
int pdv_set_timeout (PdvDev *pdv_p, int value)
 Sets the length of time to wait for data on acquisition before timing out.
int pdv_set_waitchar (PdvDev *pdv_p, int enable, u_char wchar)
 Set serial wait character.
int pdv_set_width (PdvDev *pdv_p, int value)
 Sets width and reallocates buffers accordingly.
void pdv_setdebug (PdvDev *pdv_p, int debug)
int pdv_setsize (PdvDev *pdv_p, int width, int height)
 Sets the width and height of the image.
void pdv_setup_continuous (PdvDev *pdv_p)
 Performs setup for continuous transfers.
void pdv_setup_continuous_channel (PdvDev *pdv_p)
 Obsolete.
void pdv_setup_dma (PdvDev *pdv_p)
 Sets up device for DMA.
int pdv_shutter_method (PdvDev *pdv_p)
 Return shutter (expose) timing method.
int pdv_slop (PdvDev *pdv_p)
void pdv_start_expose (PdvDev *pdv_p)
 Start expose independent of grab - only works in continuous mode.
void pdv_start_hardware_continuous (PdvDev *pdv_p)
 Starts hardware continuous mode.
void pdv_start_image (PdvDev *pdv_p)
 Starts acquisition of a single image.
void pdv_start_images (PdvDev *pdv_p, int count)
 Starts multiple image acquisition.
void pdv_stop_continuous (PdvDev *pdv_p)
 Performs un-setup for continuous transfers.
void pdv_stop_hardware_continuous (PdvDev *pdv_p)
 Stops hardware continous mode.
int pdv_strobe (PdvDev *pdv_p, int count, int delay)
 Fires the strobe.
int pdv_strobe_method (PdvDev *pdv_p)
 check if the strobe is even valid for this Xilinx, and which method is used.
int pdv_timeout_cleanup (PdvDev *pdv_p)
 Cleans up after a timeout, particularly when you've prestarted multiple buffers or if you've forced a timeout with edt_do_timeout.
int pdv_timeout_restart (PdvDev *pdv_p, int restart)
 Cleans up after a timeout, particularly when you've prestarted multiple buffers or if you've forced a timeout with edt_do_timeout.
int pdv_timeouts (PdvDev *pdv_p)
 Gets the number of times the PCI DV timed out (frame didn't transfer completely or at all) since the device was opened.
int pdv_total_block_size (PdvDev *pdv_p, int numbufs)
int pdv_update_from_dvc (PdvDev *pdv_p)
int pdv_update_size (PdvDev *pdv_p)
 pdv_update_values_from_camera (PdvDev *pdv_p)
int pdv_variable_size (PdvDev *pdv_p)
 Obsolete.
unsigned char * pdv_wait_image (PdvDev *pdv_p)
 Wait for the image started by pdv_start_image, or for the next image started by pdv_start_images.
unsigned char * pdv_wait_image_raw (PdvDev *pdv_p)
 Identical to pdv_wait_image, except image data is returned directly from DMA without conversion.
unsigned char * pdv_wait_image_timed (PdvDev *pdv_p, u_int *timep)
 Identical to pdv_wait_image but also returns the time at which the DMA was complete on this image.
unsigned char * pdv_wait_image_timed_raw (PdvDev *pdv_p, u_int *timep, int doRaw)
 Identical to pdv_wait_image_timed, except the new argument doRaw specifies whether or not to perform the deinterleave.
u_char * pdv_wait_images (PdvDev *pdv_p, int count)
 Waits for the images started by pdv_start_images.
unsigned char * pdv_wait_images_raw (PdvDev *pdv_p, int count)
 Identical to the pdv_wait_images, except that it skips any image deinterleave method defined by the method_interlace config file directive.
unsigned char * pdv_wait_images_timed (PdvDev *pdv_p, int count, u_int *timep)
 Identical to pdv_wait_images but also returns the time at which the DMA was complete on the last image.
unsigned char * pdv_wait_images_timed_raw (PdvDev *pdv_p, int count, u_int *timep, int doRaw)
 Identical to pdv_wait_images_timed, except the new argument doRaw specifies whether or not to perform the deinterleave.
unsigned char * pdv_wait_last_image (PdvDev *pdv_p, int *nSkipped)
 Waits for the last image that has been acquired.
unsigned char * pdv_wait_last_image_raw (PdvDev *pdv_p, int *nSkipped, int doRaw)
 Identical to the pdv_wait_last_image, except that it provides a way to determine whether to include or bypass any image deinterleave that is enabled.
unsigned char * pdv_wait_last_image_timed (PdvDev *pdv_p, u_int *timep)
 Identical to pdv_wait_last_image, but also returns the time at which the DMA was complete on the last image.
unsigned char * pdv_wait_last_image_timed_raw (PdvDev *pdv_p, u_int *timep, int doRaw)
 Identical to pdv_wait_last_image_raw but also returns the time at which the DMA was complete on the last image.
unsigned char * pdv_wait_next_image (PdvDev *pdv_p, int *nSkipped)
 Waits for the next image, skipping any previously started images.
unsigned char * pdv_wait_next_image_raw (PdvDev *pdv_p, int *nSkipped, int doRaw)
 Identical to the pdv_wait_next_image, except that it provides a way to include or bypass any image deinterleave method defined by the method_interlace config file directive.

Variables

int Pdv_debug = 0
int Smd_rate = NOT_SET
int Smd_type = NOT_SET


Define Documentation

#define PDVWARN   PDVLIB_MSG_WARNING

libpdv.c

PCIbus Digital Video Capture Library Main Module

Copyright (c) 1993-2006, Engineering Design Team, Inc.

Provides a 'C' language interface to the EDT PCI bus Digital Video Camera/Device Capture family of products

All routines access a specific device, whose handle is created and returned by the pdv_open() routine.

Definition at line 288 of file libpdv.c.


Function Documentation

void pdv_dmy_data ( void *  buf,
int  width,
int  height,
int  depth 
)

Fills buffer buf with software generated data.

Parameters:
buf Dummy device image buffer.
width number of bytes per line
height number of lines within image buffer.
depth number of bits per pixel

Definition at line 264 of file pdv_dmy_image.c.

int pdv_enable_strobe ( PdvDev pdv_p,
int  ena 
)

enable/disable lh strobe.

if method 2, enable or disable as specified if method 1, return ok if enable specified, -1 if disable, since we can't do that with method 1

counters and DAC value will persist whether strobe is enabled or not

Parameters:
pdv_p pointer to pdv device structure returned by pdv_open
ena 1 to enable, 0 to disable

Definition at line 7138 of file libpdv.c.

int pdv_get_aperture ( PdvDev pdv_p  ) 

This method is obsolete and should not be used.

The current implementation creates a warning message and returns -1 signifying failure.

Returns:
-1 for failure, always.

Definition at line 3052 of file libpdv.c.

int pdv_set_aperture ( PdvDev pdv_p,
int  value 
)

This method is obsolete and should not be used.

The current implementation creates a warning message and returns -1 signifying failure.

Returns:
-1 for failure, always.

Definition at line 2815 of file libpdv.c.


Generated on Mon May 12 16:39:04 2008 by  doxygen 1.5.1