3 * library and sample to access to UVC web camera on non-rooted Android device
5 * Copyright (c) 2014-2017 saki t_saki@serenegiant.com
7 * File name: localdefines.h
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
21 * All files in the folder are under this Apache License, Version 2.0.
22 * Files in the jni/libjpeg, jni/libusb, jin/libuvc, jni/rapidjson folder may have a different license, see the respective files.
25 #ifndef LOCALDEFINES_H_
26 #define LOCALDEFINES_H_
31 #define LOG_TAG "libUVCCamera"
34 //#define LIBUVC_HAS_JPEG
36 // write back array that got by getXXXArrayElements into original Java object and release its array
37 #define ARRAYELEMENTS_COPYBACK_AND_RELEASE 0
38 // write back array that got by getXXXArrayElements into origianl Java object but do not release its array
39 #define ARRAYELEMENTS_COPYBACK_ONLY JNI_COMMIT
40 // never write back array that got by getXXXArrayElements but release its array
41 #define ARRAYELEMENTS_ABORT_AND_RELEASE JNI_ABORT
43 #define THREAD_PRIORITY_DEFAULT 0
44 #define THREAD_PRIORITY_LOWEST 19
45 #define THREAD_PRIORITY_BACKGROUND 10
46 #define THREAD_PRIORITY_FOREGROUND -2
47 #define THREAD_PRIORITY_DISPLAY -4
48 #define THREAD_PRIORITY_URGENT_DISPLAY -8
49 #define THREAD_PRIORITY_AUDIO -16
50 #define THREAD_PRIORITY_URGENT_AUDIO -19
52 #define USE_LOGALL // If you don't need to all LOG, comment out this line and select follows
68 // Absolute class name of Java object
69 // if you change the package name of UVCCamera library, you must fix these
70 #define JTYPE_SYSTEM "Ljava/lang/System;"
71 #define JTYPE_UVCCAMERA "Lcom/serenegiant/usb/UVCCamera;"
73 typedef jlong ID_TYPE;
75 #endif /* LOCALDEFINES_H_ */