aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/jni/utils.h
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-08-26 23:48:48 +0200
committerChristian Schneppe <christian@pix-art.de>2016-08-28 21:33:19 +0200
commitb3b3475e93a9b08f9e35edbf74673728b560ad3b (patch)
treefc72bfce668b358310061c0a94736a0bd14e8b5d /src/main/jni/utils.h
parent1f7f535d37b844dbd87447e1872c270edbca1302 (diff)
compress videos bigger than 10 MB before sending
Diffstat (limited to 'src/main/jni/utils.h')
-rw-r--r--src/main/jni/utils.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/jni/utils.h b/src/main/jni/utils.h
new file mode 100644
index 000000000..f17ae9025
--- /dev/null
+++ b/src/main/jni/utils.h
@@ -0,0 +1,29 @@
+#ifndef log_h
+#define log_h
+
+#include <android/log.h>
+#include <jni.h>
+
+#define LOG_TAG "tmessages"
+#ifndef LOG_DISABLED
+#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
+#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
+#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
+#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)
+#else
+#define LOGI(...)
+#define LOGD(...)
+#define LOGE(...)
+#define LOGV(...)
+#endif
+
+#ifndef max
+#define max(x, y) ((x) > (y)) ? (x) : (y)
+#endif
+#ifndef min
+#define min(x, y) ((x) < (y)) ? (x) : (y)
+#endif
+
+void throwException(JNIEnv *env, char *format, ...);
+
+#endif