libdc1394: dc1394/video.h File Reference

libdc1394 2.2.7

Data Structures | Typedefs | Enumerations | Functions
video.h File Reference

Functions related to video modes, formats, framerate and video flow. More...

`#include <dc1394/log.h>`

## Data Structures
struct | dc1394framerates_t
struct | __dc1394_video_frame

## Typedefs
typedef struct __dc1394_video_frame | dc1394video_frame_t

## Enumerations
enum | dc1394speed_t
enum | dc1394framerate_t
enum | dc1394operation_mode_t

## Functions
dc1394error_t | dc1394_video_get_supported_modes (dc1394camera_t *camera, dc1394video_modes_t *video_modes)
dc1394error_t | dc1394_video_get_supported_framerates (dc1394camera_t *camera, dc1394video_mode_t video_mode, dc1394framerates_t *framerates)
dc1394error_t | dc1394_video_get_framerate (dc1394camera_t *camera, dc1394framerate_t *framerate)
dc1394error_t | dc1394_video_set_framerate (dc1394camera_t *camera, dc1394framerate_t framerate)
dc1394error_t | dc1394_video_get_mode (dc1394camera_t *camera, dc1394video_mode_t *video_mode)
dc1394error_t | dc1394_video_set_mode (dc1394camera_t *camera, dc1394video_mode_t video_mode)
dc1394error_t | dc1394_video_get_operation_mode (dc1394camera_t *camera, dc1394operation_mode_t *mode)
dc1394error_t | dc1394_video_set_operation_mode (dc1394camera_t *camera, dc1394operation_mode_t mode)
dc1394error_t | dc1394_video_get_iso_speed (dc1394camera_t *camera, dc1394speed_t *speed)
dc1394error_t | dc1394_video_set_iso_speed (dc1394camera_t *camera, dc1394speed_t speed)
dc1394error_t | dc1394_video_get_iso_channel (dc1394camera_t *camera, uint32_t *channel)
dc1394error_t | dc1394_video_set_iso_channel (dc1394camera_t *camera, uint32_t channel)
dc1394error_t | dc1394_video_get_data_depth (dc1394camera_t *camera, uint32_t *depth)
dc1394error_t | dc1394_video_set_transmission (dc1394camera_t *camera, dc1394switch_t pwr)
dc1394error_t | dc1394_video_get_transmission (dc1394camera_t *camera, dc1394switch_t *pwr)
dc1394error_t | dc1394_video_set_one_shot (dc1394camera_t *camera, dc1394switch_t pwr)
dc1394error_t | dc1394_video_get_one_shot (dc1394camera_t *camera, dc1394bool_t *is_on)
dc1394error_t | dc1394_video_set_multi_shot (dc1394camera_t *camera, uint32_t numFrames, dc1394switch_t pwr)
dc1394error_t | dc1394_video_get_multi_shot (dc1394camera_t *camera, dc1394bool_t *is_on, uint32_t *numFrames)
dc1394error_t | dc1394_video_get_bandwidth_usage (dc1394camera_t *camera, uint32_t *bandwidth)

## Detailed Description

Functions related to video modes, formats, framerate and video flow.

More details soon

## Typedef Documentation

## ◆ dc1394video_frame_t

typedef struct __dc1394_video_frame dc1394video_frame_t

Video frame structure.

dc1394video_frame_t is the structure returned by the capture functions. It contains the captured image as well as a number of information.

In general this structure should be calloc'ed so that members such as "allocated size" are properly set to zero. Don't forget to free the "image" member before freeing the struct itself.

## Enumeration Type Documentation

## ◆ dc1394framerate_t

enum dc1394framerate_t

Enumeration of video framerates

This enumeration is used for non-Format_7 modes. The framerate can be lower than expected if the exposure time is longer than the requested frame period. Framerate can be controlled in a number of other ways: framerate feature, external trigger, software trigger, shutter throttling and packet size (Format_7)

## ◆ dc1394operation_mode_t

enum dc1394operation_mode_t

Operation modes

Two operation modes exist: the legacy and most common 1394a, and the newer 1394B. The latter allows speeds over 400Mbps, but can also be used at other speeds.

## ◆ dc1394speed_t

enum dc1394speed_t

Enumeration of iso data speeds

Most (if not all) cameras are compatible with 400Mbps speed. Only older cameras (pre-1999) may still only work at sub-400 speeds. However, speeds lower than 400Mbps are still useful: they can be used for longer distances (e.g. 10m cables). Speeds over 400Mbps are only available in "B" mode (DC1394_OPERATION_MODE_1394B).

## Function Documentation

## ◆ dc1394_video_get_bandwidth_usage()

dc1394error_t dc1394_video_get_bandwidth_usage | ( | dc1394camera_t * | camera,
|  | uint32_t * | bandwidth )

Gets the bandwidth usage of a camera.

This function returns the bandwidth that is used by the camera IF ISO was ON. The returned value is in bandwidth units. The 1394 bus has 4915 bandwidth units available per cycle. Each unit corresponds to the time it takes to send one quadlet at ISO speed S1600. The bandwidth usage at S400 is thus four times the number of quadlets per packet. Thanks to Krisitian Hogsberg for clarifying this.

## ◆ dc1394_video_get_data_depth()

dc1394error_t dc1394_video_get_data_depth | ( | dc1394camera_t * | camera,
|  | uint32_t * | depth )

Gets the current data depth, in bits. Only meaningful for 16bpp video modes (RAW16, RGB48, MONO16,...)

## ◆ dc1394_video_get_framerate()

dc1394error_t dc1394_video_get_framerate | ( | dc1394camera_t * | camera,
|  | dc1394framerate_t * | framerate )

Gets the current framerate. This is meaningful only if the video mode is not scalable.

## ◆ dc1394_video_get_iso_channel()

dc1394error_t dc1394_video_get_iso_channel | ( | dc1394camera_t * | camera,
|  | uint32_t * | channel )

Gets the current ISO channel

## ◆ dc1394_video_get_iso_speed()

dc1394error_t dc1394_video_get_iso_speed | ( | dc1394camera_t * | camera,
|  | dc1394speed_t * | speed )

Gets the current ISO speed.

## ◆ dc1394_video_get_mode()

dc1394error_t dc1394_video_get_mode | ( | dc1394camera_t * | camera,
|  | dc1394video_mode_t * | video_mode )

Gets the current video mode.

## ◆ dc1394_video_get_multi_shot()

dc1394error_t dc1394_video_get_multi_shot | ( | dc1394camera_t * | camera,
|  | dc1394bool_t * | is_on,
|  | uint32_t * | numFrames )

Gets the status of the multi-shot mode.

## ◆ dc1394_video_get_one_shot()

dc1394error_t dc1394_video_get_one_shot | ( | dc1394camera_t * | camera,
|  | dc1394bool_t * | is_on )

Gets the status of the one-shot mode.

## ◆ dc1394_video_get_operation_mode()

dc1394error_t dc1394_video_get_operation_mode | ( | dc1394camera_t * | camera,
|  | dc1394operation_mode_t * | mode )

Gets the current operation mode.

## ◆ dc1394_video_get_supported_framerates()

dc1394error_t dc1394_video_get_supported_framerates | ( | dc1394camera_t * | camera,
|  | dc1394video_mode_t | video_mode,
|  | dc1394framerates_t * | framerates )

Gets a list of supported video framerates for a given video mode. This function only works with non-scalable formats.

## ◆ dc1394_video_get_supported_modes()

dc1394error_t dc1394_video_get_supported_modes | ( | dc1394camera_t * | camera,
|  | dc1394video_modes_t * | video_modes )

Gets a list of video modes supported by the camera.

## ◆ dc1394_video_get_transmission()

dc1394error_t dc1394_video_get_transmission | ( | dc1394camera_t * | camera,
|  | dc1394switch_t * | pwr )

Gets the status of the video transmission

## ◆ dc1394_video_set_framerate()

dc1394error_t dc1394_video_set_framerate | ( | dc1394camera_t * | camera,
|  | dc1394framerate_t | framerate )

Sets the current framerate. This is meaningful only if the video mode is not scalable.

## ◆ dc1394_video_set_iso_channel()

dc1394error_t dc1394_video_set_iso_channel | ( | dc1394camera_t * | camera,
|  | uint32_t | channel )

Sets the current ISO channel

## ◆ dc1394_video_set_iso_speed()

dc1394error_t dc1394_video_set_iso_speed | ( | dc1394camera_t * | camera,
|  | dc1394speed_t | speed )

Sets the current ISO speed. Speeds over 400Mbps require 1394B.

## ◆ dc1394_video_set_mode()

dc1394error_t dc1394_video_set_mode | ( | dc1394camera_t * | camera,
|  | dc1394video_mode_t | video_mode )

Sets the current video mode.

## ◆ dc1394_video_set_multi_shot()

dc1394error_t dc1394_video_set_multi_shot | ( | dc1394camera_t * | camera,
|  | uint32_t | numFrames,
|  | dc1394switch_t | pwr )

Turns multishot mode on or off

## ◆ dc1394_video_set_one_shot()

dc1394error_t dc1394_video_set_one_shot | ( | dc1394camera_t * | camera,
|  | dc1394switch_t | pwr )

Turns one-shot mode on or off

## ◆ dc1394_video_set_operation_mode()

dc1394error_t dc1394_video_set_operation_mode | ( | dc1394camera_t * | camera,
|  | dc1394operation_mode_t | mode )

Sets the current operation mode.

## ◆ dc1394_video_set_transmission()

dc1394error_t dc1394_video_set_transmission | ( | dc1394camera_t * | camera,
|  | dc1394switch_t | pwr )

Starts/stops the isochronous data transmission. In other words, use this to control the image flow.