ARX  1.0
The next-generation open source augmented reality toolkit.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
videoConfig.h
Go to the documentation of this file.
1/*
2 * videoConfig.h
3 * artoolkitX
4 *
5 * This file is part of artoolkitX.
6 *
7 * artoolkitX is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * artoolkitX is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with artoolkitX. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * As a special exception, the copyright holders of this library give you
21 * permission to link this library with independent modules to produce an
22 * executable, regardless of the license terms of these independent modules, and to
23 * copy and distribute the resulting executable under terms of your choice,
24 * provided that you also meet, for each linked independent module, the terms and
25 * conditions of the license of that module. An independent module is a module
26 * which is neither derived from nor based on this library. If you modify this
27 * library, you may extend this exception to your version of the library, but you
28 * are not obligated to do so. If you do not wish to do so, delete this exception
29 * statement from your version.
30 *
31 * Copyright 2018 Realmax, Inc.
32 * Copyright 2015 Daqri, LLC.
33 * Copyright 2002-2015 ARToolworks, Inc.
34 *
35 * Author(s): Hirokazu Kato, Philip Lamb
36 *
37 */
38
39#ifndef AR_VIDEO_CONFIG_H
40#define AR_VIDEO_CONFIG_H
41
42#include <ARX/AR/config.h>
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48#ifdef ARVIDEO_INPUT_V4L2
49#define AR_VIDEO_V4L2_MODE_PAL 0
50#define AR_VIDEO_V4L2_MODE_NTSC 1
51#define AR_VIDEO_V4L2_MODE_SECAM 2
52#define AR_VIDEO_V4L2_DEFAULT_DEVICE "/dev/video0"
53#define AR_VIDEO_V4L2_DEFAULT_WIDTH 640
54#define AR_VIDEO_V4L2_DEFAULT_HEIGHT 480
55#define AR_VIDEO_V4L2_DEFAULT_CHANNEL 0
56#define AR_VIDEO_V4L2_DEFAULT_MODE AR_VIDEO_V4L2_MODE_NTSC
57#define AR_VIDEO_V4L2_DEFAULT_FORMAT_CONVERSION AR_PIXEL_FORMAT_BGRA // Options include AR_PIXEL_FORMAT_INVALID for no conversion, AR_PIXEL_FORMAT_BGRA, and AR_PIXEL_FORMAT_RGBA.
58#endif
59
60
61#ifdef ARVIDEO_INPUT_LIBDC1394
62enum {
63 AR_VIDEO_1394_MODE_320x240_YUV422 = 32,
64 AR_VIDEO_1394_MODE_640x480_YUV411,
65 AR_VIDEO_1394_MODE_640x480_YUV411_HALF,
66 AR_VIDEO_1394_MODE_640x480_YUV422,
67 AR_VIDEO_1394_MODE_640x480_RGB,
68 AR_VIDEO_1394_MODE_640x480_MONO,
69 AR_VIDEO_1394_MODE_640x480_MONO_COLOR,
70 AR_VIDEO_1394_MODE_640x480_MONO_COLOR_HALF,
71 AR_VIDEO_1394_MODE_640x480_MONO_COLOR2,
72 AR_VIDEO_1394_MODE_640x480_MONO_COLOR_HALF2,
73 AR_VIDEO_1394_MODE_640x480_MONO_COLOR3,
74 AR_VIDEO_1394_MODE_640x480_MONO_COLOR_HALF3,
75 AR_VIDEO_1394_MODE_800x600_RGB,
76 AR_VIDEO_1394_MODE_800x600_MONO,
77 AR_VIDEO_1394_MODE_800x600_MONO_COLOR,
78 AR_VIDEO_1394_MODE_800x600_MONO_COLOR_HALF,
79 AR_VIDEO_1394_MODE_800x600_MONO_COLOR2,
80 AR_VIDEO_1394_MODE_800x600_MONO_COLOR_HALF2,
81 AR_VIDEO_1394_MODE_800x600_MONO_COLOR3,
82 AR_VIDEO_1394_MODE_800x600_MONO_COLOR_HALF3,
83 AR_VIDEO_1394_MODE_1024x768_RGB,
84 AR_VIDEO_1394_MODE_1024x768_MONO,
85 AR_VIDEO_1394_MODE_1024x768_MONO_COLOR,
86 AR_VIDEO_1394_MODE_1024x768_MONO_COLOR_HALF,
87 AR_VIDEO_1394_MODE_1024x768_MONO_COLOR2,
88 AR_VIDEO_1394_MODE_1024x768_MONO_COLOR_HALF2,
89 AR_VIDEO_1394_MODE_1024x768_MONO_COLOR3,
90 AR_VIDEO_1394_MODE_1024x768_MONO_COLOR_HALF3,
91 AR_VIDEO_1394_MODE_1280x720_RGB,
92 AR_VIDEO_1394_MODE_1280x720_MONO,
93 AR_VIDEO_1394_MODE_1280x720_MONO_COLOR,
94 AR_VIDEO_1394_MODE_1280x720_MONO_COLOR_HALF,
95 AR_VIDEO_1394_MODE_1280x720_MONO_COLOR2,
96 AR_VIDEO_1394_MODE_1280x720_MONO_COLOR_HALF2,
97 AR_VIDEO_1394_MODE_1280x720_MONO_COLOR3,
98 AR_VIDEO_1394_MODE_1280x720_MONO_COLOR_HALF3,
99 AR_VIDEO_1394_MODE_1280x960_RGB,
100 AR_VIDEO_1394_MODE_1280x960_MONO,
101 AR_VIDEO_1394_MODE_1280x960_MONO_COLOR,
102 AR_VIDEO_1394_MODE_1280x960_MONO_COLOR_HALF,
103 AR_VIDEO_1394_MODE_1280x960_MONO_COLOR2,
104 AR_VIDEO_1394_MODE_1280x960_MONO_COLOR_HALF2,
105 AR_VIDEO_1394_MODE_1280x960_MONO_COLOR3,
106 AR_VIDEO_1394_MODE_1280x960_MONO_COLOR_HALF3,
107 AR_VIDEO_1394_MODE_1280x1024_RGB,
108 AR_VIDEO_1394_MODE_1280x1024_MONO,
109 AR_VIDEO_1394_MODE_1280x1024_MONO_COLOR,
110 AR_VIDEO_1394_MODE_1280x1024_MONO_COLOR_HALF,
111 AR_VIDEO_1394_MODE_1280x1024_MONO_COLOR2,
112 AR_VIDEO_1394_MODE_1280x1024_MONO_COLOR_HALF2,
113 AR_VIDEO_1394_MODE_1280x1024_MONO_COLOR3,
114 AR_VIDEO_1394_MODE_1280x1024_MONO_COLOR_HALF3,
115 AR_VIDEO_1394_MODE_1600x900_RGB,
116 AR_VIDEO_1394_MODE_1600x900_MONO,
117 AR_VIDEO_1394_MODE_1600x900_MONO_COLOR,
118 AR_VIDEO_1394_MODE_1600x900_MONO_COLOR_HALF,
119 AR_VIDEO_1394_MODE_1600x900_MONO_COLOR2,
120 AR_VIDEO_1394_MODE_1600x900_MONO_COLOR_HALF2,
121 AR_VIDEO_1394_MODE_1600x900_MONO_COLOR3,
122 AR_VIDEO_1394_MODE_1600x900_MONO_COLOR_HALF3,
123 AR_VIDEO_1394_MODE_1600x1200_RGB,
124 AR_VIDEO_1394_MODE_1600x1200_MONO,
125 AR_VIDEO_1394_MODE_1600x1200_MONO_COLOR,
126 AR_VIDEO_1394_MODE_1600x1200_MONO_COLOR_HALF,
127 AR_VIDEO_1394_MODE_1600x1200_MONO_COLOR2,
128 AR_VIDEO_1394_MODE_1600x1200_MONO_COLOR_HALF2,
129 AR_VIDEO_1394_MODE_1600x1200_MONO_COLOR3,
130 AR_VIDEO_1394_MODE_1600x1200_MONO_COLOR_HALF3
131};
132#define AR_VIDEO_1394_FRAME_RATE_1_875 1
133#define AR_VIDEO_1394_FRAME_RATE_3_75 2
134#define AR_VIDEO_1394_FRAME_RATE_7_5 3
135#define AR_VIDEO_1394_FRAME_RATE_15 4
136#define AR_VIDEO_1394_FRAME_RATE_30 5
137#define AR_VIDEO_1394_FRAME_RATE_60 6
138#define AR_VIDEO_1394_FRAME_RATE_120 7
139#define AR_VIDEO_1394_FRAME_RATE_240 8
140#define AR_VIDEO_1394_SPEED_400 1
141#define AR_VIDEO_1394_SPEED_800 2
142
143#if ARVIDEO_INPUT_LIBDC1394_DEFAULT_PIXEL_FORMAT == AR_PIXEL_FORMAT_MONO
144# if defined(ARVIDEO_INPUT_LIBDC1394_USE_FLEA_XGA)
145# define AR_VIDEO_1394_DEFAULT_MODE AR_VIDEO_1394_MODE_1024x768_MONO
146# else
147# define AR_VIDEO_1394_DEFAULT_MODE AR_VIDEO_1394_MODE_640x480_MONO
148# endif
149#else
150# if defined(ARVIDEO_INPUT_LIBDC1394_USE_DRAGONFLY)
151# define AR_VIDEO_1394_DEFAULT_MODE AR_VIDEO_1394_MODE_640x480_MONO_COLOR
152# elif defined(ARVIDEO_INPUT_LIBDC1394_USE_DF_EXPRESS)
153# define AR_VIDEO_1394_DEFAULT_MODE AR_VIDEO_1394_MODE_640x480_MONO_COLOR2
154# elif defined(ARVIDEO_INPUT_LIBDC1394_USE_FLEA)
155# define AR_VIDEO_1394_DEFAULT_MODE AR_VIDEO_1394_MODE_640x480_MONO_COLOR2
156# elif defined(ARVIDEO_INPUT_LIBDC1394_USE_FLEA_XGA)
157# define AR_VIDEO_1394_DEFAULT_MODE AR_VIDEO_1394_MODE_1024x768_MONO_COLOR
158# elif defined(ARVIDEO_INPUT_LIBDC1394_USE_DFK21AF04)
159# define AR_VIDEO_1394_DEFAULT_MODE AR_VIDEO_1394_MODE_640x480_MONO_COLOR3
160# else
161# define AR_VIDEO_1394_DEFAULT_MODE AR_VIDEO_1394_MODE_640x480_YUV411
162# endif
163#endif
164#define AR_VIDEO_1394_DEFAULT_FRAME_RATE AR_VIDEO_1394_FRAME_RATE_30
165#define AR_VIDEO_1394_DEFAULT_SPEED AR_VIDEO_1394_SPEED_400
166#define AR_VIDEO_1394_DEFAULT_PORT 0
167#endif
168
169#ifdef __cplusplus
170}
171#endif
172#endif // !AR_VIDEO_CONFIG_H