| ARX 1.0 The next-generation open source augmented reality toolkit.

Loading...
Searching...
No Matches
video.h
Go to the documentation of this file.
1/*
2 * video.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-2016 Daqri, LLC.
33 * Copyright 2002-2015 ARToolworks, Inc.
34 *
35 * Author(s): Hirokazu Kato, Atsishi Nakazawa, Philip Lamb
36 *
37 */
38/*
39 *
40 * Author: Hirokazu Kato, Atsishi Nakazawa
41 *
42 * kato@sys.im.hiroshima-cu.ac.jp
43 * nakazawa@inolab.sys.es.osaka-u.ac.jp
44 *
45 * Revision: 4.3
46 * Date: 2002/01/01
47 *
48 */
49
50#ifndef AR_VIDEO_H
51#define AR_VIDEO_H
52
53#include <ARX/AR/ar.h>
54#include <ARX/ARVideo/videoConfig.h>
55#include <limits.h>
56
57#ifdef __cplusplus
58 extern "C" {
59#endif
60
61 typedef enum {
62 AR_VIDEO_MODULE_DUMMY = 0,
63 AR_VIDEO_MODULE_EXTERNAL = 1,
64 AR_VIDEO_MODULE_RESERVED2 = 2,
65 AR_VIDEO_MODULE_1394 = 3,
66 AR_VIDEO_MODULE_RESERVED4 = 4,
67 AR_VIDEO_MODULE_RESERVED5 = 5,
68 AR_VIDEO_MODULE_RESERVED6 = 6,
69 AR_VIDEO_MODULE_RESERVED7 = 7,
70 AR_VIDEO_MODULE_RESERVED8 = 8,
71 AR_VIDEO_MODULE_RESERVED9 = 9,
72 AR_VIDEO_MODULE_RESERVED10 = 10,
73 AR_VIDEO_MODULE_GSTREAMER = 11,
74 AR_VIDEO_MODULE_AVFOUNDATION = 12,
75 AR_VIDEO_MODULE_RESERVED13 = 13,
76 AR_VIDEO_MODULE_IMAGE = 14,
77 AR_VIDEO_MODULE_ANDROID = 15,
78 AR_VIDEO_MODULE_WINDOWS_MEDIA_FOUNDATION = 16,
79 AR_VIDEO_MODULE_WINDOWS_MEDIA_CAPTURE = 17,
80 AR_VIDEO_MODULE_V4L2 = 18,
81 AR_VIDEO_MODULE_EMSCRIPTEN = 19,
82 AR_VIDEO_MODULE_MAX = 19,
83} AR_VIDEO_MODULE;
84
85//
86// arVideoParamGet/arVideoParamSet names.
87//
88
89#define AR_VIDEO_1394_BRIGHTNESS 65
90#define AR_VIDEO_1394_BRIGHTNESS_FEATURE_ON 66
91#define AR_VIDEO_1394_BRIGHTNESS_AUTO_ON 67
92#define AR_VIDEO_1394_BRIGHTNESS_MAX_VAL 68
93#define AR_VIDEO_1394_BRIGHTNESS_MIN_VAL 69
94#define AR_VIDEO_1394_EXPOSURE 70
95#define AR_VIDEO_1394_EXPOSURE_FEATURE_ON 71
96#define AR_VIDEO_1394_EXPOSURE_AUTO_ON 72
97#define AR_VIDEO_1394_EXPOSURE_MAX_VAL 73
98#define AR_VIDEO_1394_EXPOSURE_MIN_VAL 74
99#define AR_VIDEO_1394_WHITE_BALANCE 75
100#define AR_VIDEO_1394_WHITE_BALANCE_UB 76
101#define AR_VIDEO_1394_WHITE_BALANCE_VR 77
102#define AR_VIDEO_1394_WHITE_BALANCE_FEATURE_ON 78
103#define AR_VIDEO_1394_WHITE_BALANCE_AUTO_ON 79
104#define AR_VIDEO_1394_WHITE_BALANCE_MAX_VAL 80
105#define AR_VIDEO_1394_WHITE_BALANCE_MIN_VAL 81
106#define AR_VIDEO_1394_SHUTTER_SPEED 82
107#define AR_VIDEO_1394_SHUTTER_SPEED_FEATURE_ON 83
108#define AR_VIDEO_1394_SHUTTER_SPEED_AUTO_ON 84
109#define AR_VIDEO_1394_SHUTTER_SPEED_MAX_VAL 85
110#define AR_VIDEO_1394_SHUTTER_SPEED_MIN_VAL 86
111#define AR_VIDEO_1394_GAIN 87
112#define AR_VIDEO_1394_GAIN_FEATURE_ON 88
113#define AR_VIDEO_1394_GAIN_AUTO_ON 89
114#define AR_VIDEO_1394_GAIN_MAX_VAL 90
115#define AR_VIDEO_1394_GAIN_MIN_VAL 91
116#define AR_VIDEO_1394_FOCUS 92
117#define AR_VIDEO_1394_FOCUS_FEATURE_ON 93
118#define AR_VIDEO_1394_FOCUS_AUTO_ON 94
119#define AR_VIDEO_1394_FOCUS_MAX_VAL 95
120#define AR_VIDEO_1394_FOCUS_MIN_VAL 96
121#define AR_VIDEO_1394_GAMMA 97
122#define AR_VIDEO_1394_GAMMA_FEATURE_ON 98
123#define AR_VIDEO_1394_GAMMA_AUTO_ON 99
124#define AR_VIDEO_1394_GAMMA_MAX_VAL 100
125#define AR_VIDEO_1394_GAMMA_MIN_VAL 101
126
127#define AR_VIDEO_PARAM_GET_IMAGE_ASYNC 200
128#define AR_VIDEO_PARAM_DEVICEID 201
129#define AR_VIDEO_PARAM_NAME 202
130
135#define AR_VIDEO_PARAM_CAMERA_FOCAL_LENGTH 300
136#define AR_VIDEO_FOCUS_MODE 301
137#define AR_VIDEO_FOCUS_MANUAL_DISTANCE 302
138#define AR_VIDEO_FOCUS_POINT_OF_INTEREST_X 303
139#define AR_VIDEO_FOCUS_POINT_OF_INTEREST_Y 304
140
141#define AR_VIDEO_PARAM_AVFOUNDATION_IOS_DEVICE 400
142#define AR_VIDEO_PARAM_AVFOUNDATION_FOCUS_PRESET 401
143#define AR_VIDEO_PARAM_AVFOUNDATION_CAMERA_POSITION 402
144#define AR_VIDEO_PARAM_AVFOUNDATION_WILL_CAPTURE_NEXT_FRAME 403
145
146#define AR_VIDEO_PARAM_ANDROID_CAMERA_INDEX 500
147#define AR_VIDEO_PARAM_ANDROID_CAMERA_FACE 501
148#define AR_VIDEO_PARAM_ANDROID_INTERNET_STATE 502
149#define AR_VIDEO_PARAM_ANDROID_FOCAL_LENGTH 503
150
151#define AR_VIDEO_GET_VERSION INT_MAX
152
153// For arVideoParamGet(AR_VIDEO_FOCUS_MODE, ...)
154#define AR_VIDEO_FOCUS_MODE_FIXED 0
155#define AR_VIDEO_FOCUS_MODE_AUTO 1
156#define AR_VIDEO_FOCUS_MODE_POINT_OF_INTEREST 2
157#define AR_VIDEO_FOCUS_MODE_MANUAL 3
158
159 typedef enum {
160 AR_VIDEO_SIZE_PREFERENCE_ANY = 0,
161 AR_VIDEO_SIZE_PREFERENCE_EXACT,
162 AR_VIDEO_SIZE_PREFERENCE_CLOSEST_SAME_ASPECT,
163 AR_VIDEO_SIZE_PREFERENCE_CLOSEST_PIXEL_COUNT,
164 AR_VIDEO_SIZE_PREFERENCE_SAME_ASPECT,
165 AR_VIDEO_SIZE_PREFERENCE_LARGEST_WITH_MAXIMUM,
166 AR_VIDEO_SIZE_PREFERENCE_SMALLEST_WITH_MINIMUM,
167 AR_VIDEO_SIZE_PREFERENCE_LARGEST,
168 AR_VIDEO_SIZE_PREFERENCE_SMALLEST
169} ARVideoSizePreference;
170
171
175 typedef enum {
176 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE3G = 1,
177 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE3GS,
178 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE4,
179 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPODTOUCH4,
180 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD2,
181 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD3,
182 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE_GENERIC,
183 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPOD_GENERIC,
184 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD_GENERIC,
185 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE4S,
186 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_APPLETV_GENERIC,
187 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5,
188 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPODTOUCH5,
189 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD4,
190 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI,
191 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5C,
192 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5S,
193 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADAIR,
194 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI2,
195 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI3,
196 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI4,
197 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADAIR2,
198 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6,
199 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6PLUS,
200 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6S,
201 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6SPLUS,
202 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONESE,
203 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADPRO129,
204 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE7,
205 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE7PLUS,
206 AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADPRO97,
207} AR_VIDEO_AVFOUNDATION_IOS_DEVICE;
208
212 typedef enum {
213 AR_VIDEO_AVFOUNDATION_FOCUS_NONE = 0,
214 AR_VIDEO_AVFOUNDATION_FOCUS_MACRO,
215 AR_VIDEO_AVFOUNDATION_FOCUS_0_3M,
216 AR_VIDEO_AVFOUNDATION_FOCUS_1_0M,
217 AR_VIDEO_AVFOUNDATION_FOCUS_INF
218} AR_VIDEO_AVFOUNDATION_FOCUS_PRESET;
219
223 typedef enum {
224 AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_UNKNOWN = -1,
225 AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_UNSPECIFIED = 0,
226 AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_REAR,
227 AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT,
228 AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_REAR_STEREO_LEFT,
229 AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_REAR_STEREO_RIGHT,
230 AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT_STEREO_LEFT,
231 AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT_STEREO_RIGHT
232} AR_VIDEO_AVFOUNDATION_CAMERA_POSITION;
233
237 typedef enum {
238 AR_VIDEO_ANDROID_CAMERA_FACE_REAR = 0,
239 AR_VIDEO_ANDROID_CAMERA_FACE_FRONT,
240} AR_VIDEO_ANDROID_CAMERA_FACE;
241
245#define AR_VIDEO_POSITION_UNKNOWN 0x0000
246#define AR_VIDEO_POSITION_FRONT 0x0008
247#define AR_VIDEO_POSITION_BACK 0x0010
248#define AR_VIDEO_POSITION_LEFT 0x0018
249#define AR_VIDEO_POSITION_RIGHT 0x0020
250#define AR_VIDEO_POSITION_TOP 0x0028
251#define AR_VIDEO_POSITION_BOTTOM 0x0030
252#define AR_VIDEO_POSITION_OTHER 0x0038
253
257#define AR_VIDEO_STEREO_MODE_MONO 0x0000
258#define AR_VIDEO_STEREO_MODE_LEFT 0x0040
259#define AR_VIDEO_STEREO_MODE_RIGHT 0x0080
260#define AR_VIDEO_STEREO_MODE_FRAME_SEQUENTIAL 0x00C0
261#define AR_VIDEO_STEREO_MODE_SIDE_BY_SIDE 0x0100
262#define AR_VIDEO_STEREO_MODE_OVER_UNDER 0x0140
263#define AR_VIDEO_STEREO_MODE_HALF_SIDE_BY_SIDE 0x0180
264#define AR_VIDEO_STEREO_MODE_OVER_UNDER_HALF_HEIGHT 0x01C0
265#define AR_VIDEO_STEREO_MODE_ROW_INTERLACED 0x0200
266#define AR_VIDEO_STEREO_MODE_COLUMN_INTERLACED 0x0240
267#define AR_VIDEO_STEREO_MODE_ROW_AND_COLUMN_INTERLACED 0x0280
268#define AR_VIDEO_STEREO_MODE_ANAGLYPH_RG 0x02C0
269#define AR_VIDEO_STEREO_MODE_ANAGLYPH_RB 0x0300
270#define AR_VIDEO_STEREO_MODE_RESERVED0 0x0340
271#define AR_VIDEO_STEREO_MODE_RESERVED1 0x0380
272#define AR_VIDEO_STEREO_MODE_RESERVED2 0x03C0
273
277#define AR_VIDEO_SOURCE_INFO_FLAG_OFFLINE 0x0001
278#define AR_VIDEO_SOURCE_INFO_FLAG_IN_USE 0x0002
279#define AR_VIDEO_SOURCE_INFO_FLAG_OPEN_ASYNC 0x0004
280#define AR_VIDEO_SOURCE_INFO_POSITION_MASK 0x0038
281#define AR_VIDEO_SOURCE_INFO_STEREO_MODE_MASK 0x03C0
282
286 typedef struct {
287 char *name;
288 char *model;
289 char *UID;
290 uint32_t flags;
291 char *open_token;
292} ARVideoSourceInfoT;
293
297 typedef struct {
298 int count;
299 ARVideoSourceInfoT *info;
300} ARVideoSourceInfoListT;
301
302 typedef void (*AR_VIDEO_FRAME_READY_CALLBACK)(void *);
303
304#ifdef _WIN32
305# ifdef ARVIDEO_STATIC
306# define ARVIDEO_EXTERN
307# else
308# ifdef ARX_EXPORTS
309# define ARVIDEO_EXTERN __declspec(dllexport)
310# else
311# define ARVIDEO_EXTERN __declspec(dllimport)
312# endif
313# endif
314#else
315# define ARVIDEO_EXTERN
316#endif
317
318#include <ARX/ARVideo/videoLuma.h>
319
320 typedef struct {
321 int module;
322 void *moduleParam;
323 ARVideoLumaInfo *lumaInfo;
324} AR2VideoParamT;
325
326// AR2VideoBufferT is defined in <ARX/AR/ar.h>
327
328 ARVIDEO_EXTERN AR_VIDEO_MODULE arVideoGetDefaultModule(void);
329
341 ARVIDEO_EXTERN int arVideoOpen (const char *config);
342
360 ARVIDEO_EXTERN int arVideoOpenAsync (const char *config, void (*callback)(void *), void *userdata);
361
362 ARVIDEO_EXTERN int arVideoClose (void);
363 ARVIDEO_EXTERN int arVideoDispOption (void);
364 ARVIDEO_EXTERN AR_VIDEO_MODULE arVideoGetModule (void);
365 ARVIDEO_EXTERN int arVideoGetId (ARUint32 *id0, ARUint32 *id1);
366 ARVIDEO_EXTERN int arVideoGetSize (int *x, int *y);
367 ARVIDEO_EXTERN int arVideoGetPixelSize (void);
368 ARVIDEO_EXTERN AR_PIXEL_FORMAT arVideoGetPixelFormat (void);
369
376 ARVIDEO_EXTERN AR2VideoBufferT *arVideoGetImage (void);
377
383 ARVIDEO_EXTERN int arVideoCapStart (void);
384
394 ARVIDEO_EXTERN int arVideoCapStartAsync (AR_VIDEO_FRAME_READY_CALLBACK callback, void *userdata);
395
396
402 ARVIDEO_EXTERN int arVideoCapStop (void);
403
410 ARVIDEO_EXTERN int arVideoGetParami (int paramName, int *value);
411
418 ARVIDEO_EXTERN int arVideoSetParami (int paramName, int value);
419
426 ARVIDEO_EXTERN int arVideoGetParamd (int paramName, double *value);
427
434 ARVIDEO_EXTERN int arVideoSetParamd (int paramName, double value);
435
445 ARVIDEO_EXTERN int arVideoGetParams (const int paramName, char **value);
446
453 ARVIDEO_EXTERN int arVideoSetParams (const int paramName, const char *value);
454
455 ARVIDEO_EXTERN int arVideoSaveParam (char *filename);
456 ARVIDEO_EXTERN int arVideoLoadParam (char *filename);
457 ARVIDEO_EXTERN int arVideoSetBufferSize (const int width, const int height);
458 ARVIDEO_EXTERN int arVideoGetBufferSize (int *width, int *height);
459
460 ARVIDEO_EXTERN int arVideoGetCParam (ARParam *cparam);
461 ARVIDEO_EXTERN int arVideoGetCParamAsync (void (*callback)(const ARParam *, void *), void *userdata);
462
463 ARVIDEO_EXTERN int arVideoUtilGetPixelSize(const AR_PIXEL_FORMAT arPixelFormat);
464 ARVIDEO_EXTERN const char *arVideoUtilGetPixelFormatName(const AR_PIXEL_FORMAT arPixelFormat);
465#if !AR_ENABLE_MINIMIZE_MEMORY_FOOTPRINT
466 ARVIDEO_EXTERN int arVideoSaveImageJPEG(int w, int h, AR_PIXEL_FORMAT pixFormat, ARUint8 *pixels, const char *filename, const int quality /* 0 to 100 */, const int flipV);
467#endif // !AR_ENABLE_MINIMIZE_MEMORY_FOOTPRINT
468
469 typedef enum {
470 AR_VIDEO_ASPECT_RATIO_1_1,
471 AR_VIDEO_ASPECT_RATIO_11_9,
472 AR_VIDEO_ASPECT_RATIO_5_4,
473 AR_VIDEO_ASPECT_RATIO_4_3,
474 AR_VIDEO_ASPECT_RATIO_3_2,
475 AR_VIDEO_ASPECT_RATIO_14_9,
476 AR_VIDEO_ASPECT_RATIO_8_5,
477
478 AR_VIDEO_ASPECT_RATIO_5_3,
479 AR_VIDEO_ASPECT_RATIO_16_9,
480 AR_VIDEO_ASPECT_RATIO_9_5,
481 AR_VIDEO_ASPECT_RATIO_17_9,
482 AR_VIDEO_ASPECT_RATIO_21_9,
483 AR_VIDEO_ASPECT_RATIO_UNIQUE,
484 AR_VIDEO_ASPECT_RATIO_INVALID
485} AR_VIDEO_ASPECT_RATIO;
486
498 AR_VIDEO_ASPECT_RATIO arVideoUtilFindAspectRatio(int w, int h);
499
510 char *arVideoUtilFindAspectRatioName(int w, int h);
511
544#define arVideoGetVersion() arVideoGetParami(AR_VIDEO_GET_VERSION, NULL)
545
546 ARVIDEO_EXTERN ARVideoSourceInfoListT *ar2VideoCreateSourceInfoList(const char *config);
547
548 ARVIDEO_EXTERN void ar2VideoDeleteSourceInfoList(ARVideoSourceInfoListT **p);
549
562 ARVIDEO_EXTERN AR2VideoParamT *ar2VideoOpen (const char *config);
563
582 ARVIDEO_EXTERN AR2VideoParamT *ar2VideoOpenAsync (const char *config, void (*callback)(void *), void *userdata);
583
584 ARVIDEO_EXTERN int ar2VideoClose (AR2VideoParamT *vid);
585 ARVIDEO_EXTERN int ar2VideoDispOption (AR2VideoParamT *vid);
586 ARVIDEO_EXTERN AR_VIDEO_MODULE ar2VideoGetModule (AR2VideoParamT *vid);
587 ARVIDEO_EXTERN int ar2VideoGetId (AR2VideoParamT *vid, ARUint32 *id0, ARUint32 *id1);
588 ARVIDEO_EXTERN int ar2VideoGetSize (AR2VideoParamT *vid, int *x,int *y);
589 ARVIDEO_EXTERN int ar2VideoGetPixelSize (AR2VideoParamT *vid);
590 ARVIDEO_EXTERN AR_PIXEL_FORMAT ar2VideoGetPixelFormat (AR2VideoParamT *vid);
591 ARVIDEO_EXTERN AR2VideoBufferT *ar2VideoGetImage (AR2VideoParamT *vid);
592 ARVIDEO_EXTERN int ar2VideoCapStart (AR2VideoParamT *vid);
593 ARVIDEO_EXTERN int ar2VideoCapStartAsync (AR2VideoParamT *vid, AR_VIDEO_FRAME_READY_CALLBACK callback, void *userdata);
594 ARVIDEO_EXTERN int ar2VideoCapStop (AR2VideoParamT *vid);
595 ARVIDEO_EXTERN int ar2VideoGetParami (AR2VideoParamT *vid, int paramName, int *value);
596 ARVIDEO_EXTERN int ar2VideoSetParami (AR2VideoParamT *vid, int paramName, int value);
597 ARVIDEO_EXTERN int ar2VideoGetParamd (AR2VideoParamT *vid, int paramName, double *value);
598 ARVIDEO_EXTERN int ar2VideoSetParamd (AR2VideoParamT *vid, int paramName, double value);
599 ARVIDEO_EXTERN int ar2VideoGetParams (AR2VideoParamT *vid, const int paramName, char **value);
600 ARVIDEO_EXTERN int ar2VideoSetParams (AR2VideoParamT *vid, const int paramName, const char *value);
601 ARVIDEO_EXTERN int ar2VideoSaveParam (AR2VideoParamT *vid, char *filename);
602 ARVIDEO_EXTERN int ar2VideoLoadParam (AR2VideoParamT *vid, char *filename);
603 ARVIDEO_EXTERN int ar2VideoSetBufferSize (AR2VideoParamT *vid, const int width, const int height);
604 ARVIDEO_EXTERN int ar2VideoGetBufferSize (AR2VideoParamT *vid, int *width, int *height);
605 ARVIDEO_EXTERN int ar2VideoGetCParam (AR2VideoParamT *vid, ARParam *cparam);
606 ARVIDEO_EXTERN int ar2VideoGetCParamAsync (AR2VideoParamT *vid, void (*callback)(const ARParam *, void *), void *userdata);
607
608 ARVIDEO_EXTERN int ar2VideoPushInit(AR2VideoParamT *vid, int width, int height, const char *pixelFormat, int cameraIndex, int cameraPosition);
609 ARVIDEO_EXTERN int ar2VideoPush(AR2VideoParamT *vid,
610 ARUint8 *buf0p, int buf0Size, int buf0PixelStride, int buf0RowStride,
611 ARUint8 *buf1p, int buf1Size, int buf1PixelStride, int buf1RowStride,
612 ARUint8 *buf2p, int buf2Size, int buf2PixelStride, int buf2RowStride,
613 ARUint8 *buf3p, int buf3Size, int buf3PixelStride, int buf3RowStride);
614 ARVIDEO_EXTERN int ar2VideoPushFinal(AR2VideoParamT *vid);
615
616#ifdef __cplusplus
617}
618#endif
619#endif // !AR_VIDEO_H
ar.h
artoolkitX core routines.
ARUint8
unsigned char ARUint8
Definition: ar.h:92
ARUint32
unsigned int ARUint32
Definition: ar.h:94
_ARVideoLumaInfo
Definition: videoLuma.c:69
AR2VideoBufferT
A structure which carries information about a video frame retrieved by the video library.
Definition: ar.h:148
AR2VideoParamT
Definition: video.h:320
AR2VideoParamT::lumaInfo
ARVideoLumaInfo * lumaInfo
Definition: video.h:323
AR2VideoParamT::module
int module
Definition: video.h:321
AR2VideoParamT::moduleParam
void * moduleParam
Definition: video.h:322
ARParam
Structure holding camera parameters, including image size, projection matrix and lens distortion para...
Definition: param.h:99
ARVideoSourceInfoListT
Values describing a list of video sources.
Definition: video.h:297
ARVideoSourceInfoListT::count
int count
Definition: video.h:298
ARVideoSourceInfoListT::info
ARVideoSourceInfoT * info
Definition: video.h:299
ARVideoSourceInfoT
Values describing a video source.
Definition: video.h:286
ARVideoSourceInfoT::open_token
char * open_token
UTF-8 encoded string containing the token that should be passed (in the space-separated list of token...
Definition: video.h:291
ARVideoSourceInfoT::model
char * model
UTF-8 encoded string representing the model of the source, where this information is available....
Definition: video.h:288
ARVideoSourceInfoT::flags
uint32_t flags
Definition: video.h:290
ARVideoSourceInfoT::UID
char * UID
UTF-8 encoded string representing a unique ID for this source, and suitable for passing to arVideoOpe...
Definition: video.h:289
ARVideoSourceInfoT::name
char * name
UTF-8 encoded string representing the name of the source, in a form suitable for presentation to an e...
Definition: video.h:287
arVideoGetParamd
ARVIDEO_EXTERN int arVideoGetParamd(int paramName, double *value)
Get value of a double-precision floating-point parameter from active video module.
Definition: video.c:197
arVideoSetParami
ARVIDEO_EXTERN int arVideoSetParami(int paramName, int value)
Set value of an integer parameter in active video module.
Definition: video.c:190
ar2VideoSaveParam
ARVIDEO_EXTERN int ar2VideoSaveParam(AR2VideoParamT *vid, char *filename)
Definition: video2.c:1320
ar2VideoGetCParam
ARVIDEO_EXTERN int ar2VideoGetCParam(AR2VideoParamT *vid, ARParam *cparam)
Definition: video2.c:1394
ARVIDEO_EXTERN
#define ARVIDEO_EXTERN
Definition: video.h:315
ar2VideoCapStart
ARVIDEO_EXTERN int ar2VideoCapStart(AR2VideoParamT *vid)
Definition: video2.c:805
arVideoGetCParamAsync
ARVIDEO_EXTERN int arVideoGetCParamAsync(void(*callback)(const ARParam *, void *), void *userdata)
Definition: video.c:260
arVideoUtilFindAspectRatioName
char * arVideoUtilFindAspectRatioName(int w, int h)
Determine the approximate aspect ratio for a given image resolution.
Definition: videoAspectRatio.c:105
ar2VideoPushInit
ARVIDEO_EXTERN int ar2VideoPushInit(AR2VideoParamT *vid, int width, int height, const char *pixelFormat, int cameraIndex, int cameraPosition)
Definition: video2.c:1428
ar2VideoCapStop
ARVIDEO_EXTERN int ar2VideoCapStop(AR2VideoParamT *vid)
Definition: video2.c:877
arVideoCapStop
ARVIDEO_EXTERN int arVideoCapStop(void)
Stop video capture.
Definition: video.c:174
arVideoGetImage
ARVIDEO_EXTERN AR2VideoBufferT * arVideoGetImage(void)
Get a frame image from the video module.
Definition: video.c:153
AR_VIDEO_AVFOUNDATION_FOCUS_PRESET
AR_VIDEO_AVFOUNDATION_FOCUS_PRESET
Values returned by arVideoParamGeti/arVideoParamSeti(AR_VIDEO_PARAM_AVFOUNDATION_FOCUS_PRESET,...
Definition: video.h:212
AR_VIDEO_AVFOUNDATION_FOCUS_INF
@ AR_VIDEO_AVFOUNDATION_FOCUS_INF
Focus preset to optical infinity.
Definition: video.h:217
AR_VIDEO_AVFOUNDATION_FOCUS_MACRO
@ AR_VIDEO_AVFOUNDATION_FOCUS_MACRO
Focus preset to camera's shortest macro setting.
Definition: video.h:214
AR_VIDEO_AVFOUNDATION_FOCUS_NONE
@ AR_VIDEO_AVFOUNDATION_FOCUS_NONE
No focus preset set.
Definition: video.h:213
AR_VIDEO_AVFOUNDATION_FOCUS_1_0M
@ AR_VIDEO_AVFOUNDATION_FOCUS_1_0M
Focus preset to 1.0 metres.
Definition: video.h:216
AR_VIDEO_AVFOUNDATION_FOCUS_0_3M
@ AR_VIDEO_AVFOUNDATION_FOCUS_0_3M
Focus preset to 0.3 metres.
Definition: video.h:215
ar2VideoGetCParamAsync
ARVIDEO_EXTERN int ar2VideoGetCParamAsync(AR2VideoParamT *vid, void(*callback)(const ARParam *, void *), void *userdata)
Definition: video2.c:1405
arVideoOpenAsync
ARVIDEO_EXTERN int arVideoOpenAsync(const char *config, void(*callback)(void *), void *userdata)
Open a video input module, invoking a callback once opening is complete.
Definition: video.c:87
ar2VideoOpenAsync
ARVIDEO_EXTERN AR2VideoParamT * ar2VideoOpenAsync(const char *config, void(*callback)(void *), void *userdata)
Open a video input module, and return control object, invoking a callback once opening is complete.
Definition: video2.c:345
ar2VideoGetParamd
ARVIDEO_EXTERN int ar2VideoGetParamd(AR2VideoParamT *vid, int paramName, double *value)
Definition: video2.c:1075
arVideoOpen
ARVIDEO_EXTERN int arVideoOpen(const char *config)
Open a video input module.
Definition: video.c:75
arVideoGetSize
ARVIDEO_EXTERN int arVideoGetSize(int *x, int *y)
Definition: video.c:132
arVideoSetParamd
ARVIDEO_EXTERN int arVideoSetParamd(int paramName, double value)
Set value of a double-precision floating-point parameter in active video module.
Definition: video.c:204
arVideoDispOption
ARVIDEO_EXTERN int arVideoDispOption(void)
Definition: video.c:111
arVideoGetParami
ARVIDEO_EXTERN int arVideoGetParami(int paramName, int *value)
Get value of an integer parameter from active video module.
Definition: video.c:181
arVideoSetBufferSize
ARVIDEO_EXTERN int arVideoSetBufferSize(const int width, const int height)
Definition: video.c:239
ar2VideoDispOption
ARVIDEO_EXTERN int ar2VideoDispOption(AR2VideoParamT *vid)
Definition: video2.c:455
ar2VideoGetParami
ARVIDEO_EXTERN int ar2VideoGetParami(AR2VideoParamT *vid, int paramName, int *value)
Definition: video2.c:938
arVideoGetDefaultModule
ARVIDEO_EXTERN AR_VIDEO_MODULE arVideoGetDefaultModule(void)
Definition: video.c:48
AR_VIDEO_AVFOUNDATION_CAMERA_POSITION
AR_VIDEO_AVFOUNDATION_CAMERA_POSITION
Values returned by arVideoParamGeti(AR_VIDEO_PARAM_AVFOUNDATION_CAMERA_POSITION, ....
Definition: video.h:223
AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_REAR_STEREO_LEFT
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_REAR_STEREO_LEFT
Definition: video.h:228
AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT_STEREO_RIGHT
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT_STEREO_RIGHT
Definition: video.h:231
AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_UNSPECIFIED
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_UNSPECIFIED
Definition: video.h:225
AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_UNKNOWN
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_UNKNOWN
Definition: video.h:224
AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT
Definition: video.h:227
AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_REAR_STEREO_RIGHT
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_REAR_STEREO_RIGHT
Definition: video.h:229
AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT_STEREO_LEFT
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT_STEREO_LEFT
Definition: video.h:230
AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_REAR
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_REAR
Definition: video.h:226
arVideoGetId
ARVIDEO_EXTERN int arVideoGetId(ARUint32 *id0, ARUint32 *id1)
Definition: video.c:125
ar2VideoPush
ARVIDEO_EXTERN int ar2VideoPush(AR2VideoParamT *vid, ARUint8 *buf0p, int buf0Size, int buf0PixelStride, int buf0RowStride, ARUint8 *buf1p, int buf1Size, int buf1PixelStride, int buf1RowStride, ARUint8 *buf2p, int buf2Size, int buf2PixelStride, int buf2RowStride, ARUint8 *buf3p, int buf3Size, int buf3PixelStride, int buf3RowStride)
Definition: video2.c:1439
ar2VideoGetId
ARVIDEO_EXTERN int ar2VideoGetId(AR2VideoParamT *vid, ARUint32 *id0, ARUint32 *id1)
Definition: video2.c:522
arVideoGetParams
ARVIDEO_EXTERN int arVideoGetParams(const int paramName, char **value)
Get value of a string parameter from active video module.
Definition: video.c:211
ar2VideoDeleteSourceInfoList
ARVIDEO_EXTERN void ar2VideoDeleteSourceInfoList(ARVideoSourceInfoListT **p)
Definition: video2.c:233
arVideoCapStart
ARVIDEO_EXTERN int arVideoCapStart(void)
Start video capture.
Definition: video.c:160
ar2VideoSetParamd
ARVIDEO_EXTERN int ar2VideoSetParamd(AR2VideoParamT *vid, int paramName, double value)
Definition: video2.c:1136
ar2VideoOpen
ARVIDEO_EXTERN AR2VideoParamT * ar2VideoOpen(const char *config)
Open a video input module and return control object.
Definition: video2.c:251
ar2VideoSetBufferSize
ARVIDEO_EXTERN int ar2VideoSetBufferSize(AR2VideoParamT *vid, const int width, const int height)
Definition: video2.c:1342
AR_VIDEO_AVFOUNDATION_IOS_DEVICE
AR_VIDEO_AVFOUNDATION_IOS_DEVICE
Values returned by arVideoParamGeti(AR_VIDEO_PARAM_AVFOUNDATION_IOS_DEVICE, ...)
Definition: video.h:175
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD4
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD4
Definition: video.h:189
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPODTOUCH5
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPODTOUCH5
Definition: video.h:188
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADAIR
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADAIR
Definition: video.h:193
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_APPLETV_GENERIC
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_APPLETV_GENERIC
Definition: video.h:186
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5C
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5C
Definition: video.h:191
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI2
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI2
Definition: video.h:194
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE4
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE4
Definition: video.h:178
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE3GS
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE3GS
Definition: video.h:177
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADAIR2
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADAIR2
Definition: video.h:197
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5
Definition: video.h:187
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE4S
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE4S
Definition: video.h:185
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD_GENERIC
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD_GENERIC
Definition: video.h:184
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI
Definition: video.h:190
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPOD_GENERIC
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPOD_GENERIC
Definition: video.h:183
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADPRO97
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADPRO97
Definition: video.h:206
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE3G
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE3G
Definition: video.h:176
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADPRO129
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADPRO129
Definition: video.h:203
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6SPLUS
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6SPLUS
Definition: video.h:201
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE7
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE7
Definition: video.h:204
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE7PLUS
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE7PLUS
Definition: video.h:205
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONESE
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONESE
Definition: video.h:202
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5S
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5S
Definition: video.h:192
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI4
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI4
Definition: video.h:196
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD2
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD2
Definition: video.h:180
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI3
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI3
Definition: video.h:195
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPODTOUCH4
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPODTOUCH4
Definition: video.h:179
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD3
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD3
Definition: video.h:181
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE_GENERIC
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE_GENERIC
Definition: video.h:182
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6
Definition: video.h:198
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6PLUS
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6PLUS
Definition: video.h:199
AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6S
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6S
Definition: video.h:200
arVideoClose
ARVIDEO_EXTERN int arVideoClose(void)
Definition: video.c:99
arVideoGetPixelFormat
ARVIDEO_EXTERN AR_PIXEL_FORMAT arVideoGetPixelFormat(void)
Definition: video.c:146
arVideoGetBufferSize
ARVIDEO_EXTERN int arVideoGetBufferSize(int *width, int *height)
Definition: video.c:246
ar2VideoGetBufferSize
ARVIDEO_EXTERN int ar2VideoGetBufferSize(AR2VideoParamT *vid, int *width, int *height)
Definition: video2.c:1368
arVideoLoadParam
ARVIDEO_EXTERN int arVideoLoadParam(char *filename)
Definition: video.c:232
arVideoSaveImageJPEG
ARVIDEO_EXTERN int arVideoSaveImageJPEG(int w, int h, AR_PIXEL_FORMAT pixFormat, ARUint8 *pixels, const char *filename, const int quality, const int flipV)
Definition: videoSaveImage.c:54
ar2VideoSetParams
ARVIDEO_EXTERN int ar2VideoSetParams(AR2VideoParamT *vid, const int paramName, const char *value)
Definition: video2.c:1259
ar2VideoClose
ARVIDEO_EXTERN int ar2VideoClose(AR2VideoParamT *vid)
Definition: video2.c:385
ar2VideoGetPixelSize
ARVIDEO_EXTERN int ar2VideoGetPixelSize(AR2VideoParamT *vid)
Definition: video2.c:644
AR_VIDEO_MODULE
AR_VIDEO_MODULE
Definition: video.h:61
AR_VIDEO_MODULE_IMAGE
@ AR_VIDEO_MODULE_IMAGE
Definition: video.h:76
AR_VIDEO_MODULE_V4L2
@ AR_VIDEO_MODULE_V4L2
Definition: video.h:80
AR_VIDEO_MODULE_1394
@ AR_VIDEO_MODULE_1394
Definition: video.h:65
AR_VIDEO_MODULE_RESERVED5
@ AR_VIDEO_MODULE_RESERVED5
Definition: video.h:67
AR_VIDEO_MODULE_GSTREAMER
@ AR_VIDEO_MODULE_GSTREAMER
Definition: video.h:73
AR_VIDEO_MODULE_WINDOWS_MEDIA_CAPTURE
@ AR_VIDEO_MODULE_WINDOWS_MEDIA_CAPTURE
Definition: video.h:79
AR_VIDEO_MODULE_AVFOUNDATION
@ AR_VIDEO_MODULE_AVFOUNDATION
Definition: video.h:74
AR_VIDEO_MODULE_RESERVED8
@ AR_VIDEO_MODULE_RESERVED8
Definition: video.h:70
AR_VIDEO_MODULE_ANDROID
@ AR_VIDEO_MODULE_ANDROID
Definition: video.h:77
AR_VIDEO_MODULE_RESERVED6
@ AR_VIDEO_MODULE_RESERVED6
Definition: video.h:68
AR_VIDEO_MODULE_WINDOWS_MEDIA_FOUNDATION
@ AR_VIDEO_MODULE_WINDOWS_MEDIA_FOUNDATION
Definition: video.h:78
AR_VIDEO_MODULE_RESERVED7
@ AR_VIDEO_MODULE_RESERVED7
Definition: video.h:69
AR_VIDEO_MODULE_RESERVED9
@ AR_VIDEO_MODULE_RESERVED9
Definition: video.h:71
AR_VIDEO_MODULE_RESERVED10
@ AR_VIDEO_MODULE_RESERVED10
Definition: video.h:72
AR_VIDEO_MODULE_DUMMY
@ AR_VIDEO_MODULE_DUMMY
Definition: video.h:62
AR_VIDEO_MODULE_RESERVED2
@ AR_VIDEO_MODULE_RESERVED2
Definition: video.h:64
AR_VIDEO_MODULE_RESERVED13
@ AR_VIDEO_MODULE_RESERVED13
Definition: video.h:75
AR_VIDEO_MODULE_MAX
@ AR_VIDEO_MODULE_MAX
Definition: video.h:82
AR_VIDEO_MODULE_RESERVED4
@ AR_VIDEO_MODULE_RESERVED4
Definition: video.h:66
AR_VIDEO_MODULE_EMSCRIPTEN
@ AR_VIDEO_MODULE_EMSCRIPTEN
Definition: video.h:81
AR_VIDEO_MODULE_EXTERNAL
@ AR_VIDEO_MODULE_EXTERNAL
Definition: video.h:63
arVideoSaveParam
ARVIDEO_EXTERN int arVideoSaveParam(char *filename)
Definition: video.c:225
arVideoUtilGetPixelSize
ARVIDEO_EXTERN int arVideoUtilGetPixelSize(const AR_PIXEL_FORMAT arPixelFormat)
Definition: video.c:269
ARVideoSizePreference
ARVideoSizePreference
Definition: video.h:159
AR_VIDEO_SIZE_PREFERENCE_CLOSEST_PIXEL_COUNT
@ AR_VIDEO_SIZE_PREFERENCE_CLOSEST_PIXEL_COUNT
Accept the closest size to the requested pixel count (w x h).
Definition: video.h:163
AR_VIDEO_SIZE_PREFERENCE_ANY
@ AR_VIDEO_SIZE_PREFERENCE_ANY
Accept any size video frame.
Definition: video.h:160
AR_VIDEO_SIZE_PREFERENCE_SMALLEST_WITH_MINIMUM
@ AR_VIDEO_SIZE_PREFERENCE_SMALLEST_WITH_MINIMUM
Accept the smallest size, but no smaller than requested.
Definition: video.h:166
AR_VIDEO_SIZE_PREFERENCE_SAME_ASPECT
@ AR_VIDEO_SIZE_PREFERENCE_SAME_ASPECT
Accept any size with the same aspect ratio.
Definition: video.h:164
AR_VIDEO_SIZE_PREFERENCE_LARGEST
@ AR_VIDEO_SIZE_PREFERENCE_LARGEST
Accept the largest size.
Definition: video.h:167
AR_VIDEO_SIZE_PREFERENCE_SMALLEST
@ AR_VIDEO_SIZE_PREFERENCE_SMALLEST
Accept the smallest size.
Definition: video.h:168
AR_VIDEO_SIZE_PREFERENCE_EXACT
@ AR_VIDEO_SIZE_PREFERENCE_EXACT
Accept only the exact size requested.
Definition: video.h:161
AR_VIDEO_SIZE_PREFERENCE_CLOSEST_SAME_ASPECT
@ AR_VIDEO_SIZE_PREFERENCE_CLOSEST_SAME_ASPECT
Accept the closest size to the requested with the same aspect ratio.
Definition: video.h:162
AR_VIDEO_SIZE_PREFERENCE_LARGEST_WITH_MAXIMUM
@ AR_VIDEO_SIZE_PREFERENCE_LARGEST_WITH_MAXIMUM
Accept the largest size, but no larger than requested.
Definition: video.h:165
AR_VIDEO_ANDROID_CAMERA_FACE
AR_VIDEO_ANDROID_CAMERA_FACE
Values returned by arVideoParamGeti(AR_VIDEO_PARAM_ANDROID_CAMERA_FACE, ...)
Definition: video.h:237
AR_VIDEO_ANDROID_CAMERA_FACE_FRONT
@ AR_VIDEO_ANDROID_CAMERA_FACE_FRONT
Definition: video.h:239
AR_VIDEO_ANDROID_CAMERA_FACE_REAR
@ AR_VIDEO_ANDROID_CAMERA_FACE_REAR
Definition: video.h:238
arVideoSetParams
ARVIDEO_EXTERN int arVideoSetParams(const int paramName, const char *value)
Get value of a string parameter in active video module.
Definition: video.c:218
arVideoGetCParam
ARVIDEO_EXTERN int arVideoGetCParam(ARParam *cparam)
Definition: video.c:253
ar2VideoCreateSourceInfoList
ARVIDEO_EXTERN ARVideoSourceInfoListT * ar2VideoCreateSourceInfoList(const char *config)
Definition: video2.c:172
ar2VideoGetPixelFormat
ARVIDEO_EXTERN AR_PIXEL_FORMAT ar2VideoGetPixelFormat(AR2VideoParamT *vid)
Definition: video2.c:649
arVideoGetPixelSize
ARVIDEO_EXTERN int arVideoGetPixelSize(void)
Definition: video.c:139
arVideoUtilFindAspectRatio
AR_VIDEO_ASPECT_RATIO arVideoUtilFindAspectRatio(int w, int h)
Determine the approximate aspect ratio for a given image resolution.
Definition: videoAspectRatio.c:80
ar2VideoGetModule
ARVIDEO_EXTERN AR_VIDEO_MODULE ar2VideoGetModule(AR2VideoParamT *vid)
Definition: video2.c:516
ar2VideoGetSize
ARVIDEO_EXTERN int ar2VideoGetSize(AR2VideoParamT *vid, int *x, int *y)
Definition: video2.c:583
arVideoCapStartAsync
ARVIDEO_EXTERN int arVideoCapStartAsync(AR_VIDEO_FRAME_READY_CALLBACK callback, void *userdata)
Start video capture with asynchronous notification of new frame arrival.
Definition: video.c:167
arVideoUtilGetPixelFormatName
ARVIDEO_EXTERN const char * arVideoUtilGetPixelFormatName(const AR_PIXEL_FORMAT arPixelFormat)
Definition: video.c:298
ar2VideoGetImage
ARVIDEO_EXTERN AR2VideoBufferT * ar2VideoGetImage(AR2VideoParamT *vid)
Definition: video2.c:710
ar2VideoCapStartAsync
ARVIDEO_EXTERN int ar2VideoCapStartAsync(AR2VideoParamT *vid, AR_VIDEO_FRAME_READY_CALLBACK callback, void *userdata)
Definition: video2.c:866
ar2VideoSetParami
ARVIDEO_EXTERN int ar2VideoSetParami(AR2VideoParamT *vid, int paramName, int value)
Definition: video2.c:1014
ar2VideoGetParams
ARVIDEO_EXTERN int ar2VideoGetParams(AR2VideoParamT *vid, const int paramName, char **value)
Definition: video2.c:1198
arVideoGetModule
ARVIDEO_EXTERN AR_VIDEO_MODULE arVideoGetModule(void)
Definition: video.c:118
AR_VIDEO_ASPECT_RATIO
AR_VIDEO_ASPECT_RATIO
Definition: video.h:469
AR_VIDEO_ASPECT_RATIO_3_2
@ AR_VIDEO_ASPECT_RATIO_3_2
1.5: Equivalent to well-known sizes 240x160, 480x320, 960x640, 720x480 (480p), 1152x768,...
Definition: video.h:474
AR_VIDEO_ASPECT_RATIO_11_9
@ AR_VIDEO_ASPECT_RATIO_11_9
1.222: Equivalent to well-known sizes 176x144 (QCIF), 352x288 (CIF).
Definition: video.h:471
AR_VIDEO_ASPECT_RATIO_5_3
@ AR_VIDEO_ASPECT_RATIO_5_3
1.667: Equivalent to well-known sizes 800x480, 1280x768, 1600x960.
Definition: video.h:478
AR_VIDEO_ASPECT_RATIO_9_5
@ AR_VIDEO_ASPECT_RATIO_9_5
1.8: Equivalent to well-known sizes 864x480.
Definition: video.h:480
AR_VIDEO_ASPECT_RATIO_INVALID
@ AR_VIDEO_ASPECT_RATIO_INVALID
Either width or height is zero.
Definition: video.h:484
AR_VIDEO_ASPECT_RATIO_1_1
@ AR_VIDEO_ASPECT_RATIO_1_1
1.0: "Square".
Definition: video.h:470
AR_VIDEO_ASPECT_RATIO_17_9
@ AR_VIDEO_ASPECT_RATIO_17_9
1.889: Equivalent to well-known sizes 2040x1080.
Definition: video.h:481
AR_VIDEO_ASPECT_RATIO_4_3
@ AR_VIDEO_ASPECT_RATIO_4_3
1.333: Equivalent to well-known sizes 320x240 (QVGA), 480x360, 640x480 (VGA), 768x576 (576p),...
Definition: video.h:473
AR_VIDEO_ASPECT_RATIO_8_5
@ AR_VIDEO_ASPECT_RATIO_8_5
1.6: Equivalent to well-known sizes 320x200, 1280x800, 1440x900, 1680x1050, 1920x1200,...
Definition: video.h:476
AR_VIDEO_ASPECT_RATIO_14_9
@ AR_VIDEO_ASPECT_RATIO_14_9
1.556:
Definition: video.h:475
AR_VIDEO_ASPECT_RATIO_UNIQUE
@ AR_VIDEO_ASPECT_RATIO_UNIQUE
Value not easily representable as a ratio of integers.
Definition: video.h:483
AR_VIDEO_ASPECT_RATIO_5_4
@ AR_VIDEO_ASPECT_RATIO_5_4
1.25: Equivalent to well-known sizes 1280x1024 (SXGA), 2560x2048.
Definition: video.h:472
AR_VIDEO_ASPECT_RATIO_21_9
@ AR_VIDEO_ASPECT_RATIO_21_9
2.333: "Ultrawide". Equivalent to well-known sizes 2560x1080, 1280x512.
Definition: video.h:482
AR_VIDEO_ASPECT_RATIO_16_9
@ AR_VIDEO_ASPECT_RATIO_16_9
1.778: "Widescreen". Equivalent to well-known sizes 1280x720 (720p), 1920x1080 (1080p).
Definition: video.h:479
ar2VideoPushFinal
ARVIDEO_EXTERN int ar2VideoPushFinal(AR2VideoParamT *vid)
Definition: video2.c:1454
AR_VIDEO_FRAME_READY_CALLBACK
void(* AR_VIDEO_FRAME_READY_CALLBACK)(void *)
Definition: video.h:302
ar2VideoLoadParam
ARVIDEO_EXTERN int ar2VideoLoadParam(AR2VideoParamT *vid, char *filename)
Definition: video2.c:1331
videoConfig.h
videoLuma.h