# Overview

## Introduction

Aravis is a GObject based library for the control and the video stream acquisition of digital cameras.

While using GenICam xml files for the description of the camera registers, it does not try to be a complete implementation of the Genicam API as described in the GenAPI GenICam document. Nevertheless, a good knowledge of the GenICam standard should help the user to understand how Aravis operates.

Aravis currently provides an implementation of a gigabit ethernet UDP based protocol, found in a lot of ethernet industrial cameras.

ArvCamera is a simple API for easy access of standard camera features.

ArvDevice and ArvGc are more low level APIs, which enable the full control of the cameras, allowing the use of the features specific to each model.

## Thread Safety

Aravis is not thread safe, which means one can not use the same object simultaneously from different threads, without using mutexes. But it is perfectly fine to use different aravis objects in different threads, with the exception of the ArvInterface instances.

A possible trap is that glib signal callbacks are called from the thread that emitted the corresponding signal. For example, the "new-buffer" callback is emitted from the stream packet receiving thread, which is an internal thread created by ArvGvStream. It is not safe to use ArvDevice and some ArvStream functions from this callback without using mutexes. The exceptions are arv_stream_push_buffer(), arv_stream_pop_buffer(), arv_stream_try_pop_buffer() and arv_stream_timeout_pop_buffer().

## Building and Debugging Aravis

Aravis is built using meson build system. Release tarballs are stored on http://ftp.gnome.org/pub/GNOME/sources/aravis. You can build and install Aravis like any other meson project:

    		    meson build
    		    cd build
    		    ninja
    		    ninja install

The build can be configured at any time using `meson configure` in the build directory. meson configure invoked without any other argument will show the configuration options.

On some platforms (like Ubuntu), you may have to configure the dynamic linker (ld) to let it know where the aravis libraries are installed, and run ldconfig as root in order to update ld cache

The ARV_DEBUG environment variable can be set to a comma separated list of debugging categories, which will make Aravis print out different types of debugging informations to the console. A debug level can also be specified, using a number from 0 (none) to 3 (log) separated from the category name by a colon. For example, the following command before running an Aravis based application will make Aravis print out all stream and device related informations:

    				export ARV_DEBUG=stream:3,device:3

Available categories are:

- all
- interface
- device
- chunk
- stream
- stream-thread
- cp
- sp
- genicam
- evaluator
- dom
- misc