#include <jni.h>
|
#include <android/log.h>
|
#include <android/bitmap.h>
|
|
#include <string.h>
|
|
#include <stdio.h>
|
#include <stdlib.h>
|
#include <string.h>
|
#include <assert.h>
|
|
#include <fcntl.h> /* low-level i/o */
|
#include <unistd.h>
|
#include <errno.h>
|
#include <malloc.h>
|
#include <sys/stat.h>
|
#include <sys/types.h>
|
#include <sys/time.h>
|
#include <sys/mman.h>
|
#include <sys/ioctl.h>
|
|
#include <asm/types.h> /* for videodev2.h */
|
|
#include <linux/videodev2.h>
|
#include <linux/usbdevice_fs.h>
|
|
#define LOG_TAG "WebCam"
|
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
|
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
|
|
#define CLEAR(x) memset (&(x), 0, sizeof (x))
|
|
#define ERROR_AY_CAMERA -2
|
#define ERROR_USB_NAME -3
|
#define ERROR_LOCAL -1
|
#define SUCCESS_LOCAL 0
|
|
|
|
|
//
|
//jint Java_com_anyun_libusbcamera_UsbCamera_prepareCamera( JNIEnv* env,jobject thiz, jint videoid, jintArray resolution, jboolean ay_camera);
|
//jint Java_com_anyun_libusbcamera_UsbCamera_prepareCameraWithBase( JNIEnv* env,jobject thiz, jint videoid, jint videobase, jintArray resolution, jboolean define_camera);
|
//jint Java_com_anyun_libusbcamera_UsbCamera_processCamera( JNIEnv* env,jobject thiz);
|
//void Java_com_anyun_libusbcamera_UsbCamera_stopCamera(JNIEnv* env,jobject thiz);
|
//void Java_com_anyun_libusbcamera_UsbCamera_pixeltobmp( JNIEnv* env,jobject thiz,jobject bitmap);
|
//void Java_com_anyun_libusbcamera_UsbCamera_rgba(JNIEnv* env,
|
// jobject thiz, jint type,jbyteArray output);
|