libvdo
vdo-types.h File Reference

Vdo common type definitions. More...

#include <glib-object.h>
Include dependency graph for vdo-types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  VdoChunk
 A video chunk. More...
 
struct  VdoMemChunk
 A memory chunk. More...
 
struct  VdoResolution
 A resolution. More...
 
struct  VdoResolutionSet
 A set of resolutions. More...
 
struct  VdoRect
 A representation of a rectangle with a position. More...
 

Enumerations

enum  VdoWdrMode
 Wide Dynamic Range (WDR) modes. More...
 
enum  VdoFormat
 Video formats. More...
 
enum  VdoH264Profile
 H.264 profiles. More...
 
enum  VdoH265Profile
 H.265 profiles. More...
 
enum  VdoAV1Profile
 AV1 profiles. More...
 
enum  VdoRateControlMode
 Bitrate control modes. More...
 
enum  VdoRateControlPriority
 Bitrate control priorities. More...
 
enum  VdoFrameType
 Video frame types. More...
 
enum  VdoZipStreamProfile
 Zipstream profiles. More...
 
enum  VdoZipStreamGdr
 Zipstream GDR (Live only). More...
 
enum  VdoChunkType
 Video chunk types. More...
 
enum  VdoChunkOption
 Video chunk options. More...
 
enum  VdoStreamTimestamp
 Timestamp types. More...
 
enum  VdoIntent
 Intent values. More...
 
enum  VdoStreamEvent
 Stream related events. More...
 
enum  VdoBufferAccess
 Buffer access definitions. More...
 
enum  VdoBufferStrategy
 Buffer strategy. More...
 

Functions

union __attribute__ ((__may_alias__))
 Generic object for two signed 32bit values. More...
 
GType vdo_wdr_mode_get_type (void)
 Get wdr mode type. More...
 
GType vdo_format_get_type (void)
 Get vdo format type. More...
 
GType vdo_h264_profile_get_type (void)
 Get h264 profile type. More...
 
GType vdo_h265_profile_get_type (void)
 Get h265 profile type. More...
 
GType vdo_av1_profile_get_type (void)
 Get AV1 profile type. More...
 
GType vdo_zipstream_profile_get_type (void)
 Get zipstream profile type. More...
 
GType vdo_zipstream_gdr_get_type (void)
 Get zipstream GDR type. More...
 
GType vdo_rate_control_mode_get_type (void)
 Get rate control mode type. More...
 
GType vdo_rate_control_priority_get_type (void)
 Get rate control priority type. More...
 
GType vdo_frame_type_get_type (void)
 Get vdo frame type. More...
 

Detailed Description

Vdo common type definitions.

Copyright (C) 2016-2019, Axis Communications AB, Lund

Enumeration Type Documentation

◆ VdoAV1Profile

AV1 profiles.

Enumerator
VDO_AV1_PROFILE_NONE 

None

VDO_AV1_PROFILE_MAIN 

Main

VDO_AV1_PROFILE_MAIN_10 

Main 10-bit

◆ VdoBufferAccess

Buffer access definitions.

Specifies how buffers allocated and provided by vdo are about to be accessed.

The Range [CPU_RD..ANY_RD] is ReadOnly The Range [CPU_WR..ANY_WR] is WriteOnly The Range [CPU_RW..ANY_RW] is ReadWrite

Enumerator
VDO_BUFFER_ACCESS_NONE 

None

VDO_BUFFER_ACCESS_CPU_RD 

CPU exclusive read only access.

VDO_BUFFER_ACCESS_DEV_RD 

Device exclusive read only access.

VDO_BUFFER_ACCESS_ANY_RD 

CPU/device read only access.

VDO_BUFFER_ACCESS_CPU_WR 

CPU exclusive write access.

VDO_BUFFER_ACCESS_DEV_WR 

Device exclusive write access.

VDO_BUFFER_ACCESS_ANY_WR 

CPU/device write only access.

VDO_BUFFER_ACCESS_CPU_RW 

CPU exclusive read/write access.

VDO_BUFFER_ACCESS_DEV_RW 

Device exclusive read/write access.

VDO_BUFFER_ACCESS_ANY_RW 

CPU/device read/write access.

◆ VdoBufferStrategy

Buffer strategy.

A buffer strategy defines how buffer lifetime management is handled. That includes allocation and ownership.

Enumerator
VDO_BUFFER_STRATEGY_NONE 

None

VDO_BUFFER_STRATEGY_EXPLICIT 

Lifetime is managed by 'buffer_alloc' and 'buffer_unref' i.e the user allocates and deallocates the buffers used.

Deprecated:
Use VDO_BUFFER_STRATEGY_INFINITE
VDO_BUFFER_STRATEGY_INFINITE 

VDO creates a new buffer for every transfer. (Recommended)

◆ VdoChunkOption

Video chunk options.

Enumerator
VDO_CHUNK_OPTION_NONE 

No options

VDO_CHUNK_OPTION_MMAP 

Map all chunks

◆ VdoChunkType

Video chunk types.

Enumerator
VDO_CHUNK_NONE 

None

VDO_CHUNK_ERROR 

Error

◆ VdoFormat

enum VdoFormat

Video formats.

See vdo_buffer_get_data for data layout.

Enumerator
VDO_FORMAT_NONE 

None

VDO_FORMAT_H264 

H.264

VDO_FORMAT_H265 

H.265 (Not Artpec-6)

VDO_FORMAT_JPEG 

JPEG

VDO_FORMAT_YUV 

YUV

VDO_FORMAT_RGB 

RGB (Ambarella CV, Artpec-9)

VDO_FORMAT_PLANAR_RGB 

Planar RGB (Ambarella CV)

VDO_FORMAT_AV1 

AV1 (Artpec-9)

VDO_FORMAT_AVIF 

AVIF (Artpec-9)

◆ VdoFrameType

Video frame types.

See vdo_buffer_get_data for data layout.

Enumerator
VDO_FRAME_TYPE_NONE 

None

VDO_FRAME_TYPE_H264_IDR 

H.264 Instantaneous Decoder Refresh (IDR)

VDO_FRAME_TYPE_H264_P 

H.264 P-frame

VDO_FRAME_TYPE_H264_B 

H.264 B-frame

VDO_FRAME_TYPE_H265_IDR 

H.265 Instantaneous Decoder Refresh (IDR)

VDO_FRAME_TYPE_H265_P 

H.265 P-frame

VDO_FRAME_TYPE_H265_B 

H.265 B-frame

VDO_FRAME_TYPE_JPEG 

JPEG image

VDO_FRAME_TYPE_YUV 

YUV image

VDO_FRAME_TYPE_RGBA 

RGBA image

VDO_FRAME_TYPE_RGB 

RGB image

VDO_FRAME_TYPE_PLANAR_RGB 

Planar RGB image

VDO_FRAME_TYPE_AV1_KEY 

AV1 Key-frame

VDO_FRAME_TYPE_AV1_INTER 

AV1 Inter-frame

VDO_FRAME_TYPE_AV1_BIDI 

AV1 Bidirectional Inter-frame

VDO_FRAME_TYPE_AVIF 

AVIF image

◆ VdoH264Profile

H.264 profiles.

Enumerator
VDO_H264_PROFILE_NONE 

None

VDO_H264_PROFILE_BASELINE 

Baseline

VDO_H264_PROFILE_MAIN 

Main

VDO_H264_PROFILE_HIGH 

High

◆ VdoH265Profile

H.265 profiles.

Enumerator
VDO_H265_PROFILE_NONE 

None

VDO_H265_PROFILE_MAIN 

Main

VDO_H265_PROFILE_MAIN_10 

Main 10-bit

◆ VdoIntent

enum VdoIntent

Intent values.

An intent describes how a client intends to make use of a resource, e.g. a VdoStream. Beware VDO_INTENT_MONITOR and VDO_INTENT_EVENTFD are mutually exclusive.

Enumerator
VDO_INTENT_NONE 

None

VDO_INTENT_CONTROL 

The client intends to control the resource

VDO_INTENT_MONITOR 

The client intends to monitor the resource using g_signal

VDO_INTENT_CONSUME 

The client intends to consume the resource

VDO_INTENT_PRODUCE 

The client intends to produce the resource

VDO_INTENT_DEFAULT 

Default, consume + control

VDO_INTENT_EVENTFD 

Monitor resources using file descriptors

VDO_INTENT_UNIVERSE 

Everything except VDO_INTENT_EVENTFD

◆ VdoRateControlMode

Bitrate control modes.

Enumerator
VDO_RATE_CONTROL_MODE_NONE 

None

VDO_RATE_CONTROL_MODE_CBR 

Constant bitrate

VDO_RATE_CONTROL_MODE_VBR 

Variable bitrate

VDO_RATE_CONTROL_MODE_MBR 

Maximum bitrate

VDO_RATE_CONTROL_MODE_ABR 

Average bitrate

◆ VdoRateControlPriority

Bitrate control priorities.

Enumerator
VDO_RATE_CONTROL_PRIORITY_NONE 

None

VDO_RATE_CONTROL_PRIORITY_FRAMERATE 

Prioritize framerate

VDO_RATE_CONTROL_PRIORITY_QUALITY 

Prioritize quality

VDO_RATE_CONTROL_PRIORITY_FULL_FRAMERATE 

Prioritize full framerate

◆ VdoStreamEvent

Stream related events.

Important asynchronous stream events, see vdo_stream_get_event.

Enumerator
VDO_STREAM_EVENT_NONE 

None

VDO_STREAM_EVENT_STARTED 

The stream started

VDO_STREAM_EVENT_STOPPED 

The stream stopped

VDO_STREAM_EVENT_RESOURCE 

Current resource usage

VDO_STREAM_EVENT_QUOTA_SOFT 

Warning above soft quota

VDO_STREAM_EVENT_QUOTA_HARD 

Error hard quota hit

VDO_STREAM_EVENT_ZIPSTREAM 

Zipstream settings

VDO_STREAM_EVENT_BUFFERING 

Likely to reach target (No compromises)

VDO_STREAM_EVENT_BUFFERING_WARN 

Likely to reach target (With compromises)

VDO_STREAM_EVENT_BUFFERING_FAIL 

Failed to reach target

VDO_STREAM_EVENT_CREATED 

Private/Internal

VDO_STREAM_EVENT_CLOSED 

Private/Internal

VDO_STREAM_EVENT_EXISTING 

Private/Internal

VDO_STREAM_EVENT_INVALID 

Invalid event

◆ VdoStreamTimestamp

Timestamp types.

Enumerator
VDO_TIMESTAMP_NONE 

None

VDO_TIMESTAMP_UTC 
Deprecated:
Use vdo_frame_get_utc timestamp This is equivalent to gettimeofday but uses a single µs counter.
VDO_TIMESTAMP_ZIPSTREAM 

Value can be read from timestamp. dsp_pts for zipstream and mono_pts for non-zipstream.

VDO_TIMESTAMP_MONO_CAPTURE 

Value can be read from timestamp, dsp_pts for zipstream and mono_pts for non-zipstream.

VDO_TIMESTAMP_MONO_SERVER 

Value can be read from custom_timestamp which shows server timestamp, monotonic_time.

VDO_TIMESTAMP_MONO_CLIENT 

Value can be read from custom_timestamp which shows client timestamp, monotonic_time.

VDO_TIMESTAMP_MONO_CLIENT_SERVER_DIFF 

Value can be read from custom_timestamp which shows the diff between client and server timestamp.

VDO_TIMESTAMP_MONO_CLIENT_CAPTURE_DIFF 

Value can be read from custom_timestamp which shows the diff between client and capture timestamp.

◆ VdoWdrMode

enum VdoWdrMode

Wide Dynamic Range (WDR) modes.

Enumerator
VDO_WDR_MODE_NONE 

None

VDO_WDR_MODE_LINEAR 

Linear

VDO_WDR_MODE_2X 

2 exposures

VDO_WDR_MODE_3X 

3 exposures

VDO_WDR_MODE_4X 

4 exposures

VDO_WDR_MODE_SENSOR 

Sensor internal

VDO_WDR_MODE_OFF 

No sensor used, for some platforms this means no video

VDO_WDR_MODE_AUTO 

Choose default WDR mode from sensor driver

◆ VdoZipStreamGdr

Zipstream GDR (Live only).

Enumerator
VDO_ZIPSTREAM_GDR_NONE 

None

VDO_ZIPSTREAM_GDR_AUTO 

Auto, vdo will setup

VDO_ZIPSTREAM_GDR_OFF 

No GDR

VDO_ZIPSTREAM_GDR_BALANCED 

Mostly GDR, some I-frames

VDO_ZIPSTREAM_GDR_EXTREME 

GDR, no I-frames except for first frame and when requested

◆ VdoZipStreamProfile

Zipstream profiles.

Enumerator
VDO_ZIPSTREAM_PROFILE_NONE 

None

VDO_ZIPSTREAM_PROFILE_CLASSIC 

Classic

VDO_ZIPSTREAM_PROFILE_STORAGE 

Storage

VDO_ZIPSTREAM_PROFILE_LIVE 

Live, NetworkLoadBalancing

Function Documentation

◆ __attribute__()

union __attribute__ ( (__may_alias__)  )

Generic object for two signed 32bit values.

Generic object for four unsigned 32bit values.

Generic object for four signed 32bit values.

Generic object for two unsigned 32bit values.

Example:

// Create a signed 32bit pair, representing some type.
VdoPair32i pair = {1, 2};
// Use the pair as a coordinate.
gint32 x = pair.x;
gint32 y = pair.y;
// Use the pair as a size.
gint32 width = pair.w;
gint32 height = pair.h;
// Use the pair as a ratio.
gint32 num = pair.num;
gint32 den = pair.den;
// Access an arbitrary value.
gint32 pair = pair[0];

Example:

// Create an unsigned 32bit pair, representing some type.
VdoPair32u pair = {1, 2};
// Use the pair as a coordinate.
guint32 x = pair.x;
guint32 y = pair.y;
// Use the pair as a size.
guint32 width = pair.w;
guint32 height = pair.h;
// Use the pair as a ratio.
guint32 num = pair.num;
guint32 den = pair.den;
// Access an arbitrary value.
gint32 pair = pair[0];

Example:

// Create an object with four signed 32bit value, representing some type.
VdoPair32i obj = {1, 2, 3, 4};
// Use the object as a rectangle.
gint32 x = obj.x;
gint32 y = obj.y;
gint32 width = obj.w;
gint32 height = obj.h;
// Access an arbitrary value.
gint32 val = obj[0];

Example:

// Create an object with four unsigned 32bit value, representing some type.
VdoPair32i obj = {1, 2, 3, 4};
// Use the object as a rectangle.
guint32 x = obj.x;
guint32 y = obj.y;
guint32 width = obj.w;
guint32 height = obj.h;
// Access an arbitrary value.
gint32 pair = obj[0];

◆ vdo_av1_profile_get_type()

GType vdo_av1_profile_get_type ( void  )

Get AV1 profile type.

Returns
GType: none,main,main-10

◆ vdo_format_get_type()

GType vdo_format_get_type ( void  )

Get vdo format type.

Returns
GType: none,h264,h265,jpeg,yuv,rgba,rgb,rgbp,av1

◆ vdo_frame_type_get_type()

GType vdo_frame_type_get_type ( void  )

Get vdo frame type.

Returns
GType: none, h264-idr,h264-p,h264-b, h265-idr,h265-p,h265-b, jpeg,yuv,rgba,rgb,rgbp, av1-key,av1-inter,av1-bidi

◆ vdo_h264_profile_get_type()

GType vdo_h264_profile_get_type ( void  )

Get h264 profile type.

Returns
GType: none,baseline,main,high

◆ vdo_h265_profile_get_type()

GType vdo_h265_profile_get_type ( void  )

Get h265 profile type.

Returns
GType: none,main,main-10

◆ vdo_rate_control_mode_get_type()

GType vdo_rate_control_mode_get_type ( void  )

Get rate control mode type.

Returns
GType: none,cbr,vbr,mbr,abr

◆ vdo_rate_control_priority_get_type()

GType vdo_rate_control_priority_get_type ( void  )

Get rate control priority type.

Returns
GType: none,framerate,quality,full_framerate

◆ vdo_wdr_mode_get_type()

GType vdo_wdr_mode_get_type ( void  )

Get wdr mode type.

Returns
GType: none,linear,2x,3x,4x,sensor

◆ vdo_zipstream_gdr_get_type()

GType vdo_zipstream_gdr_get_type ( void  )

Get zipstream GDR type.

Returns
GType: none,auto,off,balanced,always

◆ vdo_zipstream_profile_get_type()

GType vdo_zipstream_profile_get_type ( void  )

Get zipstream profile type.

Returns
GType: none,classic,storage,live