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>
55#include <limits.h>
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61typedef enum {
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
159typedef enum {
170
171
175typedef enum {
208
212typedef enum {
219
223typedef enum {
233
237typedef enum {
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
286typedef struct {
287 char *name;
288 char *model;
289 char *UID;
290 uint32_t flags;
293
297typedef struct {
298 int count;
301
302typedef 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
319
320typedef struct {
325
326// AR2VideoBufferT is defined in <ARX/AR/ar.h>
327
329
341ARVIDEO_EXTERN int arVideoOpen (const char *config);
342
360ARVIDEO_EXTERN int arVideoOpenAsync (const char *config, void (*callback)(void *), void *userdata);
361
366ARVIDEO_EXTERN int arVideoGetSize (int *x, int *y);
368ARVIDEO_EXTERN AR_PIXEL_FORMAT arVideoGetPixelFormat (void);
369
377
384
395
396
403
410ARVIDEO_EXTERN int arVideoGetParami (int paramName, int *value);
411
418ARVIDEO_EXTERN int arVideoSetParami (int paramName, int value);
419
426ARVIDEO_EXTERN int arVideoGetParamd (int paramName, double *value);
427
434ARVIDEO_EXTERN int arVideoSetParamd (int paramName, double value);
435
445ARVIDEO_EXTERN int arVideoGetParams (const int paramName, char **value);
446
453ARVIDEO_EXTERN int arVideoSetParams (const int paramName, const char *value);
454
455ARVIDEO_EXTERN int arVideoSaveParam (char *filename);
456ARVIDEO_EXTERN int arVideoLoadParam (char *filename);
457ARVIDEO_EXTERN int arVideoSetBufferSize (const int width, const int height);
458ARVIDEO_EXTERN int arVideoGetBufferSize (int *width, int *height);
459
461ARVIDEO_EXTERN int arVideoGetCParamAsync (void (*callback)(const ARParam *, void *), void *userdata);
462
463ARVIDEO_EXTERN int arVideoUtilGetPixelSize(const AR_PIXEL_FORMAT arPixelFormat);
464ARVIDEO_EXTERN const char *arVideoUtilGetPixelFormatName(const AR_PIXEL_FORMAT arPixelFormat);
465#if !AR_ENABLE_MINIMIZE_MEMORY_FOOTPRINT
466ARVIDEO_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
469typedef enum {
477
486
499
510char *arVideoUtilFindAspectRatioName(int w, int h);
511
544#define arVideoGetVersion() arVideoGetParami(AR_VIDEO_GET_VERSION, NULL)
545
547
549
562ARVIDEO_EXTERN AR2VideoParamT *ar2VideoOpen (const char *config);
563
582ARVIDEO_EXTERN AR2VideoParamT *ar2VideoOpenAsync (const char *config, void (*callback)(void *), void *userdata);
583
588ARVIDEO_EXTERN int ar2VideoGetSize (AR2VideoParamT *vid, int *x,int *y);
595ARVIDEO_EXTERN int ar2VideoGetParami (AR2VideoParamT *vid, int paramName, int *value);
596ARVIDEO_EXTERN int ar2VideoSetParami (AR2VideoParamT *vid, int paramName, int value);
597ARVIDEO_EXTERN int ar2VideoGetParamd (AR2VideoParamT *vid, int paramName, double *value);
598ARVIDEO_EXTERN int ar2VideoSetParamd (AR2VideoParamT *vid, int paramName, double value);
599ARVIDEO_EXTERN int ar2VideoGetParams (AR2VideoParamT *vid, const int paramName, char **value);
600ARVIDEO_EXTERN int ar2VideoSetParams (AR2VideoParamT *vid, const int paramName, const char *value);
601ARVIDEO_EXTERN int ar2VideoSaveParam (AR2VideoParamT *vid, char *filename);
602ARVIDEO_EXTERN int ar2VideoLoadParam (AR2VideoParamT *vid, char *filename);
603ARVIDEO_EXTERN int ar2VideoSetBufferSize (AR2VideoParamT *vid, const int width, const int height);
604ARVIDEO_EXTERN int ar2VideoGetBufferSize (AR2VideoParamT *vid, int *width, int *height);
606ARVIDEO_EXTERN int ar2VideoGetCParamAsync (AR2VideoParamT *vid, void (*callback)(const ARParam *, void *), void *userdata);
607
608ARVIDEO_EXTERN int ar2VideoPushInit(AR2VideoParamT *vid, int width, int height, const char *pixelFormat, int cameraIndex, int cameraPosition);
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);
615
616#ifdef __cplusplus
617}
618#endif
619#endif // !AR_VIDEO_H
artoolkitX core routines.
unsigned char ARUint8
Definition: ar.h:92
unsigned int ARUint32
Definition: ar.h:94
Definition: videoLuma.c:69
A structure which carries information about a video frame retrieved by the video library.
Definition: ar.h:148
Definition: video.h:320
ARVideoLumaInfo * lumaInfo
Definition: video.h:323
int module
Definition: video.h:321
void * moduleParam
Definition: video.h:322
Structure holding camera parameters, including image size, projection matrix and lens distortion para...
Definition: param.h:99
Values describing a list of video sources.
Definition: video.h:297
int count
Definition: video.h:298
ARVideoSourceInfoT * info
Definition: video.h:299
Values describing a video source.
Definition: video.h:286
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
char * model
UTF-8 encoded string representing the model of the source, where this information is available....
Definition: video.h:288
uint32_t flags
Definition: video.h:290
char * UID
UTF-8 encoded string representing a unique ID for this source, and suitable for passing to arVideoOpe...
Definition: video.h:289
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
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
ARVIDEO_EXTERN int arVideoSetParami(int paramName, int value)
Set value of an integer parameter in active video module.
Definition: video.c:190
ARVIDEO_EXTERN int ar2VideoSaveParam(AR2VideoParamT *vid, char *filename)
Definition: video2.c:1320
ARVIDEO_EXTERN int ar2VideoGetCParam(AR2VideoParamT *vid, ARParam *cparam)
Definition: video2.c:1394
#define ARVIDEO_EXTERN
Definition: video.h:315
ARVIDEO_EXTERN int ar2VideoCapStart(AR2VideoParamT *vid)
Definition: video2.c:805
ARVIDEO_EXTERN int arVideoGetCParamAsync(void(*callback)(const ARParam *, void *), void *userdata)
Definition: video.c:260
char * arVideoUtilFindAspectRatioName(int w, int h)
Determine the approximate aspect ratio for a given image resolution.
Definition: videoAspectRatio.c:105
ARVIDEO_EXTERN int ar2VideoPushInit(AR2VideoParamT *vid, int width, int height, const char *pixelFormat, int cameraIndex, int cameraPosition)
Definition: video2.c:1428
ARVIDEO_EXTERN int ar2VideoCapStop(AR2VideoParamT *vid)
Definition: video2.c:877
ARVIDEO_EXTERN int arVideoCapStop(void)
Stop video capture.
Definition: video.c:174
ARVIDEO_EXTERN AR2VideoBufferT * arVideoGetImage(void)
Get a frame image from the video module.
Definition: video.c:153
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
Focus preset to optical infinity.
Definition: video.h:217
@ AR_VIDEO_AVFOUNDATION_FOCUS_MACRO
Focus preset to camera's shortest macro setting.
Definition: video.h:214
@ AR_VIDEO_AVFOUNDATION_FOCUS_NONE
No focus preset set.
Definition: video.h:213
@ AR_VIDEO_AVFOUNDATION_FOCUS_1_0M
Focus preset to 1.0 metres.
Definition: video.h:216
@ AR_VIDEO_AVFOUNDATION_FOCUS_0_3M
Focus preset to 0.3 metres.
Definition: video.h:215
ARVIDEO_EXTERN int ar2VideoGetCParamAsync(AR2VideoParamT *vid, void(*callback)(const ARParam *, void *), void *userdata)
Definition: video2.c:1405
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
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
ARVIDEO_EXTERN int ar2VideoGetParamd(AR2VideoParamT *vid, int paramName, double *value)
Definition: video2.c:1075
ARVIDEO_EXTERN int arVideoOpen(const char *config)
Open a video input module.
Definition: video.c:75
ARVIDEO_EXTERN int arVideoGetSize(int *x, int *y)
Definition: video.c:132
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
ARVIDEO_EXTERN int arVideoDispOption(void)
Definition: video.c:111
ARVIDEO_EXTERN int arVideoGetParami(int paramName, int *value)
Get value of an integer parameter from active video module.
Definition: video.c:181
ARVIDEO_EXTERN int arVideoSetBufferSize(const int width, const int height)
Definition: video.c:239
ARVIDEO_EXTERN int ar2VideoDispOption(AR2VideoParamT *vid)
Definition: video2.c:455
ARVIDEO_EXTERN int ar2VideoGetParami(AR2VideoParamT *vid, int paramName, int *value)
Definition: video2.c:938
ARVIDEO_EXTERN AR_VIDEO_MODULE arVideoGetDefaultModule(void)
Definition: video.c:48
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
Definition: video.h:228
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT_STEREO_RIGHT
Definition: video.h:231
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_UNSPECIFIED
Definition: video.h:225
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_UNKNOWN
Definition: video.h:224
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT
Definition: video.h:227
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_REAR_STEREO_RIGHT
Definition: video.h:229
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_FRONT_STEREO_LEFT
Definition: video.h:230
@ AR_VIDEO_AVFOUNDATION_CAMERA_POSITION_REAR
Definition: video.h:226
ARVIDEO_EXTERN int arVideoGetId(ARUint32 *id0, ARUint32 *id1)
Definition: video.c:125
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
ARVIDEO_EXTERN int ar2VideoGetId(AR2VideoParamT *vid, ARUint32 *id0, ARUint32 *id1)
Definition: video2.c:522
ARVIDEO_EXTERN int arVideoGetParams(const int paramName, char **value)
Get value of a string parameter from active video module.
Definition: video.c:211
ARVIDEO_EXTERN void ar2VideoDeleteSourceInfoList(ARVideoSourceInfoListT **p)
Definition: video2.c:233
ARVIDEO_EXTERN int arVideoCapStart(void)
Start video capture.
Definition: video.c:160
ARVIDEO_EXTERN int ar2VideoSetParamd(AR2VideoParamT *vid, int paramName, double value)
Definition: video2.c:1136
ARVIDEO_EXTERN AR2VideoParamT * ar2VideoOpen(const char *config)
Open a video input module and return control object.
Definition: video2.c:251
ARVIDEO_EXTERN int ar2VideoSetBufferSize(AR2VideoParamT *vid, const int width, const int height)
Definition: video2.c:1342
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
Definition: video.h:189
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPODTOUCH5
Definition: video.h:188
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADAIR
Definition: video.h:193
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_APPLETV_GENERIC
Definition: video.h:186
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5C
Definition: video.h:191
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI2
Definition: video.h:194
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE4
Definition: video.h:178
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE3GS
Definition: video.h:177
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADAIR2
Definition: video.h:197
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5
Definition: video.h:187
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE4S
Definition: video.h:185
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD_GENERIC
Definition: video.h:184
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI
Definition: video.h:190
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPOD_GENERIC
Definition: video.h:183
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADPRO97
Definition: video.h:206
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE3G
Definition: video.h:176
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADPRO129
Definition: video.h:203
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6SPLUS
Definition: video.h:201
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE7
Definition: video.h:204
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE7PLUS
Definition: video.h:205
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONESE
Definition: video.h:202
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE5S
Definition: video.h:192
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI4
Definition: video.h:196
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD2
Definition: video.h:180
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPADMINI3
Definition: video.h:195
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPODTOUCH4
Definition: video.h:179
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPAD3
Definition: video.h:181
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE_GENERIC
Definition: video.h:182
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6
Definition: video.h:198
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6PLUS
Definition: video.h:199
@ AR_VIDEO_AVFOUNDATION_IOS_DEVICE_IPHONE6S
Definition: video.h:200
ARVIDEO_EXTERN int arVideoClose(void)
Definition: video.c:99
ARVIDEO_EXTERN AR_PIXEL_FORMAT arVideoGetPixelFormat(void)
Definition: video.c:146
ARVIDEO_EXTERN int arVideoGetBufferSize(int *width, int *height)
Definition: video.c:246
ARVIDEO_EXTERN int ar2VideoGetBufferSize(AR2VideoParamT *vid, int *width, int *height)
Definition: video2.c:1368
ARVIDEO_EXTERN int arVideoLoadParam(char *filename)
Definition: video.c:232
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
ARVIDEO_EXTERN int ar2VideoSetParams(AR2VideoParamT *vid, const int paramName, const char *value)
Definition: video2.c:1259
ARVIDEO_EXTERN int ar2VideoClose(AR2VideoParamT *vid)
Definition: video2.c:385
ARVIDEO_EXTERN int ar2VideoGetPixelSize(AR2VideoParamT *vid)
Definition: video2.c:644
AR_VIDEO_MODULE
Definition: video.h:61
@ AR_VIDEO_MODULE_IMAGE
Definition: video.h:76
@ AR_VIDEO_MODULE_V4L2
Definition: video.h:80
@ AR_VIDEO_MODULE_1394
Definition: video.h:65
@ AR_VIDEO_MODULE_RESERVED5
Definition: video.h:67
@ AR_VIDEO_MODULE_GSTREAMER
Definition: video.h:73
@ AR_VIDEO_MODULE_WINDOWS_MEDIA_CAPTURE
Definition: video.h:79
@ AR_VIDEO_MODULE_AVFOUNDATION
Definition: video.h:74
@ AR_VIDEO_MODULE_RESERVED8
Definition: video.h:70
@ AR_VIDEO_MODULE_ANDROID
Definition: video.h:77
@ AR_VIDEO_MODULE_RESERVED6
Definition: video.h:68
@ AR_VIDEO_MODULE_WINDOWS_MEDIA_FOUNDATION
Definition: video.h:78
@ AR_VIDEO_MODULE_RESERVED7
Definition: video.h:69
@ AR_VIDEO_MODULE_RESERVED9
Definition: video.h:71
@ AR_VIDEO_MODULE_RESERVED10
Definition: video.h:72
@ AR_VIDEO_MODULE_DUMMY
Definition: video.h:62
@ AR_VIDEO_MODULE_RESERVED2
Definition: video.h:64
@ AR_VIDEO_MODULE_RESERVED13
Definition: video.h:75
@ AR_VIDEO_MODULE_MAX
Definition: video.h:82
@ AR_VIDEO_MODULE_RESERVED4
Definition: video.h:66
@ AR_VIDEO_MODULE_EMSCRIPTEN
Definition: video.h:81
@ AR_VIDEO_MODULE_EXTERNAL
Definition: video.h:63
ARVIDEO_EXTERN int arVideoSaveParam(char *filename)
Definition: video.c:225
ARVIDEO_EXTERN int arVideoUtilGetPixelSize(const AR_PIXEL_FORMAT arPixelFormat)
Definition: video.c:269
ARVideoSizePreference
Definition: video.h:159
@ 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
Accept any size video frame.
Definition: video.h:160
@ 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
Accept any size with the same aspect ratio.
Definition: video.h:164
@ AR_VIDEO_SIZE_PREFERENCE_LARGEST
Accept the largest size.
Definition: video.h:167
@ AR_VIDEO_SIZE_PREFERENCE_SMALLEST
Accept the smallest size.
Definition: video.h:168
@ AR_VIDEO_SIZE_PREFERENCE_EXACT
Accept only the exact size requested.
Definition: video.h:161
@ 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
Accept the largest size, but no larger than requested.
Definition: video.h:165
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
Definition: video.h:239
@ AR_VIDEO_ANDROID_CAMERA_FACE_REAR
Definition: video.h:238
ARVIDEO_EXTERN int arVideoSetParams(const int paramName, const char *value)
Get value of a string parameter in active video module.
Definition: video.c:218
ARVIDEO_EXTERN int arVideoGetCParam(ARParam *cparam)
Definition: video.c:253
ARVIDEO_EXTERN ARVideoSourceInfoListT * ar2VideoCreateSourceInfoList(const char *config)
Definition: video2.c:172
ARVIDEO_EXTERN AR_PIXEL_FORMAT ar2VideoGetPixelFormat(AR2VideoParamT *vid)
Definition: video2.c:649
ARVIDEO_EXTERN int arVideoGetPixelSize(void)
Definition: video.c:139
AR_VIDEO_ASPECT_RATIO arVideoUtilFindAspectRatio(int w, int h)
Determine the approximate aspect ratio for a given image resolution.
Definition: videoAspectRatio.c:80
ARVIDEO_EXTERN AR_VIDEO_MODULE ar2VideoGetModule(AR2VideoParamT *vid)
Definition: video2.c:516
ARVIDEO_EXTERN int ar2VideoGetSize(AR2VideoParamT *vid, int *x, int *y)
Definition: video2.c:583
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
ARVIDEO_EXTERN const char * arVideoUtilGetPixelFormatName(const AR_PIXEL_FORMAT arPixelFormat)
Definition: video.c:298
ARVIDEO_EXTERN AR2VideoBufferT * ar2VideoGetImage(AR2VideoParamT *vid)
Definition: video2.c:710
ARVIDEO_EXTERN int ar2VideoCapStartAsync(AR2VideoParamT *vid, AR_VIDEO_FRAME_READY_CALLBACK callback, void *userdata)
Definition: video2.c:866
ARVIDEO_EXTERN int ar2VideoSetParami(AR2VideoParamT *vid, int paramName, int value)
Definition: video2.c:1014
ARVIDEO_EXTERN int ar2VideoGetParams(AR2VideoParamT *vid, const int paramName, char **value)
Definition: video2.c:1198
ARVIDEO_EXTERN AR_VIDEO_MODULE arVideoGetModule(void)
Definition: video.c:118
AR_VIDEO_ASPECT_RATIO
Definition: video.h:469
@ 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
1.222: Equivalent to well-known sizes 176x144 (QCIF), 352x288 (CIF).
Definition: video.h:471
@ 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
1.8: Equivalent to well-known sizes 864x480.
Definition: video.h:480
@ AR_VIDEO_ASPECT_RATIO_INVALID
Either width or height is zero.
Definition: video.h:484
@ AR_VIDEO_ASPECT_RATIO_1_1
1.0: "Square".
Definition: video.h:470
@ AR_VIDEO_ASPECT_RATIO_17_9
1.889: Equivalent to well-known sizes 2040x1080.
Definition: video.h:481
@ 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
1.6: Equivalent to well-known sizes 320x200, 1280x800, 1440x900, 1680x1050, 1920x1200,...
Definition: video.h:476
@ AR_VIDEO_ASPECT_RATIO_14_9
1.556:
Definition: video.h:475
@ AR_VIDEO_ASPECT_RATIO_UNIQUE
Value not easily representable as a ratio of integers.
Definition: video.h:483
@ 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
2.333: "Ultrawide". Equivalent to well-known sizes 2560x1080, 1280x512.
Definition: video.h:482
@ AR_VIDEO_ASPECT_RATIO_16_9
1.778: "Widescreen". Equivalent to well-known sizes 1280x720 (720p), 1920x1080 (1080p).
Definition: video.h:479
ARVIDEO_EXTERN int ar2VideoPushFinal(AR2VideoParamT *vid)
Definition: video2.c:1454
void(* AR_VIDEO_FRAME_READY_CALLBACK)(void *)
Definition: video.h:302
ARVIDEO_EXTERN int ar2VideoLoadParam(AR2VideoParamT *vid, char *filename)
Definition: video2.c:1331