ARX  1.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
56typedef enum {
59 ARVideoAndroidCameraCaptureSessionState_CLOSED, // session is closed(by itself or a new session evicts)
62
64 char *device_id;
65 int camera_index; // 0 = first camera, 1 = second etc.
66 int width;
67 int height;
68 AR_PIXEL_FORMAT pixelFormat;
70 float focalLength; // metres.
71 void (*cparamSearchCallback)(const ARParam *, void *);
74 bool native;
75 bool capturing; // Between capStart and capStop.
76 pthread_mutex_t frameLock; // Protects: buffer, capturing.
77 void (*callback)(void *);
78 void *userdata;
80 volatile bool cameraReady_;
82 ACameraManager* cameraMgr_;
83 ACameraDevice* cameraDevice_;
84 ACameraManager_AvailabilityCallbacks cameraAvailabilityCallbacks;
88 int32_t sensitivity_;
92 AImageReader* imageReader_;
95 AImage* imageReady;
96 ACaptureSessionOutput* captureSessionOutput_;
97 ACameraOutputTarget* captureRequestTarget_;
98 ACaptureRequest* captureRequest_;
99 ACaptureSessionOutputContainer* captureSessionOutputContainer_;
100 ACameraCaptureSession* captureSession_;
103};
104
105#ifdef __cplusplus
106}
107#endif
108#endif // AR_VIDEO_ANDROID_PRIVATE_H
Definition: videoAndroidPrivate.h:63
ACaptureRequest * captureRequest_
Definition: videoAndroidPrivate.h:98
int convertToRGBA
Definition: videoAndroidPrivate.h:69
int position
Definition: videoAndroidPrivate.h:79
volatile bool cameraReady_
Definition: videoAndroidPrivate.h:80
void * userdata
Definition: videoAndroidPrivate.h:78
AR_PIXEL_FORMAT pixelFormat
Definition: videoAndroidPrivate.h:68
bool native
Definition: videoAndroidPrivate.h:74
AImage * imageCheckedOutDownstream
Definition: videoAndroidPrivate.h:94
int64_t exposureRangeMax_
Definition: videoAndroidPrivate.h:87
int32_t sensitivityRangeMax_
Definition: videoAndroidPrivate.h:90
pthread_mutex_t frameLock
Definition: videoAndroidPrivate.h:76
ACaptureSessionOutputContainer * captureSessionOutputContainer_
Definition: videoAndroidPrivate.h:99
int32_t sensitivityRangeMin_
Definition: videoAndroidPrivate.h:89
bool capturing
Definition: videoAndroidPrivate.h:75
void * cparamSearchUserdata
Definition: videoAndroidPrivate.h:72
ACameraDevice * cameraDevice_
Definition: videoAndroidPrivate.h:83
void(* cparamSearchCallback)(const ARParam *, void *)
Definition: videoAndroidPrivate.h:71
ACameraOutputTarget * captureRequestTarget_
Definition: videoAndroidPrivate.h:97
int width
Definition: videoAndroidPrivate.h:66
int64_t exposureTime_
Definition: videoAndroidPrivate.h:85
ARVideoAndroidCameraCaptureSessionState cameraCaptureSessionState
Definition: videoAndroidPrivate.h:101
AImageReader * imageReader_
Definition: videoAndroidPrivate.h:92
int captureRequestSessionSequenceId_
Definition: videoAndroidPrivate.h:102
char * device_id
Definition: videoAndroidPrivate.h:64
ACameraManager_AvailabilityCallbacks cameraAvailabilityCallbacks
Definition: videoAndroidPrivate.h:84
int height
Definition: videoAndroidPrivate.h:67
ACameraManager * cameraMgr_
Definition: videoAndroidPrivate.h:82
int64_t exposureRangeMin_
Definition: videoAndroidPrivate.h:86
int32_t sensorRotation_
Definition: videoAndroidPrivate.h:91
int camera_index
Definition: videoAndroidPrivate.h:65
bool cameraAvailable_
Definition: videoAndroidPrivate.h:81
AImage * imageReady
Definition: videoAndroidPrivate.h:95
float focalLength
Definition: videoAndroidPrivate.h:70
ANativeWindow * imageReaderNativeWindow_
Definition: videoAndroidPrivate.h:93
ACaptureSessionOutput * captureSessionOutput_
Definition: videoAndroidPrivate.h:96
ACameraCaptureSession * captureSession_
Definition: videoAndroidPrivate.h:100
void(* callback)(void *)
Definition: videoAndroidPrivate.h:77
int32_t sensitivity_
Definition: videoAndroidPrivate.h:88
AR2VideoBufferT buffer
Definition: videoAndroidPrivate.h:73
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