65 DeviceState deviceState;
70 char* cameraParamBuffer;
71 size_t cameraParamBufferLen;
75 char* videoConfiguration;
80 AR_PIXEL_FORMAT pixelFormat;
82 int m_captureFrameWaitCount;
89 void setError(
int error);
91 pthread_rwlock_t m_frameBufferLock;
93 static void openCallback(
void *userData);
95 static void open2CparamCallback(
const ARParam *cparam_p,
void *userdata);
96 bool open3(
const ARParam *cparam_p);
126 void configure(
const char* vconf,
bool noCpara,
const char* cparaName,
const char* cparaBuff,
size_t cparaBuffLen);
148 switch (scalingMode) {
160 ARParam* getCameraParametersForViewportSizeAndFittingMode(
const Size viewportSize,
const ScalingMode scalingMode);
166 int getVideoWidth()
const;
172 int getVideoHeight()
const;
178 AR_PIXEL_FORMAT getPixelFormat()
const;
226 void checkinFrame(
void);
242 bool getFrameTextureRGBA32(uint32_t *buffer);
244 int videoPushInit(
int width,
int height,
const char *pixelFormat,
int cameraIndex,
int cameraPosition);
245 int videoPush(
ARUint8 *buf0p,
int buf0Size,
int buf0PixelStride,
int buf0RowStride,
246 ARUint8 *buf1p,
int buf1Size,
int buf1PixelStride,
int buf1RowStride,
247 ARUint8 *buf2p,
int buf2Size,
int buf2PixelStride,
int buf2RowStride,
248 ARUint8 *buf3p,
int buf3Size,
int buf3PixelStride,
int buf3RowStride,
250 int videoPushFinal(
void);
artoolkitX core routines.
unsigned char ARUint8
Definition ar.h:92
ScalingMode
Definition ARVideoSource.h:139
@ SCALE_MODE_STRETCH
Definition ARVideoSource.h:140
@ SCALE_MODE_FIT
Definition ARVideoSource.h:141
@ SCALE_MODE_FILL
Definition ARVideoSource.h:142
@ SCALE_MODE_1_TO_1
Definition ARVideoSource.h:143
static const std::string ScalingModeName(const ScalingMode scalingMode)
Definition ARVideoSource.h:146
int getError()
Definition ARVideoSource.cpp:355
bool isOpen() const
Returns true if the video source is open.
Definition ARVideoSource.cpp:364
ARVideoSource()
Definition ARVideoSource.cpp:61
ARParamLT * getCameraParameters() const
Returns the camera parameters for the video source.
Definition ARVideoSource.cpp:374
void configure(const char *vconf, bool noCpara, const char *cparaName, const char *cparaBuff, size_t cparaBuffLen)
Sets initial parameters which will be used when the video source is opened.
Definition ARVideoSource.cpp:104
bool isRunning() const
Returns true if the video source is open and ready to be queried.
Definition ARVideoSource.cpp:369
A structure which carries information about a video frame retrieved by the video library.
Definition ar.h:148
A structure to hold a timestamp in seconds and microseconds, with arbitrary epoch.
Definition ar.h:139
Structure holding camera parameters, including image size, projection matrix and lens distortion para...
Definition param.h:99
Structure holding camera parameters, in lookup table form.
Definition param.h:151
Definition ARVideoSource.h:134
int width
Definition ARVideoSource.h:135
int height
Definition ARVideoSource.h:136