Merge tag 'v0.2.0'
[rtmpclient.git] / app / src / main / jni / localdefines.h
1 /*
2  * UVCCamera
3  * library and sample to access to UVC web camera on non-rooted Android device
4  *
5  * Copyright (c) 2014-2017 saki t_saki@serenegiant.com
6  *
7  * File name: localdefines.h
8  *
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
12  *
13  *     http://www.apache.org/licenses/LICENSE-2.0
14  *
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.
20  *
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.
23 */
24
25 #ifndef LOCALDEFINES_H_
26 #define LOCALDEFINES_H_
27
28 #include <jni.h>
29
30 #ifndef LOG_TAG
31 #define LOG_TAG "libUVCCamera"
32 #endif
33
34 //#define LIBUVC_HAS_JPEG
35
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
42
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
51
52 #define USE_LOGALL      // If you don't need to all LOG, comment out this line and select follows
53 //#define USE_LOGV
54 //#define USE_LOGD
55 #define USE_LOGI
56 #define USE_LOGW
57 #define USE_LOGE
58 #define USE_LOGF
59
60 #ifdef NDEBUG
61 #undef USE_LOGALL
62 #endif
63
64 #ifdef LOG_NDEBUG
65 #undef USE_LOGALL
66 #endif
67
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;"
72 //
73 typedef         jlong                                           ID_TYPE;
74
75 #endif /* LOCALDEFINES_H_ */