ARX  1.2.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
videoAndroidPrivate.h
Go to the documentation of this file.
1/*
2 * videoAndroidPrivate.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 2012-2015 ARToolworks, Inc.
34 *
35 * Author(s): Philip Lamb
36 *
37 */
38
39#ifndef AR_VIDEO_ANDROID_PRIVATE_H
40#define AR_VIDEO_ANDROID_PRIVATE_H
41
42#include <ARX/ARVideo/video.h>
43#include <pthread.h>
44#include <stdbool.h>
45#include <stdint.h>
46#include <camera/NdkCameraDevice.h>
47#include <camera/NdkCameraError.h>
48#include <camera/NdkCameraManager.h>
49#include <camera/NdkCameraMetadataTags.h>
50#include <media/NdkImageReader.h>
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
62
63struct _size {
64 int32_t w;
65 int32_t h;
66};
67
69 char *device_id;
70 char *name;
71 int camera_index; // 0 = first camera, 1 = second etc.
72 int width;
73 int height;
74 AR_PIXEL_FORMAT pixelFormat;
76 float focalLength; // metres.
77 void (*cparamSearchCallback)(const ARParam *, void *);
80 bool native;
81 bool capturing; // Between capStart and capStop.
82 pthread_mutex_t frameLock; // Protects: buffer, capturing.
83 void (*callback)(void *);
84 void *userdata;
86 volatile bool cameraReady_;
88 ACameraManager* cameraMgr_;
89 ACameraDevice* cameraDevice_;
90 ACameraManager_AvailabilityCallbacks cameraAvailabilityCallbacks;
94 int32_t sensitivity_;
98 AImageReader* imageReader_;
101 AImage* imageReady;
102 ACaptureSessionOutput* captureSessionOutput_;
103 ACameraOutputTarget* captureRequestTarget_;
104 ACaptureRequest* captureRequest_;
105 ACaptureSessionOutputContainer* captureSessionOutputContainer_;
106 ACameraCaptureSession* captureSession_;
110 struct _size *sizes;
111};
112
113#ifdef __cplusplus
114}
115#endif
116#endif // AR_VIDEO_ANDROID_PRIVATE_H
Definition videoAndroidPrivate.h:68
void(*) cparamSearchCallback(const ARParam *, void *)
Definition videoAndroidPrivate.h:77
ACaptureRequest * captureRequest_
Definition videoAndroidPrivate.h:104
int convertToRGBA
Definition videoAndroidPrivate.h:75
int position
Definition videoAndroidPrivate.h:85
volatile bool cameraReady_
Definition videoAndroidPrivate.h:86
void * userdata
Definition videoAndroidPrivate.h:84
struct _size * sizes
Definition videoAndroidPrivate.h:110
AR_PIXEL_FORMAT pixelFormat
Definition videoAndroidPrivate.h:74
bool native
Definition videoAndroidPrivate.h:80
AImage * imageCheckedOutDownstream
Definition videoAndroidPrivate.h:100
int64_t exposureRangeMax_
Definition videoAndroidPrivate.h:93
int32_t sensitivityRangeMax_
Definition videoAndroidPrivate.h:96
pthread_mutex_t frameLock
Definition videoAndroidPrivate.h:82
ACaptureSessionOutputContainer * captureSessionOutputContainer_
Definition videoAndroidPrivate.h:105
int32_t sensitivityRangeMin_
Definition videoAndroidPrivate.h:95
bool capturing
Definition videoAndroidPrivate.h:81
void * cparamSearchUserdata
Definition videoAndroidPrivate.h:78
char * name
Definition videoAndroidPrivate.h:70
ACameraDevice * cameraDevice_
Definition videoAndroidPrivate.h:89
ACameraOutputTarget * captureRequestTarget_
Definition videoAndroidPrivate.h:103
int width
Definition videoAndroidPrivate.h:72
int64_t exposureTime_
Definition videoAndroidPrivate.h:91
ARVideoAndroidCameraCaptureSessionState cameraCaptureSessionState
Definition videoAndroidPrivate.h:107
AImageReader * imageReader_
Definition videoAndroidPrivate.h:98
int captureRequestSessionSequenceId_
Definition videoAndroidPrivate.h:108
char * device_id
Definition videoAndroidPrivate.h:69
ACameraManager_AvailabilityCallbacks cameraAvailabilityCallbacks
Definition videoAndroidPrivate.h:90
int height
Definition videoAndroidPrivate.h:73
ACameraManager * cameraMgr_
Definition videoAndroidPrivate.h:88
int64_t exposureRangeMin_
Definition videoAndroidPrivate.h:92
int32_t sensorRotation_
Definition videoAndroidPrivate.h:97
int camera_index
Definition videoAndroidPrivate.h:71
bool cameraAvailable_
Definition videoAndroidPrivate.h:87
AImage * imageReady
Definition videoAndroidPrivate.h:101
float focalLength
Definition videoAndroidPrivate.h:76
ANativeWindow * imageReaderNativeWindow_
Definition videoAndroidPrivate.h:99
ACaptureSessionOutput * captureSessionOutput_
Definition videoAndroidPrivate.h:102
int sizesCount
Definition videoAndroidPrivate.h:109
ACameraCaptureSession * captureSession_
Definition videoAndroidPrivate.h:106
int32_t sensitivity_
Definition videoAndroidPrivate.h:94
void(*) callback(void *)
Definition videoAndroidPrivate.h:83
AR2VideoBufferT buffer
Definition videoAndroidPrivate.h:79
Definition videoAndroidPrivate.h:63
int32_t w
Definition videoAndroidPrivate.h:64
int32_t h
Definition videoAndroidPrivate.h:65
A structure which carries information about a video frame retrieved by the video library.
Definition ar.h:148
Structure holding camera parameters, including image size, projection matrix and lens distortion para...
Definition param.h:99
ARVideoAndroidCameraCaptureSessionState
Definition videoAndroidPrivate.h:56
@ ARVideoAndroidCameraCaptureSessionState_ACTIVE
Definition videoAndroidPrivate.h:58
@ ARVideoAndroidCameraCaptureSessionState_CLOSED
Definition videoAndroidPrivate.h:59
@ ARVideoAndroidCameraCaptureSessionState_READY
Definition videoAndroidPrivate.h:57
@ ARVideoAndroidCameraCaptureSessionState_MAX_STATE
Definition videoAndroidPrivate.h:60