SunVideo Plus for PCI User's Guide

General Attributes

DEVICE_NAME

This attribute sets the path name of the o1k (SunVideo Plus) device. You must set this attribute using the xil_device_create(3) and xil_device_set_value(3) functions prior to creating the device image.

Access: set/get Type: char * Default: "/dev/o1k0"

PORT_V

This attribute defines which of the three ports will capture the video signal.

S_VIDEO port 

Composite Video #1 port 

Composite Video #2 port 

Access: set/get Type: int Default: 1

PORT

This attribute is a string interface to set the port.

S VIDEO 

S_VIDEO port 

COMPOSITE VIDEO 1 

Composite Video #1 port 

COMPOSITE VIDEO 2 

Composite Video #2 port 

Access: set/get Type: char * * Default: "COMPOSITE VIDEO 1"

FORMAT_V

This attribute returns 0 if the format is unknown, 1 if capturing from PAL, and 2 if capturing from NTSC. See "Video Ports, Formats, and Auto Format Detection" for more information.

Access: get Type: int

FORMAT

This attribute returns the video format being captured (NTSC, PAL, or UNKNOWN). See "Video Ports, Formats, and Auto Format Detection" for more information.

Access: get Type: char *

FRAME_NUMBER

This attribute provides an ID (a timestamp) for the last captured frame. The timestamp is initially set to -1. After the first field or frame acquired, the timestamp (FRAME_NUMBER) increments to reflect the number of fields that have been captured by the SunVideo Plus hardware.

Access: get Type: int

TIMESTAMP

This attribute returns a pointer to a volatile hrtime_t that always contains the timestamp for the most recently captured frame Therefore, this attribute only needs to be retrieved once. The timestamp value is updated each time a capture operation occurs. This enables you to associate a timestamp with each captured frame.

The pointer points to an hrtime_t, which is an 8-byte timestamp. The units are expressed as "nanoseconds since boot." See the gethrtime(3C) manual page for information about hrtime_t.

Access: get Type: hrtime_t * (defined in <sys/time.h>)

IMAGE_SKIP

This attribute sets and returns the number of images to skip between captures. You can use the IMAGE_SKIP attribute to pace the flow of images. For example, an application that supports security cameras could use the attribute to provide images at 30-second intervals.

Another example is to use IMAGE_SKIP when you want to limit the frame rate to match a particular network bandwidth. To capture NTSC frames at a rate of approximately 10 fps, you would set the IMAGE_SKIP attribute to 2. This causes the SunVideo Plus card to capture every third frame.

Access: set/get Type: intDefault: 0

MAX_BUFFERS

This attribute sets and returns the maximum number of compressed frames that the XIL SunVideo Plus driver will hold while waiting for an application to retrieve via a compress call. The value must be in the range between 1 and 10. See the figure below. The value is clipped to provide the number of buffers that fit in the available memory.

Figure 5-1 Maximum Number of Buffers

Graphic

Access: set/get Type: integer Default: 2

NUM_BUFFERS

This attribute returns an integer that specifies the actual number of buffers that can be used to hold compressed frames. The NUM_BUFFERS value is less than or equal to the value of the MAX_BUFFERS attribute.

The NUM_BUFFERS attribute returns a valid value after the first capture (or capture/compress) operation has been performed.

Access: set Type: integer

FULL_BUFFERS

This attribute returns an integer that specifies the current number of buffers that contain valid data. The FULL_BUFFERS attribute returns a valid value after the first capture (or capture/compress) has been performed.

Access: get Type: integer

FLUSH_BUFFERS

If the FLUSH_BUFFERS attribute is set, then all saved buffers are flushed before the next image is captured. After the operation completes, the value of FULL_BUFFERS is set to zero. The input value of the set attribute call is ignored.

Access: set Type: void