diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-08-26 23:48:48 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-08-28 21:33:19 +0200 |
commit | b3b3475e93a9b08f9e35edbf74673728b560ad3b (patch) | |
tree | fc72bfce668b358310061c0a94736a0bd14e8b5d /src/main/jni/utils.c | |
parent | 1f7f535d37b844dbd87447e1872c270edbca1302 (diff) |
compress videos bigger than 10 MB before sending
Diffstat (limited to 'src/main/jni/utils.c')
-rw-r--r-- | src/main/jni/utils.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/jni/utils.c b/src/main/jni/utils.c new file mode 100644 index 000000000..1321a8213 --- /dev/null +++ b/src/main/jni/utils.c @@ -0,0 +1,14 @@ +#include "utils.h" + +void throwException(JNIEnv *env, char *format, ...) { + jclass exClass = (*env)->FindClass(env, "java/lang/UnsupportedOperationException"); + if (!exClass) { + return; + } + char dest[256]; + va_list argptr; + va_start(argptr, format); + vsprintf(dest, format, argptr); + va_end(argptr); + (*env)->ThrowNew(env, exClass, dest); +} |